diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-08-28 09:18:40 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-08-28 09:20:05 (GMT) |
commit | 66f820c2c7e2d7c6d883c995bf7b2da37aa963c7 (patch) | |
tree | 19b495dc2d215b84da103af0c7e62a196de6049a /Swift/QtUI/QtChatView.cpp | |
parent | 6d74e548e9e748007f6541dbcb0ed148e572332e (diff) | |
download | swift-contrib-66f820c2c7e2d7c6d883c995bf7b2da37aa963c7.zip swift-contrib-66f820c2c7e2d7c6d883c995bf7b2da37aa963c7.tar.bz2 |
Disable the 'Decrease font size' menu item in chats when it's already minimal.
Resolves: #968
Diffstat (limited to 'Swift/QtUI/QtChatView.cpp')
-rw-r--r-- | Swift/QtUI/QtChatView.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp index c533525..4c6a729 100644 --- a/Swift/QtUI/QtChatView.cpp +++ b/Swift/QtUI/QtChatView.cpp @@ -223,18 +223,19 @@ void QtChatView::decreaseFontSize() { void QtChatView::resizeFont(int fontSizeSteps) { fontSizeSteps_ = fontSizeSteps; double size = 1.0 + 0.2 * fontSizeSteps_; QString sizeString(QString().setNum(size, 'g', 3) + "em"); //qDebug() << "Setting to " << sizeString; const QWebElementCollection spans = document_.findAll("span"); foreach (QWebElement span, spans) { span.setStyleProperty("font-size", sizeString); } + webView_->setFontSizeIsMinimal(size == 1.0); } void QtChatView::resetView() { lastElement_ = QWebElement(); QString pageHTML = theme_->getTemplate(); pageHTML.replace("==bodyBackground==", "background-color:#e3e3e3"); pageHTML.replace(pageHTML.indexOf("%@"), 2, theme_->getBase()); if (pageHTML.count("%@") > 3) { pageHTML.replace(pageHTML.indexOf("%@"), 2, theme_->getMainCSS()); |