mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
CmdPal: Fix styles applied to MoreCommandsButton (#41059)
## Summary of the Pull Request - Apply the same padding to the button as used for primary and secondary command buttons. - Use consistent spacing between keycap blocks. - Match keycap border style and inner text brush with other command buttons. - Add min width constraint to shortcut keycap element to make it at least square. <img width="961" height="355" alt="image" src="https://github.com/user-attachments/assets/cff5ef7e-fe67-41ac-9796-063c0e69768a" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #41052 - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed 👀
This commit is contained in:
@@ -59,8 +59,24 @@
|
|||||||
<Setter Property="BorderBrush" Value="{ThemeResource DividerStrokeColorDefaultBrush}" />
|
<Setter Property="BorderBrush" Value="{ThemeResource DividerStrokeColorDefaultBrush}" />
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
<Setter Property="CornerRadius" Value="6" />
|
<Setter Property="CornerRadius" Value="6" />
|
||||||
|
<Setter Property="MinWidth" Value="20" />
|
||||||
</Style.Setters>
|
</Style.Setters>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="HotkeyTextBlockStyle" TargetType="TextBlock">
|
||||||
|
<Setter Property="FontSize" Value="10" />
|
||||||
|
<Setter Property="CharacterSpacing" Value="4" />
|
||||||
|
<Setter Property="Foreground" Value="{ThemeResource TextFillColorPrimaryBrush}" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="HotkeyFontIconStyle" TargetType="FontIcon">
|
||||||
|
<Setter Property="FontSize" Value="10" />
|
||||||
|
<Setter Property="Foreground" Value="{ThemeResource TextFillColorPrimaryBrush}" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
@@ -155,12 +171,7 @@
|
|||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
Text="{x:Bind ViewModel.PrimaryCommand.Name, Mode=OneWay}" />
|
Text="{x:Bind ViewModel.PrimaryCommand.Name, Mode=OneWay}" />
|
||||||
<Border Style="{StaticResource HotkeyStyle}">
|
<Border Style="{StaticResource HotkeyStyle}">
|
||||||
<FontIcon
|
<FontIcon Glyph="" Style="{StaticResource HotkeyFontIconStyle}" />
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="10"
|
|
||||||
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -179,19 +190,10 @@
|
|||||||
Text="{x:Bind ViewModel.SecondaryCommand.Name, Mode=OneWay}" />
|
Text="{x:Bind ViewModel.SecondaryCommand.Name, Mode=OneWay}" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="4">
|
<StackPanel Orientation="Horizontal" Spacing="4">
|
||||||
<Border Padding="4,2,4,2" Style="{StaticResource HotkeyStyle}">
|
<Border Padding="4,2,4,2" Style="{StaticResource HotkeyStyle}">
|
||||||
<TextBlock
|
<TextBlock Style="{StaticResource HotkeyTextBlockStyle}" Text="Ctrl" />
|
||||||
CharacterSpacing="4"
|
|
||||||
FontSize="10"
|
|
||||||
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
|
|
||||||
Text="Ctrl" />
|
|
||||||
</Border>
|
</Border>
|
||||||
<Border Style="{StaticResource HotkeyStyle}">
|
<Border Style="{StaticResource HotkeyStyle}">
|
||||||
<FontIcon
|
<FontIcon Glyph="" Style="{StaticResource HotkeyFontIconStyle}" />
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="10"
|
|
||||||
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -199,7 +201,7 @@
|
|||||||
<Button
|
<Button
|
||||||
x:Name="MoreCommandsButton"
|
x:Name="MoreCommandsButton"
|
||||||
x:Uid="MoreCommandsButton"
|
x:Uid="MoreCommandsButton"
|
||||||
Padding="4"
|
Padding="6,4,4,4"
|
||||||
Click="MoreCommandsButton_Clicked"
|
Click="MoreCommandsButton_Clicked"
|
||||||
Style="{StaticResource SubtleButtonStyle}"
|
Style="{StaticResource SubtleButtonStyle}"
|
||||||
ToolTipService.ToolTip="Ctrl+K"
|
ToolTipService.ToolTip="Ctrl+K"
|
||||||
@@ -209,32 +211,12 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
Text="More" />
|
Text="More" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="2">
|
<StackPanel Orientation="Horizontal" Spacing="4">
|
||||||
<Border
|
<Border Padding="4,2,4,2" Style="{StaticResource HotkeyStyle}">
|
||||||
Padding="4,2,4,2"
|
<TextBlock Style="{StaticResource HotkeyTextBlockStyle}" Text="Ctrl" />
|
||||||
VerticalAlignment="Center"
|
|
||||||
Background="{ThemeResource SubtleFillColorSecondaryBrush}"
|
|
||||||
BorderBrush="{ThemeResource DividerStrokeColorDefaultBrush}"
|
|
||||||
BorderThickness="1"
|
|
||||||
CornerRadius="4">
|
|
||||||
<TextBlock
|
|
||||||
CharacterSpacing="4"
|
|
||||||
FontSize="10"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Text="Ctrl" />
|
|
||||||
</Border>
|
</Border>
|
||||||
<Border
|
<Border Padding="4,2,4,2" Style="{StaticResource HotkeyStyle}">
|
||||||
Padding="4,2,4,2"
|
<TextBlock Style="{StaticResource HotkeyTextBlockStyle}" Text="K" />
|
||||||
VerticalAlignment="Center"
|
|
||||||
Background="{ThemeResource SubtleFillColorSecondaryBrush}"
|
|
||||||
BorderBrush="{ThemeResource DividerStrokeColorDefaultBrush}"
|
|
||||||
BorderThickness="1"
|
|
||||||
CornerRadius="4">
|
|
||||||
<TextBlock
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="10"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Text="K" />
|
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
Reference in New Issue
Block a user