mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
removed unnecessary keyboard focus and ESC handler, as they are handled by overlay
This commit is contained in:
committed by
GitHub
parent
5820106e31
commit
631d496001
@@ -165,41 +165,14 @@ Rectangle {
|
||||
textFormat: TextEdit.PlainText
|
||||
background: null
|
||||
rightPadding: 44
|
||||
// CUSTOM: Adapt text color to theme (light/dark mode) - START
|
||||
// Adapt text color to theme (light/dark mode) - START
|
||||
color: Appearance.colors.colOnLayer0
|
||||
// CUSTOM: Adapt text color to theme (light/dark mode) - END
|
||||
// CUSTOM: Disable text area when clickthrough enabled - START
|
||||
// Allow editing when overlay is open OR when clickthrough is disabled
|
||||
// Adapt text color to theme (light/dark mode) - END
|
||||
// Disable text area when clickthrough enabled - START
|
||||
enabled: GlobalStates.overlayOpen || !root.isClickthrough
|
||||
activeFocusOnTab: GlobalStates.overlayOpen || !root.isClickthrough
|
||||
// Disable text area when clickthrough enabled - END
|
||||
|
||||
// Release focus when clickthrough is enabled and overlay closes
|
||||
Connections {
|
||||
target: root
|
||||
function onIsClickthroughChanged() {
|
||||
if (root.isClickthrough && !GlobalStates.overlayOpen && stickypadInput.activeFocus) {
|
||||
stickypadInput.focus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: GlobalStates
|
||||
function onOverlayOpenChanged() {
|
||||
if (!GlobalStates.overlayOpen && root.isClickthrough && stickypadInput.activeFocus) {
|
||||
stickypadInput.focus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
// CUSTOM: Disable text area when clickthrough enabled - END
|
||||
|
||||
Keys.onPressed: (event) => {
|
||||
if (event.key === Qt.Key_Escape && event.modifiers === Qt.NoModifier) {
|
||||
Persistent.states.overlay.open = Persistent.states.overlay.open.filter(type => type !== "stickypad")
|
||||
event.accepted = true
|
||||
return
|
||||
}
|
||||
}
|
||||
onTextChanged: {
|
||||
if (stickypadInput.activeFocus) {
|
||||
saveDebounce.restart()
|
||||
|
||||
Reference in New Issue
Block a user