mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
apply reduced light mode opacity to panel backgrounds
This commit is contained in:
+6
-2
@@ -329,8 +329,7 @@ Singleton {
|
||||
if (!Settings.data.ui.translucentWidgets)
|
||||
return baseColor;
|
||||
|
||||
let baseOpacity = Settings.data.ui.panelBackgroundOpacity;
|
||||
let targetOpacity = Settings.data.colorSchemes.darkMode ? baseOpacity : Math.pow(baseOpacity, 2);
|
||||
let targetOpacity = root.panelBackgroundOpacity
|
||||
let alpha = Math.max(targetOpacity, minAlpha);
|
||||
|
||||
// Combine with the base color's existing alpha
|
||||
@@ -338,6 +337,11 @@ Singleton {
|
||||
return Qt.alpha(baseColor, resultAlpha);
|
||||
}
|
||||
|
||||
readonly property real panelBackgroundOpacity: {
|
||||
let baseOpacity = Settings.data.ui.panelBackgroundOpacity;
|
||||
return Settings.data.colorSchemes.darkMode ? baseOpacity : Math.pow(baseOpacity, 2);
|
||||
}
|
||||
|
||||
readonly property var colorKeyModel: [
|
||||
{
|
||||
"key": "none",
|
||||
|
||||
@@ -38,7 +38,7 @@ Item {
|
||||
|
||||
// Enable layer caching to prevent continuous re-rendering
|
||||
layer.enabled: true
|
||||
opacity: Settings.data.ui.panelBackgroundOpacity
|
||||
opacity: Color.panelBackgroundOpacity
|
||||
|
||||
Shape {
|
||||
id: unifiedBackgroundsShape
|
||||
@@ -106,7 +106,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
|
||||
layer.enabled: true
|
||||
opacity: Settings.data.ui.panelBackgroundOpacity
|
||||
opacity: Color.panelBackgroundOpacity
|
||||
|
||||
Shape {
|
||||
id: panelBackgroundsShape
|
||||
|
||||
@@ -255,7 +255,7 @@ Variants {
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: -1
|
||||
fillColor: Qt.alpha(Color.mSurfaceVariant, Settings.data.ui.panelBackgroundOpacity)
|
||||
fillColor: Qt.alpha(Color.mSurfaceVariant, Color.panelBackgroundOpacity)
|
||||
|
||||
// Offset by radius to account for Shape's extended bounds
|
||||
startX: panelShape.radius + panelShape.radius * panelShape.tlMultX
|
||||
|
||||
@@ -82,7 +82,7 @@ NBox {
|
||||
|
||||
opacity: (NetworkService.disconnectingFrom === modelData.ssid || NetworkService.forgettingNetwork === modelData.ssid) ? 0.6 : 1.0
|
||||
|
||||
color: modelData.connected ? Qt.alpha(Color.mPrimary, Math.min(1.15 - Settings.data.ui.panelBackgroundOpacity, 0.75)) : Color.mSurface
|
||||
color: modelData.connected ? Qt.alpha(Color.mPrimary, Math.min(1.15 - Color.panelBackgroundOpacity, 0.75)) : Color.mSurface
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
|
||||
@@ -389,7 +389,7 @@ Item {
|
||||
radius: Style.radiusM
|
||||
clip: true
|
||||
|
||||
color: (modelData.connected && modelData.state !== BluetoothDeviceState.Disconnecting) ? Qt.alpha(Color.mPrimary, Math.min(1.15 - Settings.data.ui.panelBackgroundOpacity, 0.75)) : Color.mSurface
|
||||
color: (modelData.connected && modelData.state !== BluetoothDeviceState.Disconnecting) ? Qt.alpha(Color.mPrimary, Math.min(1.15 - Color.panelBackgroundOpacity, 0.75)) : Color.mSurface
|
||||
|
||||
ColumnLayout {
|
||||
id: deviceColumn
|
||||
|
||||
Reference in New Issue
Block a user