Skip to content

Commit fdc91da

Browse files
committed
Update ToolbarCustomizationPage.xaml
1 parent f5a872b commit fdc91da

1 file changed

Lines changed: 42 additions & 17 deletions

File tree

src/Files.App/Views/Settings/ToolbarCustomizationPage.xaml

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,26 @@
7676
</Grid>
7777

7878
<!-- Context picker -->
79-
<Grid
80-
Grid.Row="1"
81-
Padding="16,12"
82-
ColumnSpacing="12">
83-
<Grid.ColumnDefinitions>
84-
<ColumnDefinition Width="Auto" />
85-
<ColumnDefinition Width="*" />
86-
</Grid.ColumnDefinitions>
87-
<TextBlock VerticalAlignment="Center" Text="{helpers:ResourceString Name=ChooseToolbarModeToCustomize}" />
88-
<uc:ComboBoxEx
89-
Grid.Column="1"
90-
MinWidth="220"
91-
AutomationProperties.Name="{helpers:ResourceString Name=ChooseToolbarModeToCustomize}"
92-
DisplayMemberPath="Value"
93-
ItemsSource="{x:Bind ViewModel.ToolbarContexts, Mode=OneWay}"
94-
SelectedValue="{x:Bind ViewModel.SelectedToolbarContextId, Mode=TwoWay}"
95-
SelectedValuePath="Key" />
79+
<Grid Grid.Row="1" Padding="16,12">
80+
<StackPanel
81+
x:Name="ContextPickerPanel"
82+
Orientation="Horizontal"
83+
Spacing="12">
84+
<TextBlock
85+
x:Name="ToolbarModeLabel"
86+
VerticalAlignment="Center"
87+
Text="{helpers:ResourceString Name=ChooseToolbarModeToCustomize}"
88+
TextWrapping="WrapWholeWords" />
89+
<uc:ComboBoxEx
90+
x:Name="ToolbarModeComboBox"
91+
Width="240"
92+
HorizontalAlignment="Left"
93+
AutomationProperties.Name="{helpers:ResourceString Name=ChooseToolbarModeToCustomize}"
94+
DisplayMemberPath="Value"
95+
ItemsSource="{x:Bind ViewModel.ToolbarContexts, Mode=OneWay}"
96+
SelectedValue="{x:Bind ViewModel.SelectedToolbarContextId, Mode=TwoWay}"
97+
SelectedValuePath="Key" />
98+
</StackPanel>
9699
</Grid>
97100

98101
<!-- Available and Added items -->
@@ -346,5 +349,27 @@
346349
Content="{helpers:ResourceString Name=Cancel}" />
347350
</StackPanel>
348351
</Grid>
352+
<VisualStateManager.VisualStateGroups>
353+
<VisualStateGroup>
354+
<VisualState x:Name="DefaultContextPickerState">
355+
<VisualState.StateTriggers>
356+
<AdaptiveTrigger MinWindowWidth="640" />
357+
</VisualState.StateTriggers>
358+
<VisualState.Setters>
359+
<Setter Target="ContextPickerPanel.Orientation" Value="Horizontal" />
360+
<Setter Target="ContextPickerPanel.Spacing" Value="12" />
361+
</VisualState.Setters>
362+
</VisualState>
363+
<VisualState x:Name="CompactContextPickerState">
364+
<VisualState.StateTriggers>
365+
<AdaptiveTrigger MinWindowWidth="0" />
366+
</VisualState.StateTriggers>
367+
<VisualState.Setters>
368+
<Setter Target="ContextPickerPanel.Orientation" Value="Vertical" />
369+
<Setter Target="ContextPickerPanel.Spacing" Value="8" />
370+
</VisualState.Setters>
371+
</VisualState>
372+
</VisualStateGroup>
373+
</VisualStateManager.VisualStateGroups>
349374
</Grid>
350375
</Page>

0 commit comments

Comments
 (0)