Improve integer input hints/labels

This commit is contained in:
Anton Thomasson 2023-02-25 16:15:45 +01:00
parent 912bc36dad
commit 1905cec933
10 changed files with 60 additions and 5 deletions

View file

@ -20,10 +20,9 @@ Dialog {
id: valueField
validator: IntValidator{bottom: min; top: max;}
width: parent.width
placeholderText: ""+min+"-"+max
placeholderText: ""+min+"-"+(max == 65535 ? "..." : max)
label: title
focus: true
labelVisible: true
inputMethodHints: Qt.ImhDigitsOnly
}

View file

@ -53,7 +53,7 @@ Setting {
anchors.right: parent.right
icon.source: "image://theme/icon-s-edit"
onClicked: {var dialog = pageStack.push(Qt.resolvedUrl("IntegerInputDialog.qml"),
{value: choice, title: prettyName,
{title: prettyName,
min: low, max: high});
dialog.accepted.connect(function() {
choice = dialog.value;

View file

@ -104,7 +104,7 @@ Setting {
anchors.right: parent.right
icon.source: "image://theme/icon-s-edit"
onClicked: {var dialog = pageStack.push(Qt.resolvedUrl("IntegerInputDialog.qml"),
{value: choice, title: prettyName,
{title: prettyName + " (" + qsTr("Low") + ")",
min: 1, max: high});
dialog.accepted.connect(function() {
choice_low = dialog.value;
@ -132,7 +132,7 @@ Setting {
anchors.right: parent.right
icon.source: "image://theme/icon-s-edit"
onClicked: {var dialog = pageStack.push(Qt.resolvedUrl("IntegerInputDialog.qml"),
{value: choice, title: prettyName,
{title: prettyName + " (" + qsTr("High") + ")",
min: 1, max: high});
dialog.accepted.connect(function() {
choice_high = dialog.value;

View file

@ -535,6 +535,14 @@ auf diesem Drucker</translation>
<source>Advanced</source>
<translation>Fortgeschrittene</translation>
</message>
<message>
<source>Low</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>High</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setting</name>

View file

@ -534,6 +534,14 @@
<source>Advanced</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Low</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>High</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setting</name>

View file

@ -535,6 +535,14 @@ sur cette imprimante</translation>
<source>Advanced</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Low</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>High</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setting</name>

View file

@ -534,6 +534,14 @@
<source>Advanced</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Low</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>High</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setting</name>

View file

@ -534,6 +534,14 @@
<source>Advanced</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Low</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>High</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setting</name>

View file

@ -534,6 +534,14 @@
<source>Advanced</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Low</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>High</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setting</name>

View file

@ -534,6 +534,14 @@
<source>Advanced</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Low</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>High</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setting</name>