Match design of expire date spinbox to other text fields
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 18 Nov 2022 17:09:22 +0000 (18:09 +0100)
committerClaudio Cambra <claudio.cambra@gmail.com>
Fri, 9 Dec 2022 11:54:09 +0000 (12:54 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/filedetails/ShareDetailsPage.qml

index 1376d3ca252ddaf24ee6cf043e43b8f823265caa..403b228c98c61ee1901475c1a3ee41be161c2778 100644 (file)
@@ -589,11 +589,17 @@ Page {
                         up.indicator: Item {}
                         down.indicator: Item {}
 
-                        background: Rectangle {
-                            radius: Style.slightlyRoundedButtonRadius
-                            border.width: Style.normalBorderWidth
-                            border.color: expireDateSpinBox.activeFocus ? Style.ncBlue : Style.menuBorder
-                            color: Style.backgroundColor
+                        padding: 0
+                        background: null
+                        contentItem: NCInputTextField {
+                            text: expireDateSpinBox.textFromValue(expireDateSpinBox.value, expireDateSpinBox.locale)
+                            readOnly: !expireDateSpinBox.editable
+                            validator: expireDateSpinBox.validator
+                            inputMethodHints: Qt.ImhFormattedNumbersOnly
+                            onAccepted: {
+                                expireDateSpinBox.value = expireDateSpinBox.valueFromText(text, expireDateSpinBox.locale);
+                                expireDateSpinBox.valueModified();
+                            }
                         }
 
                         value: expireDateReduced