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:
Marco Allegretti 2026-04-08 19:08:23 +02:00
parent 7889e07815
commit a0dceaedc1
2 changed files with 18 additions and 0 deletions

View file

@ -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();

View file

@ -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();