forked from Shinonome/dots-hyprland
region selector: make mode selection animated
This commit is contained in:
@@ -65,18 +65,16 @@ Toolbar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IconAndTextToolbarButton {
|
ToolbarTabBar {
|
||||||
iconText: "activity_zone"
|
id: tabBar
|
||||||
text: Translation.tr("Rect")
|
tabButtonList: [
|
||||||
toggled: root.selectionMode === RegionSelection.SelectionMode.RectCorners
|
{"icon": "activity_zone", "name": Translation.tr("Rect")},
|
||||||
onClicked: root.selectionMode = RegionSelection.SelectionMode.RectCorners
|
{"icon": "gesture", "name": Translation.tr("Circle")}
|
||||||
}
|
]
|
||||||
|
currentIndex: root.selectionMode === RegionSelection.SelectionMode.RectCorners ? 0 : 1
|
||||||
IconAndTextToolbarButton {
|
onCurrentIndexChanged: {
|
||||||
iconText: "gesture"
|
root.selectionMode = currentIndex === 0 ? RegionSelection.SelectionMode.RectCorners : RegionSelection.SelectionMode.Circle;
|
||||||
text: Translation.tr("Circle")
|
}
|
||||||
toggled: root.selectionMode === RegionSelection.SelectionMode.Circle
|
|
||||||
onClicked: root.selectionMode = RegionSelection.SelectionMode.Circle
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user