Skip to content

Commit d39a70e

Browse files
committed
Fix divider
1 parent a8e8fd9 commit d39a70e

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

src/Files.App.Controls/Omnibar/Omnibar.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Linq;
1010
using System.Collections.Generic;
1111
using Microsoft.UI.Xaml.Input;
12+
using Microsoft.UI;
1213

1314
namespace Files.App.Controls
1415
{
@@ -47,22 +48,23 @@ protected override void OnApplyTemplate()
4748
// Insert a divider
4849
if (_modesHostGrid.Children.Count is not 0)
4950
{
50-
var divider = new Border()
51+
var divider = new Rectangle()
5152
{
53+
Fill = (SolidColorBrush)Application.Current.Resources["DividerStrokeColorDefaultBrush"],
54+
Height = 20,
55+
Margin = new(2,0,2,0),
5256
Width = 1,
53-
Height = 24,
54-
//Style = (Style)Application.Current.Resources["DefaultModeDividerStyle"]
5557
};
5658

5759
_modesHostGrid.ColumnDefinitions.Add(new() { Width = GridLength.Auto });
60+
Grid.SetColumn(divider, _modesHostGrid.Children.Count);
5861
_modesHostGrid.Children.Add(divider);
59-
Grid.SetColumn(divider, _modesHostGrid.Children.Count - 1);
6062
}
6163

6264
// Insert the mode
6365
_modesHostGrid.ColumnDefinitions.Add(new() { Width = GridLength.Auto });
66+
Grid.SetColumn(mode, _modesHostGrid.Children.Count);
6467
_modesHostGrid.Children.Add(mode);
65-
Grid.SetColumn(mode, _modesHostGrid.Children.Count - 1);
6668
}
6769

6870
GotFocus += Omnibar_GotFocus;

src/Files.App.Controls/Omnibar/Omnibar.xaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,4 @@
6969
</Setter>
7070
</Style>
7171

72-
<Style
73-
x:Key="DefaultModeDividerStyle"
74-
BasedOn="{StaticResource DefaultBorderStyle}"
75-
TargetType="Border">
76-
<Setter Property="Height" Value="{StaticResource OmnibarModeDividerDefaultHeight}" />
77-
<Setter Property="Width" Value="1" />
78-
<Setter Property="Background" Value="{StaticResource OmnibarModeDividerDefaultHeight}" />
79-
</Style>
80-
8172
</ResourceDictionary>

0 commit comments

Comments
 (0)