mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge branch 'main' of https://github.com/noctalia-dev/noctalia-shell
This commit is contained in:
+6
-3
@@ -329,15 +329,18 @@ 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 alpha = Math.max(targetOpacity, minAlpha);
|
||||
let alpha = Math.max(root.panelBackgroundOpacity, minAlpha);
|
||||
|
||||
// Combine with the base color's existing alpha
|
||||
let resultAlpha = Math.max(0, baseColor.a - (1.0 - alpha));
|
||||
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
|
||||
|
||||
@@ -189,7 +189,7 @@ Singleton {
|
||||
// Logger.e("BatteryDebug", "Available Battery count: " + laptopBatteries.length); // can be useful for debugging
|
||||
if (laptopBatteries.length > 1 && device.nativePath) {
|
||||
if (device.nativePath === "DisplayDevice") {
|
||||
return "All batteries (combined)"; // TODO: i18n
|
||||
return I18n.tr("battery.all-batteries");
|
||||
}
|
||||
var match = device.nativePath.match(/(\d+)$/);
|
||||
if (match) {
|
||||
|
||||
Reference in New Issue
Block a user