Setting scaling stepSize to 0.05 instead of 0.1. Refactored scaling handling.

This commit is contained in:
Filippo Scognamiglio
2014-09-29 22:38:33 +02:00
parent 2ff6c71c23
commit e815fe2787
3 changed files with 28 additions and 39 deletions

View File

@@ -85,20 +85,13 @@ ApplicationWindow{
id: zoomIn
text: qsTr("Zoom In")
shortcut: "Ctrl++"
onTriggered: {
var oldScaling = shadersettings.fontScalingIndex;
var maxScalingIndex = shadersettings.fontScalingList.length - 1;
shadersettings.setScalingIndex(Math.min(oldScaling + 1, maxScalingIndex));
}
onTriggered: shadersettings.incrementScaling();
}
Action{
id: zoomOut
text: qsTr("Zoom Out")
shortcut: "Ctrl+-"
onTriggered: {
var oldScaling = shadersettings.fontScalingIndex;
shadersettings.setScalingIndex(Math.max(oldScaling - 1, 0));
}
onTriggered: shadersettings.decrementScaling();
}
Action{
id: showAboutAction