Skip to content

Commit 82bb5ac

Browse files
committed
Merge branch 'v07.1-changes' of https://github.com/duke7553/files-uwp into v07.1-changes
2 parents 494c71b + e9dd45e commit 82bb5ac

File tree

7 files changed

+107
-10
lines changed

7 files changed

+107
-10
lines changed

Files/Controls/RibbonArea.xaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,10 @@
14091409
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xF271;" />
14101410
</AppBarButton.Icon>
14111411
</AppBarButton>
1412-
<AppBarSeparator Height="40" IsCompact="True" />
1412+
<AppBarSeparator
1413+
Height="40"
1414+
IsCompact="True"
1415+
Visibility="{x:Bind RibbonViewModel.AppBarSeparatorVisibility, Mode=OneWay}" />
14131416
<AppBarButton
14141417
x:Name="DeleteButton"
14151418
MinWidth="40"
@@ -1440,7 +1443,10 @@
14401443
Label="New Item"
14411444
LabelPosition="{x:Bind RibbonViewModel.ItemLabelPosition, Mode=OneWay}"
14421445
Style="{StaticResource AppBarButtonRevealStyle}" />
1443-
<AppBarSeparator Height="40" IsCompact="True" />
1446+
<AppBarSeparator
1447+
Height="40"
1448+
IsCompact="True"
1449+
Visibility="{x:Bind RibbonViewModel.AppBarSeparatorVisibility, Mode=OneWay}" />
14441450
<AppBarButton
14451451
x:Name="ShowPropertiesButton"
14461452
MinWidth="40"
@@ -1464,7 +1470,10 @@
14641470
Label="Open With"
14651471
LabelPosition="{x:Bind RibbonViewModel.ItemLabelPosition, Mode=OneWay}"
14661472
Style="{StaticResource AppBarButtonRevealStyle}" />
1467-
<AppBarSeparator Height="40" IsCompact="True" />
1473+
<AppBarSeparator
1474+
Height="40"
1475+
IsCompact="True"
1476+
Visibility="{x:Bind RibbonViewModel.AppBarSeparatorVisibility, Mode=OneWay}" />
14681477
<AppBarButton
14691478
x:Name="ShowFolderPropertiesButton"
14701479
MinWidth="40"
@@ -1565,7 +1574,10 @@
15651574
Label="Clear All"
15661575
LabelPosition="{x:Bind RibbonViewModel.ItemLabelPosition, Mode=OneWay}"
15671576
Style="{StaticResource AppBarButtonRevealStyle}" />
1568-
<AppBarSeparator Height="40" IsCompact="True" />
1577+
<AppBarSeparator
1578+
Height="40"
1579+
IsCompact="True"
1580+
Visibility="{x:Bind RibbonViewModel.AppBarSeparatorVisibility, Mode=OneWay}" />
15691581
<AppBarButton
15701582
MinWidth="40"
15711583
CornerRadius="2"
@@ -1636,7 +1648,7 @@
16361648
</StackPanel>
16371649
<TextBlock Text="Search within" TextAlignment="Center" />
16381650
</StackPanel>
1639-
<AppBarSeparator />
1651+
<AppBarSeparator Visibility="{x:Bind RibbonViewModel.AppBarSeparatorVisibility, Mode=OneWay}" />
16401652
<StackPanel Orientation="Vertical" Spacing="2.5">
16411653
<StackPanel Orientation="Horizontal" Spacing="5">
16421654
<ComboBox
@@ -1686,7 +1698,7 @@
16861698
</StackPanel>
16871699
<TextBlock Text="Filter" TextAlignment="Center" />
16881700
</StackPanel>
1689-
<AppBarSeparator />
1701+
<AppBarSeparator Visibility="{x:Bind RibbonViewModel.AppBarSeparatorVisibility, Mode=OneWay}" />
16901702
<Button
16911703
Width="125"
16921704
Background="Transparent"

