Put margins in a sub-menu
This commit is contained in:
parent
b98cc0e47a
commit
47a032a84d
9 changed files with 85 additions and 77 deletions
48
qml/components/BarButton.qml
Normal file
48
qml/components/BarButton.qml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import Sailfish.Silica 1.0
|
||||||
|
|
||||||
|
BackgroundItem {
|
||||||
|
id: barButton
|
||||||
|
|
||||||
|
property alias text: label.text
|
||||||
|
property bool active: false
|
||||||
|
highlightedColor: Theme.rgba(Theme.highlightBackgroundFromColor(Theme.highlightBackgroundColor, Theme.colorScheme), Theme.highlightBackgroundOpacity)
|
||||||
|
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
active = !active
|
||||||
|
}
|
||||||
|
|
||||||
|
function _color(alpha) {
|
||||||
|
alpha = alpha*0.25
|
||||||
|
return Theme.rgba(Theme.highlightBackgroundColor, alpha)
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
x: -1
|
||||||
|
anchors.fill: parent
|
||||||
|
gradient: Gradient {
|
||||||
|
GradientStop { position: 0.0; color: _color(1) }
|
||||||
|
GradientStop { position: 0.2; color: _color(0.6) }
|
||||||
|
GradientStop { position: 0.8; color: _color(0.4) }
|
||||||
|
GradientStop { position: 1.0; color: "transparent" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: label
|
||||||
|
leftPadding: Theme.paddingLarge
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
color: barButton.highlighted ? Theme.highlightColor : Theme.primaryColor
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: image
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: Theme.paddingMedium
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
source: active ? "image://theme/icon-m-down" : "image://theme/icon-m-right"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -158,25 +158,34 @@ Page {
|
||||||
name: "output-bin"
|
name: "output-bin"
|
||||||
prettyName: qsTr("Output bin")
|
prettyName: qsTr("Output bin")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BarButton {
|
||||||
|
id: marginsButton
|
||||||
|
text: qsTr("Margins")
|
||||||
|
}
|
||||||
ChoiceSetting {
|
ChoiceSetting {
|
||||||
|
visible: marginsButton.active
|
||||||
tag: IppMsg.Integer
|
tag: IppMsg.Integer
|
||||||
name: "media-top-margin"
|
name: "media-top-margin"
|
||||||
subkey: "media-col"
|
subkey: "media-col"
|
||||||
prettyName: qsTr("Top")
|
prettyName: qsTr("Top")
|
||||||
}
|
}
|
||||||
ChoiceSetting {
|
ChoiceSetting {
|
||||||
|
visible: marginsButton.active
|
||||||
tag: IppMsg.Integer
|
tag: IppMsg.Integer
|
||||||
name: "media-bottom-margin"
|
name: "media-bottom-margin"
|
||||||
subkey: "media-col"
|
subkey: "media-col"
|
||||||
prettyName: qsTr("Bottom")
|
prettyName: qsTr("Bottom")
|
||||||
}
|
}
|
||||||
ChoiceSetting {
|
ChoiceSetting {
|
||||||
|
visible: marginsButton.active
|
||||||
tag: IppMsg.Integer
|
tag: IppMsg.Integer
|
||||||
name: "media-left-margin"
|
name: "media-left-margin"
|
||||||
subkey: "media-col"
|
subkey: "media-col"
|
||||||
prettyName: qsTr("Left")
|
prettyName: qsTr("Left")
|
||||||
}
|
}
|
||||||
ChoiceSetting {
|
ChoiceSetting {
|
||||||
|
visible: marginsButton.active
|
||||||
tag: IppMsg.Integer
|
tag: IppMsg.Integer
|
||||||
name: "media-right-margin"
|
name: "media-right-margin"
|
||||||
subkey: "media-col"
|
subkey: "media-col"
|
||||||
|
|
|
@ -370,17 +370,6 @@
|
||||||
<translation>Abbruch des Auftrags fehlgeschlagen</translation>
|
<translation>Abbruch des Auftrags fehlgeschlagen</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>MediaColSetting</name>
|
|
||||||
<message>
|
|
||||||
<source>true</source>
|
|
||||||
<translation>Wahr</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>false</source>
|
|
||||||
<translation>Falsch</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>NagScreen</name>
|
<name>NagScreen</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -510,6 +499,10 @@
|
||||||
<source>Right</source>
|
<source>Right</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Margins</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RangeSetting</name>
|
<name>RangeSetting</name>
|
||||||
|
|
|
@ -370,17 +370,6 @@
|
||||||
<translation>Cancelando trabajo fallido</translation>
|
<translation>Cancelando trabajo fallido</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>MediaColSetting</name>
|
|
||||||
<message>
|
|
||||||
<source>true</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>false</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>NagScreen</name>
|
<name>NagScreen</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -510,6 +499,10 @@
|
||||||
<source>Right</source>
|
<source>Right</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Margins</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RangeSetting</name>
|
<name>RangeSetting</name>
|
||||||
|
|
|
@ -370,17 +370,6 @@
|
||||||
<translation>Échec de l'annulation de la tâche d'impression</translation>
|
<translation>Échec de l'annulation de la tâche d'impression</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>MediaColSetting</name>
|
|
||||||
<message>
|
|
||||||
<source>true</source>
|
|
||||||
<translation>true</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>false</source>
|
|
||||||
<translation>false</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>NagScreen</name>
|
<name>NagScreen</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -510,6 +499,10 @@
|
||||||
<source>Right</source>
|
<source>Right</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Margins</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RangeSetting</name>
|
<name>RangeSetting</name>
|
||||||
|
|
|
@ -370,17 +370,6 @@
|
||||||
<translation>Taak annuleren mislukt</translation>
|
<translation>Taak annuleren mislukt</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>MediaColSetting</name>
|
|
||||||
<message>
|
|
||||||
<source>true</source>
|
|
||||||
<translation>waar</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>false</source>
|
|
||||||
<translation>niet waar</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>NagScreen</name>
|
<name>NagScreen</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -510,6 +499,10 @@
|
||||||
<source>Right</source>
|
<source>Right</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Margins</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RangeSetting</name>
|
<name>RangeSetting</name>
|
||||||
|
|
|
@ -370,17 +370,6 @@
|
||||||
<translation>Nieudane usuwanie zadania</translation>
|
<translation>Nieudane usuwanie zadania</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>MediaColSetting</name>
|
|
||||||
<message>
|
|
||||||
<source>true</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>false</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>NagScreen</name>
|
<name>NagScreen</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -510,6 +499,10 @@
|
||||||
<source>Right</source>
|
<source>Right</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Margins</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RangeSetting</name>
|
<name>RangeSetting</name>
|
||||||
|
|
|
@ -370,17 +370,6 @@
|
||||||
<translation>作业失败</translation>
|
<translation>作业失败</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>MediaColSetting</name>
|
|
||||||
<message>
|
|
||||||
<source>true</source>
|
|
||||||
<translation>真</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>false</source>
|
|
||||||
<translation>假</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>NagScreen</name>
|
<name>NagScreen</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -510,6 +499,10 @@
|
||||||
<source>Right</source>
|
<source>Right</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Margins</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RangeSetting</name>
|
<name>RangeSetting</name>
|
||||||
|
|
|
@ -370,17 +370,6 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>MediaColSetting</name>
|
|
||||||
<message>
|
|
||||||
<source>true</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>false</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>NagScreen</name>
|
<name>NagScreen</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -510,6 +499,10 @@
|
||||||
<source>Right</source>
|
<source>Right</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Margins</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RangeSetting</name>
|
<name>RangeSetting</name>
|
||||||
|
|
Loading…
Reference in a new issue