1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

meta: transparency fixes

- fixes #949 - transparency not working > 95%
- fixes #947 - dont apply opacity to windows, defer to window-rules
This commit is contained in:
bbedward
2025-12-08 11:43:29 -05:00
parent cd580090dc
commit bb7f7083b9
19 changed files with 105 additions and 135 deletions

View File

@@ -1,5 +1,4 @@
import QtQuick
import Quickshell.Wayland
import qs.Common
import qs.Widgets
@@ -25,7 +24,7 @@ DankPopout {
id: popoutContainer
implicitHeight: popoutColumn.implicitHeight + Theme.spacingL * 2
color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
color: "transparent"
radius: Theme.cornerRadius
border.width: 0
antialiasing: true
@@ -34,14 +33,14 @@ DankPopout {
Component.onCompleted: {
if (root.shouldBeVisible) {
forceActiveFocus()
forceActiveFocus();
}
}
Keys.onPressed: event => {
if (event.key === Qt.Key_Escape) {
root.close()
event.accepted = true
root.close();
event.accepted = true;
}
}
@@ -50,8 +49,8 @@ DankPopout {
function onShouldBeVisibleChanged() {
if (root.shouldBeVisible) {
Qt.callLater(() => {
popoutContainer.forceActiveFocus()
})
popoutContainer.forceActiveFocus();
});
}
}
}
@@ -70,12 +69,12 @@ DankPopout {
onLoaded: {
if (item && "closePopout" in item) {
item.closePopout = function() {
root.close()
}
item.closePopout = function () {
root.close();
};
}
if (item) {
root.contentHeight = Qt.binding(() => item.implicitHeight + Theme.spacingS * 2)
root.contentHeight = Qt.binding(() => item.implicitHeight + Theme.spacingS * 2);
}
}
}