Files/Controls/RibbonArea.xaml.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public RibbonArea()
2929
private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
3030
{
3131

32-
if(Window.Current.Bounds.Width >= 750)
32+
if(Window.Current.Bounds.Width >= 1050)
3333
{
3434
RibbonViewModel.ShowItemLabels();
3535
SearchReigon.Visibility = Visibility.Visible;
@@ -45,6 +45,15 @@ private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChange
4545
SearchBoxResizer.Visibility = Visibility.Collapsed;
4646
ToolbarGrid.ColumnDefinitions[2].Width = new GridLength(0);
4747
}
48+
49+
if (Window.Current.Bounds.Width >= 700)
50+
{
51+
RibbonViewModel.ShowAppBarSeparator();
52+
}
53+
else
54+
{
55+
RibbonViewModel.HideAppBarSeparator();
56+
}
4857
}
4958

5059
private void VisiblePath_TextChanged(object sender, KeyRoutedEventArgs e)

Files/ProHome.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@
433433
<RowDefinition Height="Auto" />
434434
<RowDefinition Height="*" />
435435
</Grid.RowDefinitions>
436+
436437
<StackPanel Grid.Row="0" Orientation="Vertical">
437438
<controls:RibbonArea
438439
x:Name="RibbonArea"

Files/SettingsPages/About.xaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
VerticalAlignment="Stretch"
1717
Orientation="Vertical"
1818
Spacing="14">
19+
<StackPanel.ChildrenTransitions>
20+
<TransitionCollection>
21+
<RepositionThemeTransition />
22+
<ReorderThemeTransition />
23+
</TransitionCollection>
24+
</StackPanel.ChildrenTransitions>
1925

2026
<TextBlock FontSize="22" Text="About" />
2127

Files/SettingsPages/Personalization.xaml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@
1010
<Grid>
1111

1212
<ScrollViewer HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
13-
<StackPanel Orientation="Vertical" Spacing="14" Margin="12,12,8,8">
13+
<StackPanel
14+
Margin="12,12,8,8"
15+
Orientation="Vertical"
16+
Spacing="14">
17+
<StackPanel.ChildrenTransitions>
18+
<TransitionCollection>
19+
<RepositionThemeTransition />
20+
<ReorderThemeTransition />
21+
</TransitionCollection>
22+
</StackPanel.ChildrenTransitions>
1423

1524
<TextBlock FontSize="22" Text="Personalization" />
1625

@@ -20,6 +29,11 @@
2029
<ColumnDefinition Width="*" MaxWidth="400" />
2130
<ColumnDefinition Width="200" />
2231
</Grid.ColumnDefinitions>
32+
<Grid.ChildrenTransitions>
33+
<TransitionCollection>
34+
<RepositionThemeTransition />
35+
</TransitionCollection>
36+
</Grid.ChildrenTransitions>
2337

2438
<TextBlock
2539
Grid.Column="0"
@@ -40,6 +54,11 @@
4054
<ColumnDefinition Width="*" MaxWidth="400" />
4155
<ColumnDefinition Width="200" />
4256
</Grid.ColumnDefinitions>
57+
<Grid.ChildrenTransitions>
58+
<TransitionCollection>
59+
<RepositionThemeTransition />
60+
</TransitionCollection>
61+
</Grid.ChildrenTransitions>
4362

4463
<TextBlock
4564
Grid.Column="0"
@@ -60,6 +79,11 @@
6079
<ColumnDefinition Width="*" MaxWidth="400" />
6180
<ColumnDefinition Width="200" />
6281
</Grid.ColumnDefinitions>
82+
<Grid.ChildrenTransitions>
83+
<TransitionCollection>
84+
<RepositionThemeTransition />
85+
</TransitionCollection>
86+
</Grid.ChildrenTransitions>
6387

6488
<TextBlock
6589
Grid.Column="0"
@@ -70,10 +94,10 @@
7094
<ToggleSwitch
7195
x:Name="AcrylicSidebarSwitch"
7296
Grid.Column="2"
97+
Width="40"
7398
HorizontalAlignment="Right"
7499
OffContent=""
75-
OnContent=""
76-
Width="40"/>
100+
OnContent="" />
77101
</Grid>
78102

