ui: Fixed zoom issues

* Show font size change as number not percent
* Show current graph zoom in label next to zoom buttons
* Fixed search blocks not properly updated when fonts size changes
This commit is contained in:
Eberhard Graether
2017-06-28 16:38:40 +02:00
parent a2554a9f75
commit 99ea3b2a25
7 changed files with 50 additions and 10 deletions
@@ -166,7 +166,9 @@ void ActivationController::handleMessage(MessageResetZoom* message)
MessageRefresh().refreshUiOnly().dispatch();
}
MessageStatus("Zoom: 100%").dispatch();
std::stringstream text;
text << "Font size: " << fontSizeStd;
MessageStatus(text.str()).dispatch();
}
void ActivationController::handleMessage(MessageZoom* message)
@@ -176,7 +178,6 @@ void ActivationController::handleMessage(MessageZoom* message)
ApplicationSettings* settings = ApplicationSettings::getInstance().get();
int fontSize = settings->getFontSize();
int standardSize = settings->getFontSizeStd();
int maxSize = settings->getFontSizeMax();
int minSize = settings->getFontSizeMin();
@@ -189,11 +190,8 @@ void ActivationController::handleMessage(MessageZoom* message)
settings->setFontSize(fontSize + (message->zoomIn ? 1 : -1));
settings->save();
fontSize = settings->getFontSize();
int zoom = (fontSize * 100) / standardSize;
std::stringstream text;
text << "Zoom: " << zoom << "%";
text << "Font size: " << settings->getFontSize();
MessageStatus(text.str()).dispatch();
MessageRefresh().refreshUiOnly().dispatch();