mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
Refactor rotation button layout to use Grid
Replaced the `<StackPanel>` with a `<Grid>` for better layout control and flexibility. Added `<ColumnDefinition>` elements to structure the grid with alternating columns for buttons and spacing. Updated the rotation buttons to `<ToggleButton>` elements aligned to specific grid columns, each configured for rotation options (Normal, Left, Right, Inverted). Retained the `<FontIcon>` glyphs for visual consistency.
This commit is contained in:
@@ -284,13 +284,21 @@
|
|||||||
FontSize="16"
|
FontSize="16"
|
||||||
Glyph="" />
|
Glyph="" />
|
||||||
|
|
||||||
<StackPanel
|
<Grid Grid.Column="2" HorizontalAlignment="Stretch">
|
||||||
Grid.Column="2"
|
<Grid.ColumnDefinitions>
|
||||||
Orientation="Horizontal"
|
<ColumnDefinition Width="*" />
|
||||||
Spacing="4">
|
<ColumnDefinition Width="4" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="4" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="4" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<!-- Normal (0°) -->
|
<!-- Normal (0°) -->
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Uid="RotateNormalTooltip"
|
x:Uid="RotateNormalTooltip"
|
||||||
|
Grid.Column="0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Click="RotationButton_Click"
|
Click="RotationButton_Click"
|
||||||
DataContext="{x:Bind}"
|
DataContext="{x:Bind}"
|
||||||
IsChecked="{x:Bind IsRotation0, Mode=OneWay}"
|
IsChecked="{x:Bind IsRotation0, Mode=OneWay}"
|
||||||
@@ -301,6 +309,8 @@
|
|||||||
<!-- Left (270°) -->
|
<!-- Left (270°) -->
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Uid="RotateLeftTooltip"
|
x:Uid="RotateLeftTooltip"
|
||||||
|
Grid.Column="2"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Click="RotationButton_Click"
|
Click="RotationButton_Click"
|
||||||
DataContext="{x:Bind}"
|
DataContext="{x:Bind}"
|
||||||
IsChecked="{x:Bind IsRotation3, Mode=OneWay}"
|
IsChecked="{x:Bind IsRotation3, Mode=OneWay}"
|
||||||
@@ -311,6 +321,8 @@
|
|||||||
<!-- Right (90°) -->
|
<!-- Right (90°) -->
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Uid="RotateRightTooltip"
|
x:Uid="RotateRightTooltip"
|
||||||
|
Grid.Column="4"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Click="RotationButton_Click"
|
Click="RotationButton_Click"
|
||||||
DataContext="{x:Bind}"
|
DataContext="{x:Bind}"
|
||||||
IsChecked="{x:Bind IsRotation1, Mode=OneWay}"
|
IsChecked="{x:Bind IsRotation1, Mode=OneWay}"
|
||||||
@@ -321,6 +333,8 @@
|
|||||||
<!-- Inverted (180°) -->
|
<!-- Inverted (180°) -->
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Uid="RotateInvertedTooltip"
|
x:Uid="RotateInvertedTooltip"
|
||||||
|
Grid.Column="6"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Click="RotationButton_Click"
|
Click="RotationButton_Click"
|
||||||
DataContext="{x:Bind}"
|
DataContext="{x:Bind}"
|
||||||
IsChecked="{x:Bind IsRotation2, Mode=OneWay}"
|
IsChecked="{x:Bind IsRotation2, Mode=OneWay}"
|
||||||
@@ -328,7 +342,7 @@
|
|||||||
Tag="2">
|
Tag="2">
|
||||||
<FontIcon FontSize="14" Glyph="" />
|
<FontIcon FontSize="14" Glyph="" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
Reference in New Issue
Block a user