Added menu entries and shortcuts to increase and decrease font sizes.

This commit is contained in:
Filippo Scognamiglio
2014-07-14 00:53:17 +02:00
parent a96f8ec220
commit b9de57aec1
3 changed files with 38 additions and 5 deletions
+22
View File
@@ -69,6 +69,25 @@ ApplicationWindow{
shortcut: "Ctrl+Shift+V"
onTriggered: terminal.pasteClipboard()
}
Action{
id: zoomIn
text: qsTr("&Zoom In")
shortcut: "Ctrl++"
onTriggered: {
var oldScaling = shadersettings.fontScalingIndexes[shadersettings.rasterization];
var maxScalingIndex = shadersettings.fontScalingList.length - 1;
shadersettings.setScalingIndex(Math.min(oldScaling + 1, maxScalingIndex));
}
}
Action{
id: zoomOut
text: qsTr("&Zoom Out")
shortcut: "Ctrl+-"
onTriggered: {
var oldScaling = shadersettings.fontScalingIndexes[shadersettings.rasterization];
shadersettings.setScalingIndex(Math.max(oldScaling - 1, 0));
}
}
menuBar: MenuBar {
id: menubar
@@ -89,6 +108,9 @@ ApplicationWindow{
title: qsTr("View")
visible: shadersettings.fullscreen ? false : true
MenuItem {action: fullscreenAction}
MenuSeparator{}
MenuItem {action: zoomIn}
MenuItem {action: zoomOut}
}
}
ApplicationSettings{