make region selector use materialshape instead of materialcookie

This commit is contained in:
end-4
2025-10-30 11:42:54 +01:00
parent 40b1e8297f
commit 5c71c53787
@@ -23,13 +23,25 @@ Toolbar {
// Signals // Signals
signal dismiss() signal dismiss()
MaterialCookie { MaterialShape {
Layout.fillHeight: true Layout.fillHeight: true
Layout.leftMargin: 2 Layout.leftMargin: 2
Layout.rightMargin: 2 Layout.rightMargin: 2
implicitSize: 36 // Intentionally smaller because this one is brighter than others implicitSize: 36 // Intentionally smaller because this one is brighter than others
sides: 10 shape: switch (root.action) {
amplitude: implicitSize / 44 case RegionSelection.SnipAction.Copy:
case RegionSelection.SnipAction.Edit:
return MaterialShape.Shape.Cookie4Sided;
case RegionSelection.SnipAction.Search:
return MaterialShape.Shape.Pentagon;
case RegionSelection.SnipAction.CharRecognition:
return MaterialShape.Shape.Sunny;
case RegionSelection.SnipAction.Record:
case RegionSelection.SnipAction.RecordWithSound:
return MaterialShape.Shape.Gem;
default:
return MaterialShape.Shape.Cookie12Sided;
}
color: Appearance.colors.colPrimary color: Appearance.colors.colPrimary
MaterialSymbol { MaterialSymbol {
anchors.centerIn: parent anchors.centerIn: parent