Skip to content

Commit

Permalink
Feature: Hide toggle for adaptive layout when it's not available to b…
Browse files Browse the repository at this point in the history
…e used (#16701)
  • Loading branch information
Lamparter authored Jan 14, 2025
1 parent 7a45c4e commit e8ed94d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Files.App/UserControls/InnerNavigationToolbar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1122,9 +1122,9 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition MinHeight="30" />
<RowDefinition MinHeight="30" />
<RowDefinition MinHeight="30" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<!-- Show Hidden Files -->
Expand Down Expand Up @@ -1164,22 +1164,25 @@

<!-- Adaptive Layout -->
<TextBlock
x:Name="AdaptiveLayoutTextBlock"
Grid.Row="2"
Grid.Column="0"
VerticalAlignment="Center"
x:Load="{x:Bind Commands.LayoutAdaptive.IsExecutable, Mode=OneWay}"
Text="{x:Bind Commands.LayoutAdaptive.Label}" />

<ToggleSwitch
x:Name="AdaptiveLayoutToggleSwitch"
Grid.Row="2"
Grid.Column="1"
HorizontalAlignment="Right"
x:Load="{x:Bind Commands.LayoutAdaptive.IsExecutable, Mode=OneWay}"
AutomationProperties.Name="{x:Bind Commands.LayoutAdaptive.AutomationName}"
IsEnabled="{x:Bind Commands.LayoutAdaptive.IsExecutable, Mode=OneWay}"
IsOn="{x:Bind Commands.LayoutAdaptive.IsOn, Mode=TwoWay}"
Rotation="1"
Style="{StaticResource RightAlignedToggleSwitchStyle}"
ToolTipService.ToolTip="{x:Bind Commands.LayoutAdaptive.LabelWithHotKey, Mode=OneWay}" />

</Grid>

</StackPanel>
Expand Down

0 comments on commit e8ed94d

Please sign in to comment.