This commit is contained in:
Zacharias-Brohn
2026-03-14 17:29:24 +01:00
parent 8bc7826f26
commit f7b7260780
14 changed files with 635 additions and 77 deletions
+23 -1
View File
@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Layouts
import qs.Config
import qs.Helpers
Row {
id: root
@@ -29,8 +30,29 @@ Row {
property int type: CustomSplitButton.Filled
property real verticalPadding: Appearance.padding.smaller
function closeDropdown(): void {
SettingsDropdowns.close(menu);
}
function openDropdown(): void {
if (root.disabled)
return;
SettingsDropdowns.open(menu, root);
}
function toggleDropdown(): void {
if (root.disabled)
return;
SettingsDropdowns.toggle(menu, root);
}
spacing: Math.floor(Appearance.spacing.small / 2)
onExpandedChanged: {
if (!expanded)
SettingsDropdowns.forget(menu);
}
CustomRect {
bottomRightRadius: Appearance.rounding.small / 2
color: root.disabled ? root.disabledColor : root.color
@@ -109,7 +131,7 @@ Row {
id: expandStateLayer
function onClicked(): void {
root.expanded = !root.expanded;
root.toggleDropdown();
}
color: root.textColor