Skip to content

Commit 070dc54

Browse files
committed
Show only one set of extra sliders at a time
Improves use of vertical space on mobile
1 parent 543c688 commit 070dc54

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

src/kirigami_ui/EditorToolbar.qml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,19 @@ ToolBar {
776776
checkable: true
777777
checked: showFontSpacingOptions
778778
onClicked: {
779-
showFontSpacingOptions = !showFontSpacingOptions
779+
if (showAnimationConfigOptions) {
780+
showAnimationConfigOptions = false;
781+
fontSpacingOptionsTimer.start();
782+
}
783+
else
784+
showFontSpacingOptions = !showFontSpacingOptions;
785+
}
786+
Timer {
787+
id: fontSpacingOptionsTimer
788+
interval: 250
789+
onTriggered: {
790+
showFontSpacingOptions = !showAnimationConfigOptions;
791+
}
780792
}
781793
}
782794
ToolButton {
@@ -788,7 +800,19 @@ ToolBar {
788800
checkable: true
789801
checked: showAnimationConfigOptions
790802
onClicked: {
791-
showAnimationConfigOptions = !showAnimationConfigOptions
803+
if (showFontSpacingOptions) {
804+
showFontSpacingOptions = false;
805+
openAnimationConfigTimer.start();
806+
}
807+
else
808+
showAnimationConfigOptions = !showAnimationConfigOptions;
809+
}
810+
Timer {
811+
id: openAnimationConfigTimer
812+
interval: 250
813+
onTriggered: {
814+
showAnimationConfigOptions = !showAnimationConfigOptions;
815+
}
792816
}
793817
}
794818
//ToolButton {

0 commit comments

Comments
 (0)