AvaloniaUI / AvaloniaEdit

Avalonia-based text editor (port of AvalonEdit)
MIT License
774 stars 149 forks source link

How to set a wide / "fat" vertical scroll bar? #410

Open alexandrehtrb opened 7 months ago

alexandrehtrb commented 7 months ago

Hello,

I am trying to set a "fat" (wide) vertical scroll bar on AvaloniaEdit TextEditor, but when there are both vertical and horizontal scrolls, only the horizontal is fat, the vertical is thin.

How to make it always "fat"?

Only vertical:

Pororoca_3d4v7xAHx7

Horizontal and vertical:

Pororoca_3psknBP11I

Video:

https://github.com/AvaloniaUI/AvaloniaEdit/assets/27026741/55018966-11ba-4038-a3af-2dbc07b66300

My Styles.xaml:

  <Style Selector="ScrollViewer">
    <Setter Property="AllowAutoHide" Value="False"/>
  </Style>

  <Style Selector="ScrollBar">
    <Setter Property="AllowAutoHide" Value="False"/>
  </Style>

  <Style Selector="AvaloniaEdit|TextEditor">
    <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Visible"/>
  </Style>

  <Style Selector="AvaloniaEdit|TextEditor /template/ ScrollViewer#PART_ScrollViewer">
    <Setter Property="AllowAutoHide" Value="False"/>
  </Style>

Original discussion