1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

Merge branch 'master' of github.com:bbedward/DankMaterialShell

This commit is contained in:
bbedward
2025-09-03 23:26:27 -04:00
2 changed files with 18 additions and 8 deletions

View File

@@ -346,7 +346,7 @@ DankModal {
DankActionButton { DankActionButton {
circular: false circular: false
iconName: "help" iconName: "info"
iconSize: Theme.iconSize - 4 iconSize: Theme.iconSize - 4
iconColor: Theme.surfaceText iconColor: Theme.surfaceText
onClicked: fileBrowserModal.showKeyboardHints = !fileBrowserModal.showKeyboardHints onClicked: fileBrowserModal.showKeyboardHints = !fileBrowserModal.showKeyboardHints
@@ -567,11 +567,13 @@ DankModal {
id: fileNameInput id: fileNameInput
width: parent.width - saveButton.width - Theme.spacingM width: parent.width - saveButton.width - Theme.spacingM
height: 36 height: 40
text: defaultFileName text: defaultFileName
placeholderText: "Enter filename..." placeholderText: "Enter filename..."
ignoreLeftRightKeys: false ignoreLeftRightKeys: false
focus: saveMode focus: saveMode
topPadding: Theme.spacingS
bottomPadding: Theme.spacingS
Component.onCompleted: { Component.onCompleted: {
if (saveMode) if (saveMode)
Qt.callLater(() => { Qt.callLater(() => {
@@ -591,7 +593,7 @@ DankModal {
id: saveButton id: saveButton
width: 80 width: 80
height: 36 height: 40
color: fileNameInput.text.trim() !== "" ? Theme.primary : Theme.surfaceVariant color: fileNameInput.text.trim() !== "" ? Theme.primary : Theme.surfaceVariant
radius: Theme.cornerRadius radius: Theme.cornerRadius

View File

@@ -95,17 +95,25 @@ StyledRect {
onActiveFocusChanged: root.focusStateChanged(activeFocus) onActiveFocusChanged: root.focusStateChanged(activeFocus)
Keys.forwardTo: root.ignoreLeftRightKeys ? root.keyForwardTargets : [] Keys.forwardTo: root.ignoreLeftRightKeys ? root.keyForwardTargets : []
Keys.onLeftPressed: event => { Keys.onLeftPressed: event => {
if (root.ignoreLeftRightKeys) if (root.ignoreLeftRightKeys) {
event.accepted = true event.accepted = true
} else {
// Allow normal TextInput cursor movement
event.accepted = false
}
} }
Keys.onRightPressed: event => { Keys.onRightPressed: event => {
if (root.ignoreLeftRightKeys) if (root.ignoreLeftRightKeys) {
event.accepted = true event.accepted = true
} else {
// Allow normal TextInput cursor movement
event.accepted = false
}
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
cursorShape: Qt.IBeamCursor cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.NoButton acceptedButtons: Qt.NoButton
} }