mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Add right-click settings on homescreen background
Accept Qt.RightButton on the HomeScreenPages and FavouritesBar MouseAreas and open the settings view (wallpaper/widgets) on right-click, mirroring the existing long-press behavior for mouse users.
This commit is contained in:
parent
7889e07815
commit
a0dceaedc1
2 changed files with 18 additions and 0 deletions
|
|
@ -23,11 +23,20 @@ MouseArea {
|
|||
|
||||
signal delegateDragRequested(var item)
|
||||
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
||||
onPressAndHold: {
|
||||
folio.HomeScreenState.openSettingsView();
|
||||
haptics.buttonVibrate();
|
||||
}
|
||||
|
||||
onClicked: (mouse) => {
|
||||
// Right-click opens settings view (wallpaper/widgets), same as long-press
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
folio.HomeScreenState.openSettingsView();
|
||||
}
|
||||
}
|
||||
|
||||
onDoubleClicked: {
|
||||
if (folio.FolioSettings.doubleTapToLock) {
|
||||
deviceLock.triggerLock();
|
||||
|
|
|
|||
|
|
@ -20,11 +20,20 @@ MouseArea {
|
|||
readonly property real verticalMargin: Math.round((folio.HomeScreenState.pageHeight - folio.HomeScreenState.pageContentHeight) / 2)
|
||||
readonly property real horizontalMargin: Math.round((folio.HomeScreenState.pageWidth - folio.HomeScreenState.pageContentWidth) / 2)
|
||||
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
||||
onPressAndHold: {
|
||||
folio.HomeScreenState.openSettingsView()
|
||||
haptics.buttonVibrate();
|
||||
}
|
||||
|
||||
onClicked: (mouse) => {
|
||||
// Right-click opens settings view (wallpaper/widgets), same as long-press
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
folio.HomeScreenState.openSettingsView();
|
||||
}
|
||||
}
|
||||
|
||||
onDoubleClicked: {
|
||||
if (folio.FolioSettings.doubleTapToLock) {
|
||||
deviceLock.triggerLock();
|
||||
|
|
|
|||
Loading…
Reference in a new issue