mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-05-29 17:12:04 +00:00
New windowing system
Large commit that totally refactor of the way we handle the bar and panels. Testing should focus on Panels, Bar, Keyboard Focus, IPC calls. Changes brief: - One NFullScreenWindow per screen which handle it's bar and dedicated panels. - Added shadows - Reintroduced dimming - New panels animations - Proper Z ordering - Panels on overlay laywer is not reimplemented, if we do it then the bar will be on the Overlay too - Panel dragging was not reimplemented, to be discussed before reimplementing - Still a WIP, need to work more on shadows and polishing + debugging.
This commit is contained in:
@@ -15,9 +15,9 @@ NPanel {
|
||||
|
||||
preferredWidth: 400 * Style.uiScaleRatio
|
||||
preferredHeight: 340 * Style.uiScaleRatio
|
||||
|
||||
panelAnchorHorizontalCenter: true
|
||||
panelAnchorVerticalCenter: true
|
||||
panelKeyboardFocus: true
|
||||
|
||||
// Timer properties
|
||||
property int timerDuration: 9000 // 9 seconds
|
||||
@@ -148,6 +148,52 @@ NPanel {
|
||||
}
|
||||
}
|
||||
|
||||
// Override keyboard handlers from NPanel
|
||||
function onEscapePressed() {
|
||||
if (timerActive) {
|
||||
cancelTimer()
|
||||
} else {
|
||||
cancelTimer()
|
||||
close()
|
||||
}
|
||||
}
|
||||
|
||||
function onTabPressed() {
|
||||
selectNextWrapped()
|
||||
}
|
||||
|
||||
function onShiftTabPressed() {
|
||||
selectPreviousWrapped()
|
||||
}
|
||||
|
||||
function onUpPressed() {
|
||||
selectPreviousWrapped()
|
||||
}
|
||||
|
||||
function onDownPressed() {
|
||||
selectNextWrapped()
|
||||
}
|
||||
|
||||
function onReturnPressed() {
|
||||
activate()
|
||||
}
|
||||
|
||||
function onHomePressed() {
|
||||
selectFirst()
|
||||
}
|
||||
|
||||
function onEndPressed() {
|
||||
selectLast()
|
||||
}
|
||||
|
||||
function onCtrlJPressed() {
|
||||
selectNextWrapped()
|
||||
}
|
||||
|
||||
function onCtrlKPressed() {
|
||||
selectPreviousWrapped()
|
||||
}
|
||||
|
||||
// Countdown timer
|
||||
Timer {
|
||||
id: countdownTimer
|
||||
@@ -165,81 +211,6 @@ NPanel {
|
||||
id: ui
|
||||
color: Color.transparent
|
||||
|
||||
// Keyboard shortcuts
|
||||
Shortcut {
|
||||
sequence: "Ctrl+K"
|
||||
onActivated: ui.selectPreviousWrapped()
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Ctrl+J"
|
||||
onActivated: ui.selectNextWrapped()
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Up"
|
||||
onActivated: ui.selectPreviousWrapped()
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Down"
|
||||
onActivated: ui.selectNextWrapped()
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Shift+Tab"
|
||||
onActivated: ui.selectPreviousWrapped()
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Tab"
|
||||
onActivated: ui.selectNextWrapped()
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Home"
|
||||
onActivated: ui.selectFirst()
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "End"
|
||||
onActivated: ui.selectLast()
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Return"
|
||||
onActivated: ui.activate()
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Enter"
|
||||
onActivated: ui.activate()
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: "Escape"
|
||||
onActivated: {
|
||||
if (timerActive) {
|
||||
cancelTimer()
|
||||
} else {
|
||||
cancelTimer()
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
context: Qt.WidgetShortcut
|
||||
enabled: root.opened
|
||||
}
|
||||
|
||||
// Navigation functions
|
||||
function selectFirst() {
|
||||
root.selectFirst()
|
||||
|
||||
Reference in New Issue
Block a user