1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-14 01:32:29 -04:00

theme: fix popup transparency setting

This commit is contained in:
bbedward
2026-02-03 21:06:15 -05:00
parent c024c1b8e4
commit 44292c3b55
40 changed files with 111 additions and 73 deletions

View File

@@ -11,6 +11,16 @@ StyledRect {
KeyNavigation.tab: keyNavigationTab
KeyNavigation.backtab: keyNavigationBacktab
function checkParentDisablesTransparency() {
let p = parent;
while (p) {
if (p.disablePopupTransparency === true)
return true;
p = p.parent;
}
return false;
}
property alias text: textInput.text
property string placeholderText: ""
property alias font: textInput.font
@@ -26,7 +36,8 @@ StyledRect {
property bool showClearButton: false
property bool showPasswordToggle: false
property bool passwordVisible: false
property color backgroundColor: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
property bool usePopupTransparency: !checkParentDisablesTransparency()
property color backgroundColor: usePopupTransparency ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : Theme.surfaceContainerHigh
property color focusedBorderColor: Theme.primary
property color normalBorderColor: Theme.outlineMedium
property color placeholderColor: Theme.outlineButton