浏览代码

Do not hardcode Grid.*Span-Properties for ScrollViewer (#12301)

looks like this is only valid for FluentTheme.

Co-authored-by: Jumar Macato <[email protected]>
Tim 2 年之前
父节点
当前提交
8bebf7153e
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/Avalonia.Themes.Fluent/Controls/ScrollViewer.xaml

+ 4 - 2
src/Avalonia.Themes.Fluent/Controls/ScrollViewer.xaml

@@ -27,8 +27,6 @@
           <ScrollContentPresenter Name="PART_ContentPresenter"
                                   Grid.Row="0"
                                   Grid.Column="0"
-                                  Grid.RowSpan="2"
-                                  Grid.ColumnSpan="2"
                                   Background="{TemplateBinding Background}"
                                   HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
                                   VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}"
@@ -65,5 +63,9 @@
     <Style Selector="^[IsExpanded=true] /template/ Panel#PART_ScrollBarsSeparator">
       <Setter Property="Opacity" Value="1" />
     </Style>
+    <Style Selector="^[AllowAutoHide=True] /template/ ScrollContentPresenter#PART_ContentPresenter">
+      <Setter Property="Grid.ColumnSpan" Value="2" />
+      <Setter Property="Grid.RowSpan" Value="2" />
+    </Style>
   </ControlTheme>
 </ResourceDictionary>