Refine UI layout in PLib video library manager by adjusting MainWindow and SettingsView for a more cohesive design. Implement dedicated styles for panel headers and footers, ensuring consistent visual hierarchy. Update README.md to document these layout enhancements and style changes.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
Title="PLib — видеотека"
|
||||
Width="1180"
|
||||
Height="760"
|
||||
MinWidth="1000"
|
||||
MinWidth="900"
|
||||
MinHeight="420"
|
||||
Background="{DynamicResource PageBackgroundBrush}"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
@@ -95,9 +95,7 @@
|
||||
|
||||
</Window.Resources>
|
||||
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
|
||||
<Grid Grid.Column="0" RowDefinitions="Auto,*,Auto">
|
||||
<Grid RowDefinitions="Auto,*,Auto">
|
||||
|
||||
<!-- ======================= Header ======================= -->
|
||||
<Border Grid.Row="0" Classes="appBar">
|
||||
@@ -153,10 +151,7 @@
|
||||
<icons:MaterialIcon Kind="CogOutline" Width="17" Height="17" />
|
||||
</Button>
|
||||
|
||||
<!-- Redundant while the panel is open, and the header needs the room there. -->
|
||||
<Button Classes="Primary"
|
||||
Command="{Binding AddFolderCommand}"
|
||||
IsVisible="{Binding !IsSettingsOpen}">
|
||||
<Button Classes="Primary" Command="{Binding AddFolderCommand}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="7">
|
||||
<icons:MaterialIcon Kind="FolderPlusOutline" Width="17" Height="17" />
|
||||
<TextBlock Text="Добавить папку" />
|
||||
@@ -167,8 +162,10 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- ======================= Grid ======================= -->
|
||||
<Panel Grid.Row="1">
|
||||
<!-- =================== Library and settings =================== -->
|
||||
<Grid Grid.Row="1" ColumnDefinitions="*,Auto">
|
||||
|
||||
<Panel Grid.Column="0">
|
||||
|
||||
<ScrollViewer Padding="20,18" HorizontalScrollBarVisibility="Disabled">
|
||||
<ItemsRepeater ItemsSource="{Binding Videos}" ItemTemplate="{StaticResource VideoCardTemplate}">
|
||||
@@ -208,7 +205,19 @@
|
||||
Content="Выбрать папку" />
|
||||
</StackPanel>
|
||||
|
||||
</Panel>
|
||||
</Panel>
|
||||
|
||||
<!-- The panel is a column of the content row, so the bars above and below it stay
|
||||
whole: one header and one status bar belonging to the window, not two of each. -->
|
||||
<Border Grid.Column="1" Classes="settingsPanel" Classes.open="{Binding IsSettingsOpen}">
|
||||
<ContentControl Width="400"
|
||||
Content="{Binding SettingsPanel}"
|
||||
ContentTemplate="{StaticResource SettingsTemplate}" />
|
||||
</Border>
|
||||
|
||||
<Rectangle Grid.Column="1" Classes="panelDivider" IsVisible="{Binding IsSettingsOpen}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- ======================= Status bar ======================= -->
|
||||
<Border Grid.Row="2" Classes="statusBar">
|
||||
@@ -237,14 +246,5 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- ======================= Settings panel ======================= -->
|
||||
<Border Grid.Column="1" Classes="settingsPanel" Classes.open="{Binding IsSettingsOpen}">
|
||||
<ContentControl Width="400"
|
||||
Content="{Binding SettingsPanel}"
|
||||
ContentTemplate="{StaticResource SettingsTemplate}" />
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -31,34 +31,20 @@
|
||||
<Grid RowDefinitions="Auto,*,Auto">
|
||||
|
||||
<!-- ======================= Header ======================= -->
|
||||
<Border Grid.Row="0" Classes="appBar">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||
<Border Grid.Column="0"
|
||||
Width="32"
|
||||
Height="32"
|
||||
CornerRadius="9"
|
||||
Background="{DynamicResource AccentSoftBrush}">
|
||||
<icons:MaterialIcon Kind="CogOutline"
|
||||
Width="18"
|
||||
Height="18"
|
||||
Foreground="{DynamicResource AccentBrush}" />
|
||||
</Border>
|
||||
<TextBlock Grid.Column="1"
|
||||
Classes="sectionTitle"
|
||||
Margin="10,0,0,0"
|
||||
Text="Настройки"
|
||||
VerticalAlignment="Center" />
|
||||
<Button Grid.Column="2"
|
||||
<Border Grid.Row="0" Classes="panelHeader">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0" Classes="panelTitle" Text="Настройки" />
|
||||
<Button Grid.Column="1"
|
||||
Command="{Binding CancelCommand}"
|
||||
Padding="7"
|
||||
Padding="6"
|
||||
ToolTip.Tip="Закрыть без сохранения">
|
||||
<icons:MaterialIcon Kind="Close" Width="15" Height="15" />
|
||||
<icons:MaterialIcon Kind="Close" Width="14" Height="14" />
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- ======================= Body ======================= -->
|
||||
<ScrollViewer Grid.Row="1" Padding="20,18">
|
||||
<ScrollViewer Grid.Row="1" Padding="16,14">
|
||||
<StackPanel Spacing="14">
|
||||
|
||||
<!-- Folders -->
|
||||
@@ -223,7 +209,7 @@
|
||||
</ScrollViewer>
|
||||
|
||||
<!-- ======================= Footer ======================= -->
|
||||
<Border Grid.Row="2" Classes="statusBar">
|
||||
<Border Grid.Row="2" Classes="panelFooter">
|
||||
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="14">
|
||||
<TextBlock Grid.Column="0"
|
||||
Classes="hint"
|
||||
|
||||
Reference in New Issue
Block a user