79103
</StackPanel>

Files/SettingsPages/Preferences.xaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,32 @@
1616
HorizontalAlignment="Stretch"
1717
VerticalAlignment="Stretch"
1818
Spacing="14">
19+
<StackPanel.ChildrenTransitions>
20+
<TransitionCollection>
21+
<RepositionThemeTransition />
22+
<ReorderThemeTransition />
23+
</TransitionCollection>
24+
</StackPanel.ChildrenTransitions>
1925

2026
<TextBlock FontSize="22" Text="Preferences" />
2127

2228
<StackPanel>
29+
<StackPanel.ChildrenTransitions>
30+
<TransitionCollection>
31+
<RepositionThemeTransition />
32+
</TransitionCollection>
33+
</StackPanel.ChildrenTransitions>
34+
2335
<Grid HorizontalAlignment="Stretch">
2436
<Grid.ColumnDefinitions>
2537
<ColumnDefinition Width="260" />
2638
<ColumnDefinition Width="*" MaxWidth="470" />
2739
</Grid.ColumnDefinitions>
40+
<Grid.ChildrenTransitions>
41+
<TransitionCollection>
42+
<RepositionThemeTransition />
43+
</TransitionCollection>
44+
</Grid.ChildrenTransitions>
2845

2946
<TextBlock
3047
Grid.Column="0"
@@ -57,6 +74,11 @@
5774
<RowDefinition Height="44" />
5875
<RowDefinition Height="44" />
5976
</Grid.RowDefinitions>
77+
<Grid.ChildrenTransitions>
78+
<TransitionCollection>
79+
<RepositionThemeTransition />
80+
</TransitionCollection>
81+
</Grid.ChildrenTransitions>
6082

6183
<TextBlock
6284
Grid.Row="0"
@@ -179,6 +201,11 @@
179201
<ColumnDefinition Width="200" />
180202
<ColumnDefinition Width="*" MaxWidth="530" />
181203
</Grid.ColumnDefinitions>
204+
<Grid.ChildrenTransitions>
205+
<TransitionCollection>
206+
<RepositionThemeTransition />
207+
</TransitionCollection>
208+
</Grid.ChildrenTransitions>
182209

183210
<TextBlock
184211
Grid.Column="0"

Files/View Models/RibbonViewModel.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ public class RibbonViewModel : ViewModelBase
1010
private bool _ShowRibbonContent = true;
1111
private string _ToggleRibbonIcon = "";
1212
private CommandBarLabelPosition _ItemLabelPosition = CommandBarLabelPosition.Default;
13+
private Windows.UI.Xaml.Visibility _AppBarSeparatorVisibility = Windows.UI.Xaml.Visibility.Visible;
14+
1315
public string ToggleRibbonIcon
1416
{
1517
get => _ToggleRibbonIcon;
@@ -28,6 +30,12 @@ public CommandBarLabelPosition ItemLabelPosition
2830
set => Set(ref _ItemLabelPosition, value);
2931
}
3032

33+
public Windows.UI.Xaml.Visibility AppBarSeparatorVisibility
34+
{
35+
get => _AppBarSeparatorVisibility;
36+
set => Set(ref _AppBarSeparatorVisibility, value);
37+
}
38+
3139
private RelayCommand toggleRibbon;
3240
public RelayCommand ToggleRibbon => toggleRibbon = new RelayCommand(() =>
3341
{
@@ -68,5 +76,15 @@ public void ShowItemLabels()
6876
{
6977
ItemLabelPosition = CommandBarLabelPosition.Default;
7078
}
79+
80+
public void HideAppBarSeparator()
81+
{
82+
AppBarSeparatorVisibility = Windows.UI.Xaml.Visibility.Collapsed;
83+
}
84+
85+
public void ShowAppBarSeparator()
86+
{
87+
AppBarSeparatorVisibility = Windows.UI.Xaml.Visibility.Visible;
88+
}
7189
}
7290
}

0 commit comments

Comments
 (0)