mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
MainScreen: add onEnterPressed() as shortcut
This commit is contained in:
@@ -131,9 +131,7 @@ Loader {
|
||||
anchors.bottomMargin: (Settings.data.general.compactLockScreen ? 280 : 360) * Style.uiScaleRatio
|
||||
radius: Style.radiusL
|
||||
color: Color.mTertiary
|
||||
border.color: Color.mTertiary
|
||||
border.width: Style.borderS
|
||||
visible: lockContext.showInfo && lockContext.infoMessage
|
||||
visible: lockContext.showInfo && lockContext.infoMessage && panelComponent.timerActive
|
||||
opacity: visible ? 1.0 : 0.0
|
||||
|
||||
RowLayout {
|
||||
@@ -172,9 +170,7 @@ Loader {
|
||||
anchors.bottomMargin: (Settings.data.general.compactLockScreen ? 280 : 360) * Style.uiScaleRatio
|
||||
radius: Style.radiusL
|
||||
color: Color.mError
|
||||
border.color: Color.mError
|
||||
border.width: Style.borderS
|
||||
visible: lockContext.showFailure && lockContext.errorMessage
|
||||
visible: lockContext.showFailure && lockContext.errorMessage && panelComponent.timerActive
|
||||
opacity: visible ? 1.0 : 0.0
|
||||
|
||||
RowLayout {
|
||||
|
||||
@@ -455,6 +455,12 @@ PanelWindow {
|
||||
onActivated: PanelService.openedPanel.onReturnPressed()
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Enter"
|
||||
enabled: root.isPanelOpen && (PanelService.openedPanel.onEnterPressed !== undefined)
|
||||
onActivated: PanelService.openedPanel.onEnterPressed()
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Left"
|
||||
enabled: root.isPanelOpen && (PanelService.openedPanel.onLeftPressed !== undefined)
|
||||
|
||||
@@ -302,6 +302,10 @@ SmartPanel {
|
||||
activate();
|
||||
}
|
||||
|
||||
function onEnterPressed() {
|
||||
activate();
|
||||
}
|
||||
|
||||
function onHomePressed() {
|
||||
selectFirst();
|
||||
}
|
||||
|
||||
@@ -416,6 +416,10 @@ SmartPanel {
|
||||
activate();
|
||||
}
|
||||
|
||||
function onEnterPressed() {
|
||||
activate();
|
||||
}
|
||||
|
||||
function onHomePressed() {
|
||||
selectFirst();
|
||||
}
|
||||
|
||||
@@ -225,6 +225,12 @@ SmartPanel {
|
||||
}
|
||||
}
|
||||
|
||||
function onEnterPressed() {
|
||||
if (_settingsContent && _settingsContent.searchText.trim() !== "") {
|
||||
_settingsContent.searchActivate();
|
||||
}
|
||||
}
|
||||
|
||||
function onPageUpPressed() {
|
||||
scrollPageUp();
|
||||
}
|
||||
|
||||
@@ -119,6 +119,25 @@ SmartPanel {
|
||||
}
|
||||
}
|
||||
|
||||
function onEnterPressed() {
|
||||
if (!contentItem)
|
||||
return;
|
||||
let view = contentItem.screenRepeater.itemAt(contentItem.currentScreenIndex);
|
||||
if (view?.gridView?.activeFocus) {
|
||||
let gridView = view.gridView;
|
||||
if (gridView.currentIndex >= 0 && gridView.currentIndex < gridView.model.length) {
|
||||
let item = gridView.model[gridView.currentIndex];
|
||||
if (item.isDirectory) {
|
||||
WallpaperService.setBrowsePath(view.targetScreen.name, item.path);
|
||||
} else if (Settings.data.wallpaper.setWallpaperOnAllMonitors) {
|
||||
WallpaperService.changeWallpaper(item.path, undefined);
|
||||
} else {
|
||||
WallpaperService.changeWallpaper(item.path, view.targetScreen.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
panelContent: Rectangle {
|
||||
id: panelContent
|
||||
|
||||
|
||||
Reference in New Issue
Block a user