mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Merge branch 'main' of https://github.com/noctalia-dev/noctalia-shell
This commit is contained in:
@@ -213,7 +213,8 @@
|
||||
"respectExpireTimeout": false,
|
||||
"lowUrgencyDuration": 3,
|
||||
"normalUrgencyDuration": 8,
|
||||
"criticalUrgencyDuration": 15
|
||||
"criticalUrgencyDuration": 15,
|
||||
"enableKeyboardLayoutToast": true
|
||||
},
|
||||
"osd": {
|
||||
"enabled": true,
|
||||
|
||||
@@ -206,6 +206,14 @@ PopupWindow {
|
||||
if (modelData && !modelData.isSeparator && !modelData.hasChildren) {
|
||||
modelData.triggered()
|
||||
root.hideMenu()
|
||||
|
||||
// Close the drawer if it's open
|
||||
if (screen) {
|
||||
const panel = PanelService.getPanel("trayDrawerPanel", screen)
|
||||
if (panel && panel.visible) {
|
||||
panel.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ Item {
|
||||
forceOpen: !isBarVertical && root.displayMode === "alwaysShow"
|
||||
forceClose: isBarVertical || root.displayMode === "alwaysHide" || BluetoothService.connectedDevices.length === 0
|
||||
onClicked: PanelService.getPanel("bluetoothPanel", screen)?.toggle(this)
|
||||
onRightClicked: PanelService.getPanel("bluetoothPanel", screen)?.toggle(this)
|
||||
onRightClicked: BluetoothService.setBluetoothEnabled(!BluetoothService.enabled)
|
||||
tooltipText: {
|
||||
if (pill.text !== "") {
|
||||
return pill.text
|
||||
|
||||
@@ -78,7 +78,7 @@ Item {
|
||||
forceOpen: !isBarVertical && root.displayMode === "alwaysShow"
|
||||
forceClose: isBarVertical || root.displayMode === "alwaysHide" || !pill.text
|
||||
onClicked: PanelService.getPanel("wifiPanel", screen)?.toggle(this)
|
||||
onRightClicked: PanelService.getPanel("wifiPanel", screen)?.toggle(this)
|
||||
onRightClicked: NetworkService.setWifiEnabled(!Settings.data.network.wifiEnabled)
|
||||
tooltipText: {
|
||||
if (pill.text !== "") {
|
||||
return pill.text
|
||||
|
||||
@@ -63,7 +63,11 @@ PanelWindow {
|
||||
if (CompositorService.isNiri) {
|
||||
return root.isPanelOpen ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
|
||||
} else {
|
||||
return root.isPanelOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||
if (!root.isPanelOpen) {
|
||||
return WlrKeyboardFocus.None
|
||||
} else {
|
||||
return PanelService.openedPanel.exclusiveKeyboard ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.OnDemand
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ Item {
|
||||
// Edge snapping: if panel is within this distance (in pixels) from a screen edge, snap
|
||||
property real edgeSnapDistance: 50
|
||||
|
||||
// Edge snapping: if panel is within this distance (in pixels) from a screen edge, snap
|
||||
property bool exclusiveKeyboard: false
|
||||
|
||||
// Track whether panel is open
|
||||
property bool isPanelOpen: false
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import qs.Commons
|
||||
import qs.Modules.MainScreen
|
||||
import qs.Modules.Panels.ControlCenter.Cards
|
||||
import qs.Services.Location
|
||||
import qs.Services.System
|
||||
import qs.Services.UI
|
||||
import qs.Widgets
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ NIconButtonHot {
|
||||
|
||||
icon: BluetoothService.enabled ? "bluetooth" : "bluetooth-off"
|
||||
tooltipText: I18n.tr("quickSettings.bluetooth.tooltip.action")
|
||||
onClicked: {
|
||||
PanelService.getPanel("bluetoothPanel", screen)?.toggle(this)
|
||||
}
|
||||
onClicked: PanelService.getPanel("bluetoothPanel", screen)?.toggle(this)
|
||||
onRightClicked: BluetoothService.setBluetoothEnabled(!BluetoothService.enabled)
|
||||
}
|
||||
|
||||
@@ -31,4 +31,5 @@ NIconButtonHot {
|
||||
|
||||
tooltipText: I18n.tr("quickSettings.wifi.tooltip.action")
|
||||
onClicked: PanelService.getPanel("wifiPanel", screen)?.toggle(this)
|
||||
onRightClicked: NetworkService.setWifiEnabled(!Settings.data.network.wifiEnabled)
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ SmartPanel {
|
||||
preferredWidthRatio: 0.3
|
||||
preferredHeightRatio: 0.5
|
||||
|
||||
exclusiveKeyboard: true
|
||||
|
||||
panelBackgroundColor: Qt.alpha(Color.mSurface, Settings.data.appLauncher.backgroundOpacity)
|
||||
|
||||
// Positioning
|
||||
|
||||
@@ -74,7 +74,7 @@ SmartPanel {
|
||||
readonly property int columns: Math.max(1, Math.min(maxColumns, itemCount))
|
||||
readonly property int rows: Math.max(1, Math.ceil(itemCount / Math.max(1, columns)))
|
||||
|
||||
// Add 2*gap margins around the grid
|
||||
// Static fallback sizes
|
||||
preferredWidth: (columns * cellSize) + ((columns - 1) * innerSpacing) + (2 * outerPadding)
|
||||
preferredHeight: (rows * cellSize) + ((rows - 1) * innerSpacing) + (2 * outerPadding)
|
||||
|
||||
@@ -120,6 +120,10 @@ SmartPanel {
|
||||
panelContent: Item {
|
||||
id: content
|
||||
|
||||
// Dynamic content sizing that SmartPanel will watch for changes
|
||||
property real contentPreferredWidth: (root.columns * root.cellSize) + ((root.columns - 1) * root.innerSpacing) + (2 * root.outerPadding)
|
||||
property real contentPreferredHeight: (root.rows * root.cellSize) + ((root.rows - 1) * root.innerSpacing) + (2 * root.outerPadding)
|
||||
|
||||
Grid {
|
||||
id: grid
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -30,7 +30,7 @@ Rectangle {
|
||||
signal clicked
|
||||
signal rightClicked
|
||||
signal middleClicked
|
||||
signal wheel
|
||||
signal wheel(int angleDelta)
|
||||
|
||||
implicitWidth: applyUiScale ? Math.round(baseSize * Style.uiScaleRatio) : Math.round(baseSize)
|
||||
implicitHeight: applyUiScale ? Math.round(baseSize * Style.uiScaleRatio) : Math.round(baseSize)
|
||||
|
||||
Reference in New Issue
Block a user