mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Shadows: conditional via settings
q
This commit is contained in:
@@ -884,6 +884,10 @@
|
||||
"dim-desktop": {
|
||||
"description": "Den Desktop abdunkeln, wenn Fenster oder Menüs geöffnet sind.",
|
||||
"label": "Dimmer Schreibtisch"
|
||||
},
|
||||
"shadows": {
|
||||
"description": "Aktiviert Schlagschatten unter Balken und Panels.",
|
||||
"label": "Schlagschatten"
|
||||
}
|
||||
},
|
||||
"lock-screen": {
|
||||
|
||||
@@ -859,6 +859,10 @@
|
||||
"description": "Changes the size of the general user interface, excluding the bar.",
|
||||
"reset-scaling": "Reset interface scaling"
|
||||
},
|
||||
"shadows": {
|
||||
"label": "Drop shadows",
|
||||
"description": "Enables drop shadows under bars and panels."
|
||||
},
|
||||
"dim-desktop": {
|
||||
"label": "Dim desktop",
|
||||
"description": "Dim the desktop when panels or menus are open."
|
||||
|
||||
@@ -884,6 +884,10 @@
|
||||
"dim-desktop": {
|
||||
"description": "Atenuar el escritorio cuando los paneles o menús estén abiertos.",
|
||||
"label": "Dim escritorio"
|
||||
},
|
||||
"shadows": {
|
||||
"description": "Habilita sombras paralelas debajo de las barras y los paneles.",
|
||||
"label": "Sombras paralelas"
|
||||
}
|
||||
},
|
||||
"lock-screen": {
|
||||
|
||||
@@ -884,6 +884,10 @@
|
||||
"dim-desktop": {
|
||||
"description": "Atténuer le bureau lorsque des panneaux ou des menus sont ouverts.",
|
||||
"label": "Dim bureau"
|
||||
},
|
||||
"shadows": {
|
||||
"description": "Active les ombres portées sous les barres et les panneaux.",
|
||||
"label": "Ombres portées"
|
||||
}
|
||||
},
|
||||
"lock-screen": {
|
||||
|
||||
@@ -884,6 +884,10 @@
|
||||
"dim-desktop": {
|
||||
"description": "Escurecer a área de trabalho quando painéis ou menus estiverem abertos.",
|
||||
"label": "Dim área de trabalho"
|
||||
},
|
||||
"shadows": {
|
||||
"description": "Ativa sombras projetadas sob barras e painéis.",
|
||||
"label": "Sombras projetadas"
|
||||
}
|
||||
},
|
||||
"lock-screen": {
|
||||
|
||||
@@ -884,6 +884,10 @@
|
||||
"dim-desktop": {
|
||||
"description": "当面板或菜单打开时,桌面变暗。",
|
||||
"label": "昏暗的桌面"
|
||||
},
|
||||
"shadows": {
|
||||
"description": "启用条形图和面板下的阴影。",
|
||||
"label": "阴影"
|
||||
}
|
||||
},
|
||||
"lock-screen": {
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
"floating": false,
|
||||
"marginVertical": 0.25,
|
||||
"marginHorizontal": 0.25,
|
||||
"outerCorners": true,
|
||||
"exclusive": true,
|
||||
"widgets": {
|
||||
"left": [
|
||||
{
|
||||
@@ -57,6 +59,7 @@
|
||||
},
|
||||
"general": {
|
||||
"avatarImage": "",
|
||||
"dimDesktop": true,
|
||||
"showScreenCorners": false,
|
||||
"forceBlackScreenCorners": false,
|
||||
"scaleRatio": 1,
|
||||
@@ -66,8 +69,18 @@
|
||||
"animationDisabled": false,
|
||||
"compactLockScreen": false,
|
||||
"lockOnSuspend": true,
|
||||
"enableShadows": true,
|
||||
"language": ""
|
||||
},
|
||||
"ui": {
|
||||
"fontDefault": "Roboto",
|
||||
"fontFixed": "DejaVu Sans Mono",
|
||||
"fontDefaultScale": 1,
|
||||
"fontFixedScale": 1,
|
||||
"tooltipsEnabled": true,
|
||||
"panelsAttachedToBar": true,
|
||||
"panelsOverlayLayer": true
|
||||
},
|
||||
"location": {
|
||||
"name": "Tokyo",
|
||||
"weatherEnabled": true,
|
||||
@@ -212,15 +225,6 @@
|
||||
"mprisBlacklist": [],
|
||||
"preferredPlayer": ""
|
||||
},
|
||||
"ui": {
|
||||
"fontDefault": "Roboto",
|
||||
"fontFixed": "DejaVu Sans Mono",
|
||||
"fontDefaultScale": 1,
|
||||
"fontFixedScale": 1,
|
||||
"tooltipsEnabled": true,
|
||||
"panelsAttachedToBar": true,
|
||||
"panelsOverlayLayer": true
|
||||
},
|
||||
"brightness": {
|
||||
"brightnessStep": 5,
|
||||
"enforceMinimum": true
|
||||
@@ -239,6 +243,7 @@
|
||||
"gtk": false,
|
||||
"qt": false,
|
||||
"kcolorscheme": false,
|
||||
"alacritty": false,
|
||||
"kitty": false,
|
||||
"ghostty": false,
|
||||
"foot": false,
|
||||
|
||||
+15
-13
@@ -54,8 +54,9 @@ Singleton {
|
||||
// This should only be activated once when the settings structure has changed
|
||||
// Then it should be commented out again, regular users don't need to generate
|
||||
// default settings on every start
|
||||
// TODO: automate this someday!
|
||||
//generateDefaultSettings()
|
||||
if (isDebug) {
|
||||
generateDefaultSettings()
|
||||
}
|
||||
|
||||
// Patch-in the local default, resolved to user's home
|
||||
adapter.general.avatarImage = defaultAvatar
|
||||
@@ -198,9 +199,21 @@ Singleton {
|
||||
property bool animationDisabled: false
|
||||
property bool compactLockScreen: false
|
||||
property bool lockOnSuspend: true
|
||||
property bool enableShadows: true
|
||||
property string language: ""
|
||||
}
|
||||
|
||||
// ui
|
||||
property JsonObject ui: JsonObject {
|
||||
property string fontDefault: "Roboto"
|
||||
property string fontFixed: "DejaVu Sans Mono"
|
||||
property real fontDefaultScale: 1.0
|
||||
property real fontFixedScale: 1.0
|
||||
property bool tooltipsEnabled: true
|
||||
property bool panelsAttachedToBar: true
|
||||
property bool panelsOverlayLayer: true
|
||||
}
|
||||
|
||||
// location
|
||||
property JsonObject location: JsonObject {
|
||||
property string name: defaultLocation
|
||||
@@ -353,17 +366,6 @@ Singleton {
|
||||
property string preferredPlayer: ""
|
||||
}
|
||||
|
||||
// ui
|
||||
property JsonObject ui: JsonObject {
|
||||
property string fontDefault: "Roboto"
|
||||
property string fontFixed: "DejaVu Sans Mono"
|
||||
property real fontDefaultScale: 1.0
|
||||
property real fontFixedScale: 1.0
|
||||
property bool tooltipsEnabled: true
|
||||
property bool panelsAttachedToBar: true
|
||||
property bool panelsOverlayLayer: true
|
||||
}
|
||||
|
||||
// brightness
|
||||
property JsonObject brightness: JsonObject {
|
||||
property int brightnessStep: 5
|
||||
|
||||
@@ -40,6 +40,13 @@ ColumnLayout {
|
||||
onToggled: checked => Settings.data.ui.panelsAttachedToBar = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.user-interface.shadows.label")
|
||||
description: I18n.tr("settings.user-interface.shadows.description")
|
||||
checked: Settings.data.general.enableShadows
|
||||
onToggled: checked => Settings.data.general.enableShadows = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.user-interface.panels-overlay.label")
|
||||
description: I18n.tr("settings.user-interface.panels-overlay.description")
|
||||
|
||||
@@ -16,7 +16,6 @@ PanelWindow {
|
||||
required property var panelComponents
|
||||
|
||||
// Shadow properties
|
||||
property bool shadowEnabled: true
|
||||
property real shadowOpacity: 1.0
|
||||
property real shadowBlur: 1.0
|
||||
property real shadowHorizontalOffset: 2
|
||||
@@ -193,14 +192,14 @@ PanelWindow {
|
||||
height: root.height
|
||||
|
||||
// Apply shadow effect
|
||||
layer.enabled: root.shadowEnabled
|
||||
layer.enabled: Settings.data.general.enableShadows
|
||||
layer.smooth: true
|
||||
// layer.textureSize: {
|
||||
// var dpr = CompositorService.getDisplayScale(screen.name)
|
||||
// return Qt.size(width * dpr, height * dpr)
|
||||
// }
|
||||
layer.effect: MultiEffect {
|
||||
shadowEnabled: root.shadowEnabled
|
||||
shadowEnabled: true
|
||||
shadowOpacity: root.shadowOpacity
|
||||
shadowHorizontalOffset: root.shadowHorizontalOffset
|
||||
shadowVerticalOffset: root.shadowVerticalOffset
|
||||
@@ -213,7 +212,7 @@ PanelWindow {
|
||||
// Always positioned at actual screen edges
|
||||
Loader {
|
||||
id: screenCornersLoader
|
||||
active: Settings.data.general.showScreenCorners && (!Settings.data.ui.panelsAttachedToBar || Settings.data.bar.backgroundOpacity >= 1 || Settings.data.bar.floating)
|
||||
active: Settings.data.general.showScreenCorners
|
||||
|
||||
anchors.fill: parent
|
||||
z: 1000 // Very high z-index to be on top of everything
|
||||
|
||||
+18
-5
@@ -52,6 +52,7 @@ Item {
|
||||
|
||||
// Animation properties
|
||||
property real animationProgress: 0
|
||||
property bool isClosing: false
|
||||
|
||||
// Keyboard event handlers - override these in specific panels to handle shortcuts
|
||||
// These are called from NFullScreenWindow's centralized shortcuts
|
||||
@@ -76,6 +77,13 @@ Item {
|
||||
NumberAnimation {
|
||||
duration: Style.animationFast
|
||||
easing.type: Easing.OutCubic
|
||||
onRunningChanged: {
|
||||
// When close animation finishes, actually hide the panel
|
||||
if (!running && root.isClosing) {
|
||||
root.isClosing = false
|
||||
root.isPanelOpen = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +114,8 @@ Item {
|
||||
signal closed
|
||||
|
||||
// Panel visibility and sizing
|
||||
visible: isPanelOpen
|
||||
// Keep visible during close animation
|
||||
visible: isPanelOpen || isClosing
|
||||
width: parent ? parent.width : 0
|
||||
height: parent ? parent.height : 0
|
||||
|
||||
@@ -156,15 +165,18 @@ Item {
|
||||
}
|
||||
|
||||
function close() {
|
||||
isPanelOpen = false
|
||||
// Start close animation
|
||||
isClosing = true
|
||||
animationProgress = 0
|
||||
|
||||
// Notify PanelService
|
||||
// Notify PanelService immediately
|
||||
PanelService.closedPanel(root)
|
||||
|
||||
// Emit closed signal
|
||||
closed()
|
||||
|
||||
Logger.d("NPanel", "Closed panel", objectName)
|
||||
Logger.d("NPanel", "Closing panel with animation", objectName)
|
||||
// isPanelOpen will be set to false when animation completes
|
||||
}
|
||||
|
||||
function setPosition() {// Position calculation will be handled here
|
||||
@@ -175,7 +187,8 @@ Item {
|
||||
Loader {
|
||||
id: panelContentContainer
|
||||
anchors.fill: parent
|
||||
active: root.isPanelOpen
|
||||
// Keep active during close animation
|
||||
active: root.isPanelOpen || root.isClosing
|
||||
asynchronous: false
|
||||
|
||||
sourceComponent: Item {
|
||||
|
||||
Reference in New Issue
Block a user