mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 16:02:51 -05:00
fix: DankBar binding loop & sth transparency
This commit is contained in:
@@ -621,7 +621,7 @@ PanelWindow {
|
|||||||
DankBarContent {
|
DankBarContent {
|
||||||
id: topBarContent
|
id: topBarContent
|
||||||
barWindow: barWindow
|
barWindow: barWindow
|
||||||
rootWindow: rootWindow
|
rootWindow: barWindow.rootWindow
|
||||||
barConfig: barWindow.barConfig
|
barConfig: barWindow.barConfig
|
||||||
leftWidgetsModel: barWindow.leftWidgetsModel
|
leftWidgetsModel: barWindow.leftWidgetsModel
|
||||||
centerWidgetsModel: barWindow.centerWidgetsModel
|
centerWidgetsModel: barWindow.centerWidgetsModel
|
||||||
|
|||||||
@@ -200,10 +200,10 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const baseColor = Theme.widgetBaseBackgroundColor;
|
const baseColor = Theme.widgetBaseBackgroundColor;
|
||||||
if (Theme.widgetBackgroundHasAlpha) {
|
|
||||||
return baseColor;
|
|
||||||
}
|
|
||||||
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
||||||
|
if (Theme.widgetBackgroundHasAlpha) {
|
||||||
|
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * transparency);
|
||||||
|
}
|
||||||
return Theme.withAlpha(baseColor, transparency);
|
return Theme.withAlpha(baseColor, transparency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,10 +130,10 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const baseColor = Theme.widgetBaseBackgroundColor;
|
const baseColor = Theme.widgetBaseBackgroundColor;
|
||||||
if (Theme.widgetBackgroundHasAlpha) {
|
|
||||||
return baseColor;
|
|
||||||
}
|
|
||||||
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
||||||
|
if (Theme.widgetBackgroundHasAlpha) {
|
||||||
|
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * transparency);
|
||||||
|
}
|
||||||
return Theme.withAlpha(baseColor, transparency);
|
return Theme.withAlpha(baseColor, transparency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -601,10 +601,10 @@ Item {
|
|||||||
if ((barConfig?.noBackground ?? false))
|
if ((barConfig?.noBackground ?? false))
|
||||||
return "transparent";
|
return "transparent";
|
||||||
const baseColor = Theme.widgetBaseBackgroundColor;
|
const baseColor = Theme.widgetBaseBackgroundColor;
|
||||||
if (Theme.widgetBackgroundHasAlpha) {
|
|
||||||
return baseColor;
|
|
||||||
}
|
|
||||||
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
||||||
|
if (Theme.widgetBackgroundHasAlpha) {
|
||||||
|
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * transparency);
|
||||||
|
}
|
||||||
return Theme.withAlpha(baseColor, transparency);
|
return Theme.withAlpha(baseColor, transparency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,10 +94,10 @@ Item {
|
|||||||
|
|
||||||
const isHovered = mouseArea.containsMouse || (root.isHovered || false);
|
const isHovered = mouseArea.containsMouse || (root.isHovered || false);
|
||||||
const baseColor = isHovered ? Theme.widgetBaseHoverColor : Theme.widgetBaseBackgroundColor;
|
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;
|
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
||||||
|
if (Theme.widgetBackgroundHasAlpha) {
|
||||||
|
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * transparency);
|
||||||
|
}
|
||||||
return Theme.withAlpha(baseColor, transparency);
|
return Theme.withAlpha(baseColor, transparency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user