mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-14 23:34:01 -04:00
fix(surfaces): bar follows global opacity & misc ajustments/fixes
- Standard bars respond to the global surface opacity again - Island dash stays open when an edit-mode menu is used - Weather forecast chip and island level groove follow the foreground opacity - Control center tile icons follow blur and foreground settings like the slider icons - Restored the layer outline on control center tiles and slider rows - Hover popouts setting is visible for island bars - Bumped dank-qml-common
This commit is contained in:
+1
-1
Submodule dank-qml-common updated: 69859d278c...1d28494b71
@@ -48,6 +48,8 @@ Item {
|
||||
anchors.fill: parent
|
||||
radius: root.bodyRadius
|
||||
color: CcMetrics.tileInactiveColor
|
||||
border.width: Theme.layerOutlineWidth
|
||||
border.color: Theme.outlineMedium
|
||||
visible: root.tall
|
||||
}
|
||||
|
||||
@@ -62,7 +64,9 @@ Item {
|
||||
x: root.vertical ? (parent.width - width) / 2 : root.LayoutMirroring.enabled ? parent.width - width : 0
|
||||
y: root.vertical ? parent.height - height : root.tall ? 0 : (parent.height - height) / 2
|
||||
buttonSize: root.actionSize
|
||||
backgroundColor: root.tall ? Theme.chipSurface : CcMetrics.tileInactiveColor
|
||||
backgroundColor: CcMetrics.tileInactiveColor
|
||||
border.width: Theme.layerOutlineWidth
|
||||
border.color: Theme.outlineMedium
|
||||
iconName: root.iconName
|
||||
iconSize: CcMetrics.iconBoxIconSize
|
||||
iconColor: CcMetrics.tileInactiveContent
|
||||
|
||||
@@ -78,7 +78,7 @@ Item {
|
||||
readonly property color iconBoxColor: {
|
||||
if (!enabled)
|
||||
return Theme.onSurface_12;
|
||||
return active ? CcMetrics.tileActiveColor : Theme.chipSurface;
|
||||
return active ? CcMetrics.tileActiveColor : CcMetrics.tileInactiveColor;
|
||||
}
|
||||
|
||||
property real bodyRadius: bodyLayer.pressed ? Math.min(Theme.cornerRadiusM, width / 2, height / 2) : restRadius
|
||||
@@ -151,6 +151,8 @@ Item {
|
||||
anchors.fill: parent
|
||||
radius: root.bodyRadius
|
||||
color: root.bodyColor
|
||||
border.width: root.bodyActive ? 0 : Theme.layerOutlineWidth
|
||||
border.color: Theme.outlineMedium
|
||||
|
||||
Behavior on color {
|
||||
enabled: CcMetrics.animationsEnabled && !SettingsData.reduceMotion
|
||||
@@ -221,6 +223,8 @@ Item {
|
||||
height: width
|
||||
radius: root.hasIconBox ? root.iconBoxRadius : 0
|
||||
color: root.hasIconBox ? root.iconBoxColor : "transparent"
|
||||
border.width: root.hasIconBox && !root.active ? Theme.layerOutlineWidth : 0
|
||||
border.color: Theme.outlineMedium
|
||||
activeFocusOnTab: root.showExpand && root.toggle && root.acceptsInput
|
||||
Accessible.role: root.toggle ? Accessible.CheckBox : Accessible.Button
|
||||
Accessible.name: root.title
|
||||
|
||||
@@ -391,13 +391,8 @@ Item {
|
||||
|
||||
readonly property color _hostSurface: Theme.hostSurface
|
||||
readonly property string _barId: barConfig?.id ?? "default"
|
||||
property real _backgroundAlpha: SettingsData.barTransparency(barConfig)
|
||||
readonly property real _backgroundAlpha: SettingsData.barTransparency(barConfig)
|
||||
readonly property color _bgColor: (FrameTransitionState.effectiveFrameEnabled && usesFrameBarChrome) ? Theme.frameSurfaceColor : Theme.withAlpha(_hostSurface, _backgroundAlpha)
|
||||
|
||||
function _updateBackgroundAlpha() {
|
||||
const live = SettingsData.barConfigs.find(c => c.id === _barId);
|
||||
_backgroundAlpha = SettingsData.barTransparency(live ?? barConfig);
|
||||
}
|
||||
readonly property real _dpr: CompositorService.getScreenScale(barWindow.screen)
|
||||
|
||||
property string screenName: modelData.name
|
||||
@@ -480,7 +475,6 @@ Item {
|
||||
|
||||
Component.onCompleted: {
|
||||
updateGpuTempConfig();
|
||||
_updateBackgroundAlpha();
|
||||
_updateHasMaximizedToplevel();
|
||||
_updateShouldHideForWindows();
|
||||
}
|
||||
@@ -518,18 +512,10 @@ Item {
|
||||
|
||||
onRootWindowBarConfigChanged: {
|
||||
updateGpuTempConfig();
|
||||
_updateBackgroundAlpha();
|
||||
_updateHasMaximizedToplevel();
|
||||
_updateShouldHideForWindows();
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: SettingsData
|
||||
function onBarConfigsChanged() {
|
||||
barWindow._updateBackgroundAlpha();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: CompositorService
|
||||
function onToplevelsChanged() {
|
||||
|
||||
@@ -59,7 +59,7 @@ Rectangle {
|
||||
readonly property color muted: isCurrent ? Theme.withAlpha(Theme.onPrimaryContainer, DashMetrics.mutedAlpha) : Theme.onSurfaceVariant
|
||||
|
||||
radius: Theme.cornerRadiusL
|
||||
color: isCurrent ? Theme.withAlpha(Theme.primaryContainer, Theme.popupTransparency) : DashMetrics.chipColor
|
||||
color: isCurrent ? Theme.foregroundColor(Theme.primaryContainer, false) : DashMetrics.chipColor
|
||||
|
||||
Column {
|
||||
anchors.centerIn: parent
|
||||
|
||||
@@ -107,7 +107,7 @@ Item {
|
||||
anchors.bottom: parent.bottom
|
||||
width: root.trackThickness
|
||||
radius: Theme.cornerRadius
|
||||
color: Theme.withAlpha(Theme.outline, Theme.popupTransparency)
|
||||
color: Theme.withAlpha(Theme.outline, Theme.foregroundAlpha)
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
|
||||
@@ -215,10 +215,14 @@ QtObject {
|
||||
}
|
||||
|
||||
function setEditing(activityId, editing) {
|
||||
if (editing)
|
||||
if (editing) {
|
||||
editingActivity = activityId;
|
||||
else if (editingActivity === activityId)
|
||||
// Option sheets open child popups; a hover peek would collapse under them
|
||||
hoverExpanded = false;
|
||||
hoverCloseTimer.stop();
|
||||
} else if (editingActivity === activityId) {
|
||||
editingActivity = "";
|
||||
}
|
||||
}
|
||||
|
||||
function editGutterFor(activityId) {
|
||||
|
||||
@@ -366,7 +366,7 @@ Item {
|
||||
tags: ["bar", "hover", "popout", "reveal", "widget", "delay"]
|
||||
iconName: "touch_app"
|
||||
title: I18n.tr("Hover popouts")
|
||||
visible: (bar.selectedBarConfig?.enabled ?? false) && !bar.selectedBarIsIsland
|
||||
visible: bar.selectedBarConfig?.enabled ?? false
|
||||
enabled: !(bar.selectedBarConfig?.clickThrough ?? false)
|
||||
opacity: (bar.selectedBarConfig?.clickThrough ?? false) ? 0.5 : 1.0
|
||||
checked: bar.selectedBarConfig?.hoverPopouts ?? false
|
||||
|
||||
Reference in New Issue
Block a user