mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
fix<Launcher>: re-arrange app alerts to remove event blocking on top-left corner in Histories panel
This commit is contained in:
parent
01ed685b59
commit
cdc31a47e6
3 changed files with 78 additions and 81 deletions
|
@ -20,19 +20,13 @@
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="Style.ScrollBar.Thumb" TargetType="{x:Type Thumb}">
|
<Style x:Key="Style.ScrollBar.Thumb" TargetType="{x:Type Thumb}">
|
||||||
<Setter Property="Background" Value="{DynamicResource Brush.Border1}" />
|
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
|
||||||
<Setter Property="Focusable" Value="false" />
|
<Setter Property="Focusable" Value="false" />
|
||||||
<Setter Property="IsTabStop" Value="false" />
|
<Setter Property="IsTabStop" Value="false" />
|
||||||
<Setter Property="SnapsToDevicePixels" Value="true" />
|
<Setter Property="SnapsToDevicePixels" Value="true" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||||
<Border x:Name="Border" Background="{TemplateBinding Background}"
|
<Border x:Name="Border" Background="{DynamicResource Brush.Border1}" BorderThickness="0" Opacity=".6"/>
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
|
||||||
Opacity=".6"/>
|
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter TargetName="Border" Property="Opacity" Value="1" />
|
<Setter TargetName="Border" Property="Opacity" Value="1" />
|
||||||
|
@ -44,37 +38,31 @@
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<ControlTemplate x:Key="Template.ScrollBar.Horizontal" TargetType="{x:Type ScrollBar}">
|
<ControlTemplate x:Key="Template.ScrollBar.Horizontal" TargetType="{x:Type ScrollBar}">
|
||||||
<Grid>
|
<Track Name="PART_Track">
|
||||||
<Track Name="PART_Track" Grid.Column="1">
|
<Track.DecreaseRepeatButton>
|
||||||
<Track.DecreaseRepeatButton>
|
<RepeatButton Command="ScrollBar.PageLeftCommand" Style="{StaticResource Style.ScrollBar.RepeatPage}" />
|
||||||
<RepeatButton Command="ScrollBar.PageLeftCommand" Style="{StaticResource Style.ScrollBar.RepeatPage}" />
|
</Track.DecreaseRepeatButton>
|
||||||
</Track.DecreaseRepeatButton>
|
<Track.Thumb>
|
||||||
<Track.Thumb>
|
<Thumb Style="{StaticResource Style.ScrollBar.Thumb}"/>
|
||||||
<Thumb Style="{StaticResource Style.ScrollBar.Thumb}" />
|
</Track.Thumb>
|
||||||
</Track.Thumb>
|
<Track.IncreaseRepeatButton>
|
||||||
<Track.IncreaseRepeatButton>
|
<RepeatButton Command="ScrollBar.PageRightCommand" Style="{StaticResource Style.ScrollBar.RepeatPage}" />
|
||||||
<RepeatButton Command="ScrollBar.PageRightCommand" Style="{StaticResource Style.ScrollBar.RepeatPage}" />
|
</Track.IncreaseRepeatButton>
|
||||||
</Track.IncreaseRepeatButton>
|
</Track>
|
||||||
</Track>
|
|
||||||
</Grid>
|
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|
||||||
<ControlTemplate x:Key="Template.ScrollBar.Vertical" TargetType="{x:Type ScrollBar}">
|
<ControlTemplate x:Key="Template.ScrollBar.Vertical" TargetType="{x:Type ScrollBar}">
|
||||||
<Grid>
|
<Track Name="PART_Track" IsDirectionReversed="true">
|
||||||
<Track Name="PART_Track"
|
<Track.DecreaseRepeatButton>
|
||||||
Grid.Row="1"
|
<RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource Style.ScrollBar.RepeatPage}" />
|
||||||
IsDirectionReversed="true">
|
</Track.DecreaseRepeatButton>
|
||||||
<Track.DecreaseRepeatButton>
|
<Track.Thumb>
|
||||||
<RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource Style.ScrollBar.RepeatPage}" />
|
<Thumb Style="{StaticResource Style.ScrollBar.Thumb}"/>
|
||||||
</Track.DecreaseRepeatButton>
|
</Track.Thumb>
|
||||||
<Track.Thumb>
|
<Track.IncreaseRepeatButton>
|
||||||
<Thumb Style="{StaticResource Style.ScrollBar.Thumb}"/>
|
<RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource Style.ScrollBar.RepeatPage}" />
|
||||||
</Track.Thumb>
|
</Track.IncreaseRepeatButton>
|
||||||
<Track.IncreaseRepeatButton>
|
</Track>
|
||||||
<RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource Style.ScrollBar.RepeatPage}" />
|
|
||||||
</Track.IncreaseRepeatButton>
|
|
||||||
</Track>
|
|
||||||
</Grid>
|
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|
||||||
<Style TargetType="{x:Type ScrollBar}">
|
<Style TargetType="{x:Type ScrollBar}">
|
||||||
|
@ -84,14 +72,14 @@
|
||||||
|
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<Trigger Property="Orientation" Value="Vertical">
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Width" Value="8" />
|
||||||
<Setter Property="Height" Value="Auto" />
|
<Setter Property="Height" Value="Auto" />
|
||||||
<Setter Property="Template" Value="{StaticResource Template.ScrollBar.Vertical}" />
|
<Setter Property="Template" Value="{StaticResource Template.ScrollBar.Vertical}" />
|
||||||
<Setter Property="Width" Value="8" />
|
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="Orientation" Value="Horizontal">
|
<Trigger Property="Orientation" Value="Horizontal">
|
||||||
|
<Setter Property="Width" Value="Auto" />
|
||||||
<Setter Property="Height" Value="8" />
|
<Setter Property="Height" Value="8" />
|
||||||
<Setter Property="Template" Value="{StaticResource Template.ScrollBar.Horizontal}" />
|
<Setter Property="Template" Value="{StaticResource Template.ScrollBar.Horizontal}" />
|
||||||
<Setter Property="Width" Value="Auto" />
|
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
|
@ -33,8 +33,7 @@
|
||||||
ViewportSize="{TemplateBinding ViewportHeight}"
|
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||||
Maximum="{TemplateBinding ScrollableHeight}"
|
Maximum="{TemplateBinding ScrollableHeight}"
|
||||||
Minimum="0"
|
Minimum="0"
|
||||||
Value="{TemplateBinding VerticalOffset}"
|
Value="{TemplateBinding VerticalOffset}"/>
|
||||||
Margin="0,-1,-1,-1"/>
|
|
||||||
|
|
||||||
<ScrollBar x:Name="PART_HorizontalScrollBar"
|
<ScrollBar x:Name="PART_HorizontalScrollBar"
|
||||||
IsTabStop="False"
|
IsTabStop="False"
|
||||||
|
@ -43,8 +42,7 @@
|
||||||
ViewportSize="{TemplateBinding ViewportWidth}"
|
ViewportSize="{TemplateBinding ViewportWidth}"
|
||||||
Maximum="{TemplateBinding ScrollableWidth}"
|
Maximum="{TemplateBinding ScrollableWidth}"
|
||||||
Minimum="0"
|
Minimum="0"
|
||||||
Value="{TemplateBinding HorizontalOffset}"
|
Value="{TemplateBinding HorizontalOffset}"/>
|
||||||
Margin="-1,0,-1,-1"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|
|
@ -292,49 +292,60 @@
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
<!-- Alerts -->
|
<!-- Alerts -->
|
||||||
<ScrollViewer
|
<ItemsControl
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="0,32,0,0"
|
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
HorizontalScrollBarVisibility="Disabled"
|
Margin="0,32,0,0" Width="Auto" Height="Auto"
|
||||||
VerticalScrollBarVisibility="Auto"
|
ItemsSource="{Binding Errors, ElementName=me}">
|
||||||
Panel.ZIndex="100">
|
|
||||||
<ItemsControl Margin="4" Width="300" Height="Auto" ItemsSource="{Binding Errors, ElementName=me}">
|
|
||||||
<ItemsControl.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Grid x:Name="item" Height="Auto" Width="300" Margin="0,8,0,0">
|
|
||||||
<Border Background="{StaticResource Brush.BG1}">
|
|
||||||
<Border.Effect>
|
|
||||||
<DropShadowEffect BlurRadius="8" ShadowDepth="2" Direction="270"/>
|
|
||||||
</Border.Effect>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Grid Margin="8">
|
<ItemsControl.Style>
|
||||||
<Grid.RowDefinitions>
|
<Style TargetType="{x:Type ItemsControl}">
|
||||||
<RowDefinition Height="26"/>
|
<Setter Property="Template">
|
||||||
<RowDefinition Height="*"/>
|
<Setter.Value>
|
||||||
<RowDefinition Height="Auto"/>
|
<ControlTemplate>
|
||||||
</Grid.RowDefinitions>
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||||
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</ScrollViewer>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</ItemsControl.Style>
|
||||||
|
|
||||||
<Label Grid.Row="0" Content="ERROR" FontWeight="DemiBold"/>
|
<ItemsControl.ItemTemplate>
|
||||||
<TextBlock Grid.Row="1" Margin="6,8" Text="{Binding}" Foreground="{StaticResource Brush.FG}" TextWrapping="Wrap"/>
|
<DataTemplate>
|
||||||
<Button
|
<Grid x:Name="item" Height="Auto" Width="300" Margin="8,8,16,8">
|
||||||
Grid.Row="2"
|
<Border Background="{StaticResource Brush.BG1}">
|
||||||
Margin="4,0"
|
<Border.Effect>
|
||||||
Click="RemoveError"
|
<DropShadowEffect ShadowDepth="0"/>
|
||||||
Height="25"
|
</Border.Effect>
|
||||||
Content="CLOSE"
|
</Border>
|
||||||
Style="{StaticResource Style.Button.AccentBordered}"
|
|
||||||
BorderBrush="{StaticResource Brush.FG}"
|
<Grid Margin="8">
|
||||||
VerticalAlignment="Center"
|
<Grid.RowDefinitions>
|
||||||
HorizontalAlignment="Right"/>
|
<RowDefinition Height="26"/>
|
||||||
</Grid>
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Row="0" Content="ERROR" FontWeight="DemiBold"/>
|
||||||
|
<TextBlock Grid.Row="1" Margin="6,8" Text="{Binding}" Foreground="{StaticResource Brush.FG}" TextWrapping="Wrap"/>
|
||||||
|
<Button
|
||||||
|
Grid.Row="2"
|
||||||
|
Margin="4,0"
|
||||||
|
Click="RemoveError"
|
||||||
|
Height="25"
|
||||||
|
Content="CLOSE"
|
||||||
|
Style="{StaticResource Style.Button.AccentBordered}"
|
||||||
|
BorderBrush="{StaticResource Brush.FG}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Right"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</Grid>
|
||||||
</ItemsControl.ItemTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl.ItemTemplate>
|
||||||
</ScrollViewer>
|
</ItemsControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|
Loading…
Reference in a new issue