Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions Files/MultilingualResources/Files.de-DE.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,8 @@
</trans-unit>
<trans-unit id="DriveFreeSpaceAndCapacity" translate="yes" xml:space="preserve">
<source>{0} free of {1}</source>
<target state="translated" state-qualifier="tm-suggestion">{0} frei von {1}</target><!---Need to know the context (Available space?)-->
<target state="translated" state-qualifier="tm-suggestion">{0} frei von {1}</target>
<!---Need to know the context (Available space?)-->
</trans-unit>
<trans-unit id="BaseLayoutItemContextFlyoutOpenItemWith.Text" translate="yes" xml:space="preserve">
<source>Open With</source>
Expand Down Expand Up @@ -1016,4 +1017,4 @@
</group>
</body>
</file>
</xliff>
</xliff>
2 changes: 1 addition & 1 deletion Files/MultilingualResources/Files.it-IT.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1010,4 +1010,4 @@
</group>
</body>
</file>
</xliff>
</xliff>
2 changes: 1 addition & 1 deletion Files/Strings/de-DE/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@
<value>Okay</value>
</data>
<data name="TabStripAddNewTab.ToolTipService.ToolTip" xml:space="preserve">
<value>Neue Registerkarte Strg+T</value>
<value>Neue Registerkarte (Strg + T)</value>
</data>
<data name="ItemSelected.Text" xml:space="preserve">
<value>Element ausgewählt</value>
Expand Down
11 changes: 5 additions & 6 deletions Files/UserControls/SidebarControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,32 +95,31 @@
</Grid.Resources>
<muxc:NavigationView
x:Name="SidebarNavView"
Width="200"
HorizontalAlignment="Stretch"
IsBackButtonVisible="Collapsed"
IsPaneOpen="True"
OpenPaneLength="500"
IsPaneToggleButtonVisible="False"
IsSettingsVisible="False"
IsTitleBarAutoPaddingEnabled="False"
ItemInvoked="Sidebar_ItemInvoked"
MenuItemTemplateSelector="{StaticResource NavItemSelector}"
MenuItemsSource="{x:Bind local3:MainPage.sideBarItems, Mode=OneWay}"
OpenPaneLength="200"
PaneDisplayMode="Left"
SelectedItem="{x:Bind SelectedSidebarItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<muxc:NavigationView.PaneFooter>
<Grid Width="200">
<Grid>
<Button
x:Name="SettingsButton"
Width="200"
Height="40"
HorizontalAlignment="Left"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left"
Background="Transparent"
BorderBrush="{StaticResource ButtonRevealBorderBrush}"
Click="SettingsButton_Click"
CornerRadius="0">
<Button.Content>
<Grid Width="200">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="34" />
<ColumnDefinition Width="*" />
Expand Down
6 changes: 6 additions & 0 deletions Files/View Models/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public DefaultLanguageModel DefaultLanguage
}
}

public GridLength SidebarWidth
{
get => new GridLength(Math.Min(Math.Max(Get(200d), 200d), 500d), GridUnitType.Pixel);
set => Set(value.Value);
}

public SortOption DirectorySortOption
{
get => (SortOption)SortOptionByte;
Expand Down
62 changes: 60 additions & 2 deletions Files/Views/ModernShellPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,46 @@
KeyboardAcceleratorPlacementMode="Hidden"
Loaded="Page_Loaded"
mc:Ignorable="d">
<Page.Resources>
<ResourceDictionary>
<Style x:Key="DefaultGridSplitterStyle" TargetType="Custom:GridSplitter">
<Setter Property="IsTabStop" Value="True"/>
<Setter Property="UseSystemFocusVisuals" Value="True"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="IsFocusEngagementEnabled" Value="True"/>
<Setter Property="MinWidth" Value="2"/>
<Setter Property="MinHeight" Value="2"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="GripperForeground" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Custom:GridSplitter">
<Grid x:Name="RootGrid" Background="Transparent">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="GridSplitterStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter Target="RootGrid.Background" Value="Transparent"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Pressed">
<VisualState.Setters>
<Setter Target="RootGrid.Background" Value="Transparent"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ContentPresenter Content="{TemplateBinding Element}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Page.Resources>

<Page.KeyboardAccelerators>
<KeyboardAccelerator
Key="N"
Expand Down Expand Up @@ -79,8 +119,8 @@

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="{x:Bind AppSettings.SidebarWidth, Mode=TwoWay}" MinWidth="200" MaxWidth="500" />
<ColumnDefinition Width="*" MinWidth="300" />
</Grid.ColumnDefinitions>

<Grid>
Expand Down Expand Up @@ -125,5 +165,23 @@
</Grid>
</Custom:DropShadowPanel>
</Grid>
<Custom:GridSplitter x:Name="SidebarResizer"
Canvas.ZIndex="150"
MinWidth="5"
Background="Transparent"
Foreground="Transparent"
GripperForeground="Transparent"
GripperCursor="Default"
HorizontalAlignment="Left"
Grid.Column="1"
ResizeDirection="Auto"
ResizeBehavior="BasedOnAlignment"
CursorBehavior="ChangeOnSplitterHover"
Width="5"
Style="{StaticResource DefaultGridSplitterStyle}">
<Custom:GridSplitter.RenderTransform>
<TranslateTransform X="0" />
</Custom:GridSplitter.RenderTransform>
</Custom:GridSplitter>
</Grid>
</Page>