mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
ux: style for disabled menu item
This commit is contained in:
parent
ba1ab40eb0
commit
f7e0cbf989
2 changed files with 126 additions and 136 deletions
|
@ -200,13 +200,13 @@
|
||||||
<x:String x:Key="Text.Diff.Submodule.New" xml:space="preserve">NEW</x:String>
|
<x:String x:Key="Text.Diff.Submodule.New" xml:space="preserve">NEW</x:String>
|
||||||
<x:String x:Key="Text.Diff.SyntaxHighlight" xml:space="preserve">Syntax Highlighting</x:String>
|
<x:String x:Key="Text.Diff.SyntaxHighlight" xml:space="preserve">Syntax Highlighting</x:String>
|
||||||
<x:String x:Key="Text.Diff.ToggleWordWrap" xml:space="preserve">Line Word Wrap</x:String>
|
<x:String x:Key="Text.Diff.ToggleWordWrap" xml:space="preserve">Line Word Wrap</x:String>
|
||||||
<x:String x:Key="Text.Diff.UseMerger" xml:space="preserve">Open In Merge Tool</x:String>
|
<x:String x:Key="Text.Diff.UseMerger" xml:space="preserve">Open in Merge Tool</x:String>
|
||||||
<x:String x:Key="Text.Diff.VisualLines.Decr" xml:space="preserve">Decrease Number of Visible Lines</x:String>
|
<x:String x:Key="Text.Diff.VisualLines.Decr" xml:space="preserve">Decrease Number of Visible Lines</x:String>
|
||||||
<x:String x:Key="Text.Diff.VisualLines.Incr" xml:space="preserve">Increase Number of Visible Lines</x:String>
|
<x:String x:Key="Text.Diff.VisualLines.Incr" xml:space="preserve">Increase Number of Visible Lines</x:String>
|
||||||
<x:String x:Key="Text.Diff.Welcome" xml:space="preserve">SELECT FILE TO VIEW CHANGES</x:String>
|
<x:String x:Key="Text.Diff.Welcome" xml:space="preserve">SELECT FILE TO VIEW CHANGES</x:String>
|
||||||
<x:String x:Key="Text.Diff.ShowHiddenSymbols" xml:space="preserve">Show hidden symbols</x:String>
|
<x:String x:Key="Text.Diff.ShowHiddenSymbols" xml:space="preserve">Show hidden symbols</x:String>
|
||||||
<x:String x:Key="Text.Diff.SwapCommits" xml:space="preserve">Swap</x:String>
|
<x:String x:Key="Text.Diff.SwapCommits" xml:space="preserve">Swap</x:String>
|
||||||
<x:String x:Key="Text.DiffWithMerger" xml:space="preserve">Open In Merge Tool</x:String>
|
<x:String x:Key="Text.DiffWithMerger" xml:space="preserve">Open in Merge Tool</x:String>
|
||||||
<x:String x:Key="Text.Discard" xml:space="preserve">Discard Changes</x:String>
|
<x:String x:Key="Text.Discard" xml:space="preserve">Discard Changes</x:String>
|
||||||
<x:String x:Key="Text.Discard.All" xml:space="preserve">All local changes in working copy.</x:String>
|
<x:String x:Key="Text.Discard.All" xml:space="preserve">All local changes in working copy.</x:String>
|
||||||
<x:String x:Key="Text.Discard.Changes" xml:space="preserve">Changes:</x:String>
|
<x:String x:Key="Text.Discard.Changes" xml:space="preserve">Changes:</x:String>
|
||||||
|
|
|
@ -251,6 +251,7 @@
|
||||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
|
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
|
||||||
|
<Setter Property="FontFamily" Value="{Binding Source={x:Static vm:Preference.Instance}, Path=DefaultFont}"/>
|
||||||
<Setter Property="FontSize" Value="{Binding Source={x:Static vm:Preference.Instance}, Path=DefaultFontSize}"/>
|
<Setter Property="FontSize" Value="{Binding Source={x:Static vm:Preference.Instance}, Path=DefaultFontSize}"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="TextBlock.small">
|
<Style Selector="TextBlock.small">
|
||||||
|
@ -768,148 +769,137 @@
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="MenuItem">
|
<Style Selector="MenuItem">
|
||||||
<Style.Resources>
|
<Setter Property="Height" Value="28"/>
|
||||||
<ControlTheme x:Key="{x:Type MenuItem}" TargetType="MenuItem">
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="Height" Value="28"/>
|
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}" />
|
||||||
<Setter Property="Background" Value="Transparent" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}" />
|
|
||||||
<Setter Property="Template">
|
|
||||||
<ControlTemplate>
|
|
||||||
<Panel>
|
|
||||||
<Border Name="PART_LayoutRoot"
|
|
||||||
Padding="0,0,4,0"
|
|
||||||
Background="{TemplateBinding Background}"
|
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
|
||||||
CornerRadius="3">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIcon" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGT" />
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemChevron" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Border Grid.Column="0" Width="28">
|
<Setter Property="Template">
|
||||||
<ContentControl x:Name="PART_IconPresenter"
|
<ControlTemplate>
|
||||||
Content="{TemplateBinding Icon}"
|
<Panel>
|
||||||
IsVisible="False"
|
<Border Name="PART_LayoutRoot"
|
||||||
HorizontalAlignment="Center"
|
Padding="0,0,4,0"
|
||||||
VerticalAlignment="Center"/>
|
Background="{TemplateBinding Background}"
|
||||||
</Border>
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="3">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="28" SharedSizeGroup="MenuItemIcon" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGT" />
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemChevron" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ContentPresenter Grid.Column="1"
|
<ContentControl Grid.Column="0"
|
||||||
Name="PART_HeaderPresenter"
|
x:Name="PART_IconPresenter"
|
||||||
Content="{TemplateBinding Header}"
|
Content="{TemplateBinding Icon}"
|
||||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
IsVisible="False"
|
||||||
VerticalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
HorizontalAlignment="Stretch"
|
VerticalAlignment="Center"/>
|
||||||
RecognizesAccessKey="False"/>
|
|
||||||
<TextBlock x:Name="PART_InputGestureText"
|
<ContentPresenter Grid.Column="1"
|
||||||
Grid.Column="2"
|
x:Name="PART_HeaderPresenter"
|
||||||
Classes="CaptionTextBlockStyle"
|
Content="{TemplateBinding Header}"
|
||||||
Margin="{DynamicResource MenuInputGestureTextMargin}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
Text="{TemplateBinding InputGesture, Converter={StaticResource KeyGestureConverter}}"
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||||
HorizontalAlignment="Right"
|
VerticalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
HorizontalAlignment="Stretch"
|
||||||
Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"
|
RecognizesAccessKey="False"/>
|
||||||
FontSize="11"/>
|
|
||||||
<Path Name="PART_ChevronPath"
|
<TextBlock x:Name="PART_InputGestureText"
|
||||||
Width="6"
|
Grid.Column="2"
|
||||||
Data="M573 512 215 881c-20 20-20 51 0 61l61 61c20 20 51 20 61 0l461-461c10-10 10-20 10-31s0-20-10-31L338 20C317 0 287 0 276 20L215 82c-20 20-20 51 0 61L573 512z"
|
Classes="CaptionTextBlockStyle"
|
||||||
Fill="{DynamicResource Brush.FG2}"
|
Margin="{DynamicResource MenuInputGestureTextMargin}"
|
||||||
Margin="8,0,0,0"
|
Text="{TemplateBinding InputGesture, Converter={StaticResource KeyGestureConverter}}"
|
||||||
VerticalAlignment="Center"
|
HorizontalAlignment="Right"
|
||||||
Grid.Column="3" />
|
VerticalAlignment="Center"
|
||||||
</Grid>
|
Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"
|
||||||
|
FontSize="11"/>
|
||||||
|
|
||||||
|
<Path Name="PART_ChevronPath"
|
||||||
|
Width="6"
|
||||||
|
Data="M573 512 215 881c-20 20-20 51 0 61l61 61c20 20 51 20 61 0l461-461c10-10 10-20 10-31s0-20-10-31L338 20C317 0 287 0 276 20L215 82c-20 20-20 51 0 61L573 512z"
|
||||||
|
Fill="{DynamicResource Brush.FG2}"
|
||||||
|
Margin="8,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Grid.Column="3" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<Popup Name="PART_Popup"
|
||||||
|
WindowManagerAddShadowHint="False"
|
||||||
|
Placement="RightEdgeAlignedTop"
|
||||||
|
MaxHeight="400"
|
||||||
|
IsLightDismissEnabled="False"
|
||||||
|
HorizontalOffset="-4"
|
||||||
|
VerticalOffset="-4"
|
||||||
|
IsOpen="{TemplateBinding IsSubMenuOpen, Mode=TwoWay}">
|
||||||
|
<Grid>
|
||||||
|
<Border Background="{DynamicResource Brush.Popup}" Margin="4" CornerRadius="{DynamicResource OverlayCornerRadius}">
|
||||||
|
<Border.Effect>
|
||||||
|
<DropShadowEffect OffsetX="0" OffsetY="0" Color="Black" BlurRadius="4" Opacity=".6"/>
|
||||||
|
</Border.Effect>
|
||||||
</Border>
|
</Border>
|
||||||
<Popup Name="PART_Popup"
|
|
||||||
WindowManagerAddShadowHint="False"
|
|
||||||
Placement="RightEdgeAlignedTop"
|
|
||||||
MaxHeight="400"
|
|
||||||
IsLightDismissEnabled="False"
|
|
||||||
HorizontalOffset="-4"
|
|
||||||
VerticalOffset="-4"
|
|
||||||
IsOpen="{TemplateBinding IsSubMenuOpen, Mode=TwoWay}">
|
|
||||||
<Grid>
|
|
||||||
<Border Background="{DynamicResource Brush.Popup}" Margin="4" CornerRadius="{DynamicResource OverlayCornerRadius}">
|
|
||||||
<Border.Effect>
|
|
||||||
<DropShadowEffect OffsetX="0" OffsetY="0" Color="Black" BlurRadius="4" Opacity=".6"/>
|
|
||||||
</Border.Effect>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Border BorderThickness="0"
|
<Border BorderThickness="0"
|
||||||
Margin="8,4"
|
Margin="8,4"
|
||||||
MaxWidth="{DynamicResource FlyoutThemeMaxWidth}"
|
MaxWidth="{DynamicResource FlyoutThemeMaxWidth}"
|
||||||
MinHeight="{DynamicResource MenuFlyoutThemeMinHeight}"
|
MinHeight="{DynamicResource MenuFlyoutThemeMinHeight}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
CornerRadius="{DynamicResource OverlayCornerRadius}">
|
CornerRadius="{DynamicResource OverlayCornerRadius}">
|
||||||
<ScrollViewer Theme="{StaticResource FluentMenuScrollViewer}">
|
<ScrollViewer Theme="{StaticResource FluentMenuScrollViewer}">
|
||||||
<ItemsPresenter Name="PART_ItemsPresenter"
|
<ItemsPresenter Name="PART_ItemsPresenter"
|
||||||
Margin="{DynamicResource MenuFlyoutScrollerMargin}"
|
Margin="{DynamicResource MenuFlyoutScrollerMargin}"
|
||||||
Grid.IsSharedSizeScope="True">
|
Grid.IsSharedSizeScope="True">
|
||||||
<ItemsPresenter.ItemsPanel>
|
<ItemsPresenter.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<VirtualizingStackPanel Orientation="Vertical"/>
|
<VirtualizingStackPanel Orientation="Vertical"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsPresenter.ItemsPanel>
|
</ItemsPresenter.ItemsPanel>
|
||||||
</ItemsPresenter>
|
</ItemsPresenter>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Popup>
|
</Popup>
|
||||||
</Panel>
|
</Panel>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
|
<Style Selector="^:icon /template/ ContentControl#PART_IconPresenter">
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:icon /template/ ContentControl#PART_IconPresenter">
|
<Style Selector="^:selected">
|
||||||
<Setter Property="IsVisible" Value="True" />
|
<Style Selector="^ /template/ Border#PART_LayoutRoot">
|
||||||
</Style>
|
<Setter Property="Background" Value="{DynamicResource MenuFlyoutItemBackgroundPointerOver}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutItemForegroundPointerOver}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ TextBlock#PART_InputGestureText">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundPointerOver}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Path#PART_ChevronPath">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource MenuFlyoutSubItemChevronPointerOver}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:selected">
|
<Style Selector="^:disabled">
|
||||||
<Style Selector="^ /template/ Border#PART_LayoutRoot">
|
<Setter Property="Opacity" Value="0.65"/>
|
||||||
<Setter Property="Background" Value="{DynamicResource MenuFlyoutItemBackgroundPointerOver}" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutItemForegroundPointerOver}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ TextBlock#PART_InputGestureText">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundPointerOver}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ Path#PART_ChevronPath">
|
|
||||||
<Setter Property="Fill" Value="{DynamicResource MenuFlyoutSubItemChevronPointerOver}" />
|
|
||||||
</Style>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:empty /template/ Path#PART_ChevronPath">
|
||||||
<Style Selector="^ /template/ Border#PART_LayoutRoot">
|
<Setter Property="IsVisible" Value="False" />
|
||||||
<Setter Property="Background" Value="{DynamicResource MenuFlyoutItemBackgroundDisabled}" />
|
</Style>
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutItemForegroundDisabled}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ TextBlock#PART_InputGestureText">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundDisabled}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ Path#PART_ChevronPath">
|
|
||||||
<Setter Property="Fill" Value="{DynamicResource MenuFlyoutSubItemChevronDisabled}" />
|
|
||||||
</Style>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="^:empty /template/ Path#PART_ChevronPath">
|
<Style Selector="^:separator">
|
||||||
<Setter Property="IsVisible" Value="False" />
|
<Setter Property="Height" Value="5"/>
|
||||||
</Style>
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate>
|
||||||
<Style Selector="^:separator">
|
<Separator Margin="28,0,4,0" Height=".5" VerticalAlignment="Center" Background="{DynamicResource Brush.Border2}"/>
|
||||||
<Setter Property="Height" Value="5"/>
|
</ControlTemplate>
|
||||||
<Setter Property="Template">
|
</Setter>
|
||||||
<ControlTemplate>
|
</Style>
|
||||||
<Separator Margin="28,0,4,0" Height=".5" VerticalAlignment="Center" Background="{DynamicResource Brush.Border2}"/>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
</ControlTheme>
|
|
||||||
</Style.Resources>
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="ComboBox">
|
<Style Selector="ComboBox">
|
||||||
|
|
Loading…
Reference in a new issue