Skip to content

Commit e8ed94d

Browse files
authored
Feature: Hide toggle for adaptive layout when it's not available to be used (#16701)
1 parent 7a45c4e commit e8ed94d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Files.App/UserControls/InnerNavigationToolbar.xaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,9 +1122,9 @@
11221122
<ColumnDefinition Width="Auto" />
11231123
</Grid.ColumnDefinitions>
11241124
<Grid.RowDefinitions>
1125-
<RowDefinition MinHeight="30" />
1126-
<RowDefinition MinHeight="30" />
1127-
<RowDefinition MinHeight="30" />
1125+
<RowDefinition Height="Auto" />
1126+
<RowDefinition Height="Auto" />
1127+
<RowDefinition Height="Auto" />
11281128
</Grid.RowDefinitions>
11291129

11301130
<!-- Show Hidden Files -->
@@ -1164,22 +1164,25 @@
11641164

11651165
<!-- Adaptive Layout -->
11661166
<TextBlock
1167+
x:Name="AdaptiveLayoutTextBlock"
11671168
Grid.Row="2"
11681169
Grid.Column="0"
11691170
VerticalAlignment="Center"
1171+
x:Load="{x:Bind Commands.LayoutAdaptive.IsExecutable, Mode=OneWay}"
11701172
Text="{x:Bind Commands.LayoutAdaptive.Label}" />
11711173

11721174
<ToggleSwitch
1175+
x:Name="AdaptiveLayoutToggleSwitch"
11731176
Grid.Row="2"
11741177
Grid.Column="1"
11751178
HorizontalAlignment="Right"
1179+
x:Load="{x:Bind Commands.LayoutAdaptive.IsExecutable, Mode=OneWay}"
11761180
AutomationProperties.Name="{x:Bind Commands.LayoutAdaptive.AutomationName}"
11771181
IsEnabled="{x:Bind Commands.LayoutAdaptive.IsExecutable, Mode=OneWay}"
11781182
IsOn="{x:Bind Commands.LayoutAdaptive.IsOn, Mode=TwoWay}"
11791183
Rotation="1"
11801184
Style="{StaticResource RightAlignedToggleSwitchStyle}"
11811185
ToolTipService.ToolTip="{x:Bind Commands.LayoutAdaptive.LabelWithHotKey, Mode=OneWay}" />
1182-
11831186
</Grid>
11841187

11851188
</StackPanel>

0 commit comments

Comments
 (0)