Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Hide toggle for adaptive layout when it's not available to be used #16701

Merged
merged 6 commits into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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