mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-05 21:15:38 -05:00
bar: don't apply opacity to sth color
- legacy thing that already has it
This commit is contained in:
@@ -634,6 +634,11 @@ Singleton {
|
||||
|
||||
property real notepadTransparency: SettingsData.notepadTransparencyOverride >= 0 ? SettingsData.notepadTransparencyOverride : popupTransparency
|
||||
|
||||
property bool widgetBackgroundHasAlpha: {
|
||||
const colorMode = typeof SettingsData !== "undefined" ? SettingsData.widgetBackgroundColor : "sch"
|
||||
return colorMode === "sth"
|
||||
}
|
||||
|
||||
property var widgetBaseBackgroundColor: {
|
||||
const colorMode = typeof SettingsData !== "undefined" ? SettingsData.widgetBackgroundColor : "sch"
|
||||
switch (colorMode) {
|
||||
|
||||
@@ -151,6 +151,9 @@ Item {
|
||||
}
|
||||
|
||||
const baseColor = Theme.widgetBaseBackgroundColor
|
||||
if (Theme.widgetBackgroundHasAlpha) {
|
||||
return baseColor
|
||||
}
|
||||
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0
|
||||
return Theme.withAlpha(baseColor, transparency)
|
||||
}
|
||||
|
||||
@@ -88,6 +88,9 @@ Item {
|
||||
}
|
||||
|
||||
const baseColor = Theme.widgetBaseBackgroundColor;
|
||||
if (Theme.widgetBackgroundHasAlpha) {
|
||||
return baseColor;
|
||||
}
|
||||
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
||||
return Theme.withAlpha(baseColor, transparency);
|
||||
}
|
||||
|
||||
@@ -532,6 +532,9 @@ Item {
|
||||
if ((barConfig?.noBackground ?? false))
|
||||
return "transparent";
|
||||
const baseColor = Theme.widgetBaseBackgroundColor;
|
||||
if (Theme.widgetBackgroundHasAlpha) {
|
||||
return baseColor;
|
||||
}
|
||||
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
||||
return Theme.withAlpha(baseColor, transparency);
|
||||
}
|
||||
|
||||
@@ -51,6 +51,9 @@ Item {
|
||||
|
||||
const isHovered = mouseArea.containsMouse || (root.isHovered || false);
|
||||
const baseColor = isHovered ? Theme.widgetBaseHoverColor : Theme.widgetBaseBackgroundColor;
|
||||
if (Theme.widgetBackgroundHasAlpha) {
|
||||
return baseColor;
|
||||
}
|
||||
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
||||
return Theme.withAlpha(baseColor, transparency);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user