|
|
@@ -0,0 +1,184 @@
|
|
|
+<ResourceDictionary
|
|
|
+ xmlns="https://github.com/avaloniaui"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ x:ClassModifier="internal">
|
|
|
+ <ControlTheme x:Key="{x:Type ScrollBar}" TargetType="ScrollBar">
|
|
|
+ <Setter Property="Cursor" Value="Arrow" />
|
|
|
+
|
|
|
+ <Style Selector="^:horizontal">
|
|
|
+ <Setter Property="Height" Value="{DynamicResource ScrollBarThickness}" />
|
|
|
+ <Setter Property="Template">
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border Background="{StaticResource SecondaryBackgroundColor}" UseLayoutRounding="False">
|
|
|
+ <Grid ColumnDefinitions="Auto,*,Auto">
|
|
|
+ <RepeatButton
|
|
|
+ Name="PART_LineUpButton"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ MinWidth="{DynamicResource ScrollBarThickness}"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Classes="repeat"
|
|
|
+ Focusable="False">
|
|
|
+ <Path Data="M 4 0 L 4 8 L 0 4 Z" />
|
|
|
+ </RepeatButton>
|
|
|
+ <Track
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ DeferThumbDrag="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
|
|
+ Maximum="{TemplateBinding Maximum}"
|
|
|
+ Minimum="{TemplateBinding Minimum}"
|
|
|
+ Orientation="{TemplateBinding Orientation}"
|
|
|
+ ViewportSize="{TemplateBinding ViewportSize}"
|
|
|
+ Value="{TemplateBinding Value,
|
|
|
+ Mode=TwoWay}">
|
|
|
+ <Track.DecreaseButton>
|
|
|
+ <RepeatButton
|
|
|
+ Name="PART_PageUpButton"
|
|
|
+ Classes="repeattrack"
|
|
|
+ Focusable="False" />
|
|
|
+ </Track.DecreaseButton>
|
|
|
+ <Track.IncreaseButton>
|
|
|
+ <RepeatButton
|
|
|
+ Name="PART_PageDownButton"
|
|
|
+ Classes="repeattrack"
|
|
|
+ Focusable="False" />
|
|
|
+ </Track.IncreaseButton>
|
|
|
+ <Thumb Name="thumb" />
|
|
|
+ </Track>
|
|
|
+ <RepeatButton
|
|
|
+ Name="PART_LineDownButton"
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="2"
|
|
|
+ MinWidth="{DynamicResource ScrollBarThickness}"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Classes="repeat"
|
|
|
+ Focusable="False">
|
|
|
+ <Path Data="M 0 0 L 4 4 L 0 8 Z" />
|
|
|
+ </RepeatButton>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style Selector="^:vertical">
|
|
|
+ <Setter Property="Width" Value="30" />
|
|
|
+ <Setter Property="Template">
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border Background="{StaticResource SecondaryBackgroundColor}" UseLayoutRounding="False">
|
|
|
+ <Grid RowDefinitions="Auto,*,Auto">
|
|
|
+ <RepeatButton
|
|
|
+ Name="PART_LineUpButton"
|
|
|
+ Grid.Row="0"
|
|
|
+ MinHeight="{DynamicResource ScrollBarThickness}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ Background="{StaticResource SecondaryBackgroundColor}"
|
|
|
+ Classes="repeat"
|
|
|
+ Focusable="False">
|
|
|
+ <Path
|
|
|
+ Width="16"
|
|
|
+ Height="16"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Data="F1 M512,512z M0,0z M414,321.94L274.22,158.82A24,24,0,0,0,237.78,158.82L98,321.94C84.66,337.51,95.72,361.56,116.22,361.56L395.82,361.56C416.32,361.56,427.38,337.51,414,321.94z"
|
|
|
+ Fill="{StaticResource MainIconColor}"
|
|
|
+ Stretch="Fill" />
|
|
|
+ </RepeatButton>
|
|
|
+ <Track
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ DeferThumbDrag="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
|
|
+ IsDirectionReversed="True"
|
|
|
+ Maximum="{TemplateBinding Maximum}"
|
|
|
+ Minimum="{TemplateBinding Minimum}"
|
|
|
+ Orientation="{TemplateBinding Orientation}"
|
|
|
+ ViewportSize="{TemplateBinding ViewportSize}"
|
|
|
+ Value="{TemplateBinding Value,
|
|
|
+ Mode=TwoWay}">
|
|
|
+ <Track.DecreaseButton>
|
|
|
+ <RepeatButton
|
|
|
+ Name="PART_PageUpButton"
|
|
|
+ Background="{StaticResource SecondaryBackgroundColor}"
|
|
|
+ Classes="repeattrack"
|
|
|
+ Focusable="False" />
|
|
|
+ </Track.DecreaseButton>
|
|
|
+ <Track.IncreaseButton>
|
|
|
+ <RepeatButton
|
|
|
+ Name="PART_PageDownButton"
|
|
|
+ Background="{StaticResource SecondaryBackgroundColor}"
|
|
|
+ Classes="repeattrack"
|
|
|
+ Focusable="False" />
|
|
|
+ </Track.IncreaseButton>
|
|
|
+ <Thumb Name="thumb" />
|
|
|
+ </Track>
|
|
|
+ <RepeatButton
|
|
|
+ Name="PART_LineDownButton"
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="2"
|
|
|
+ MinHeight="{DynamicResource ScrollBarThickness}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ Background="{StaticResource SecondaryBackgroundColor}"
|
|
|
+ Classes="repeat"
|
|
|
+ Focusable="False">
|
|
|
+ <Path
|
|
|
+ Width="16"
|
|
|
+ Height="16"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Data="F1 M512,512z M0,0z M98,190.06L237.78,353.18A24,24,0,0,0,274.22,353.18L414,190.06C427.34,174.49,416.28,150.44,395.78,150.44L116.18,150.44C95.6799999999999,150.44,84.6199999999999,174.49,97.9999999999999,190.06z"
|
|
|
+ Fill="{StaticResource MainIconColor}"
|
|
|
+ Stretch="Fill" />
|
|
|
+ </RepeatButton>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^ /template/ Thumb#thumb">
|
|
|
+ <Setter Property="Background" Value="{StaticResource SecondaryBackgroundColor}" />
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ BorderBrush="{StaticResource MainBorderColor}"
|
|
|
+ BorderThickness="1" />
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^ /template/ Thumb#thumb:pointerover">
|
|
|
+ <Setter Property="Background" Value="{DynamicResource AccentColor}" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^ /template/ Thumb#thumb:pressed">
|
|
|
+ <Setter Property="Background" Value="{DynamicResource SecondaryAccentColor}" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^:horizontal /template/ Thumb#thumb">
|
|
|
+ <Setter Property="MinWidth" Value="{DynamicResource ScrollBarThickness}" />
|
|
|
+ <Setter Property="Height" Value="{DynamicResource ScrollBarThumbThickness}" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^:vertical /template/ Thumb#thumb">
|
|
|
+ <Setter Property="MinHeight" Value="{DynamicResource ScrollBarThickness}" />
|
|
|
+ <Setter Property="Width" Value="16" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^ /template/ RepeatButton.repeat">
|
|
|
+ <Setter Property="Padding" Value="2" />
|
|
|
+ <Setter Property="BorderThickness" Value="0" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^ /template/ RepeatButton.repeattrack">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border Background="{TemplateBinding Background}" />
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style Selector="^ /template/ RepeatButton > Path">
|
|
|
+ <Setter Property="Fill" Value="{StaticResource MainIconColor}" />
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style Selector="^ /template/ RepeatButton:pointerover > Path">
|
|
|
+ <Setter Property="Fill" Value="{DynamicResource AccentColor}" />
|
|
|
+ </Style>
|
|
|
+ </ControlTheme>
|
|
|
+</ResourceDictionary>
|