diff options
Diffstat (limited to 'components')
| -rw-r--r-- | components/InlineButton.qml | 2 | ||||
| -rw-r--r-- | components/LineEdit.qml | 18 | ||||
| -rw-r--r-- | components/TextPlain.qml | 8 |
3 files changed, 25 insertions, 3 deletions
diff --git a/components/InlineButton.qml b/components/InlineButton.qml index 1983f29b..b7d28240 100644 --- a/components/InlineButton.qml +++ b/components/InlineButton.qml @@ -66,7 +66,7 @@ Item { anchors.fill: parent color: buttonArea.containsMouse ? MoneroComponents.Style.buttonInlineBackgroundColorHover : MoneroComponents.Style.buttonInlineBackgroundColor radius: 4 - + border.width: parent.focus && parent.enabled ? 1 : 0 MoneroComponents.TextPlain { id: inlineText diff --git a/components/LineEdit.qml b/components/LineEdit.qml index 03a00b97..ae2f0114 100644 --- a/components/LineEdit.qml +++ b/components/LineEdit.qml @@ -40,6 +40,8 @@ ColumnLayout { default property alias content: inlineButtons.children property alias input: input + property bool inputHasFocus: input.activeFocus + property bool tabNavigationEnabled: true property alias text: input.text property int inputPaddingLeft: 10 @@ -109,6 +111,8 @@ ColumnLayout { signal editingFinished(); signal accepted(); signal textUpdated(); + signal backtabPressed(); + signal tabPressed(); onActiveFocusChanged: activeFocus && input.forceActiveFocus() onTextUpdated: { @@ -212,8 +216,18 @@ ColumnLayout { MoneroComponents.Input { id: input - KeyNavigation.backtab: item.KeyNavigation.backtab - KeyNavigation.tab: item.KeyNavigation.tab + Keys.onBacktabPressed: { + item.backtabPressed(); + if (item.KeyNavigation.backtab) { + item.KeyNavigation.backtab.forceActiveFocus() + } + } + Keys.onTabPressed: { + item.tabPressed(); + if (item.KeyNavigation.tab) { + item.KeyNavigation.tab.forceActiveFocus() + } + } Layout.fillWidth: true Layout.preferredHeight: inputHeight diff --git a/components/TextPlain.qml b/components/TextPlain.qml index 1dfe32fd..ed6b7977 100644 --- a/components/TextPlain.qml +++ b/components/TextPlain.qml @@ -21,6 +21,14 @@ Text { font.pixelSize: 14 textFormat: Text.PlainText + Rectangle { + width: root.contentWidth + height: root.height + anchors.left: parent.left + anchors.top: parent.top + color: root.focus ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent" + } + MoneroEffects.ColorTransition { enabled: root.themeTransition themeTransition: root.themeTransition |
