Skip to content

Commit 36161a0

Browse files
committed
Update UI
1 parent 92328b4 commit 36161a0

10 files changed

Lines changed: 35 additions & 22 deletions

BilibiliLiveRecordDownLoader/App.xaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
<!-- ModernWPF controls resources -->
3434
<ui:XamlControlsResources />
3535
</ResourceDictionary.MergedDictionaries>
36+
<!-- Override Colors -->
37+
<SolidColorBrush x:Key="NavigationViewDefaultPaneBackground" Color="Transparent" />
38+
<SolidColorBrush x:Key="NavigationViewExpandedPaneBackground" Color="Transparent" />
39+
<SolidColorBrush x:Key="NavigationViewTopPaneBackground" Color="Transparent" />
40+
<!-- Converters -->
3641
<valueConverters:LiveStatusToBrushConverter x:Key="LiveStatusToBrushConverter" />
3742
<valueConverters:DanmuClientTypeToIntConverter x:Key="DanmuClientTypeToIntConverter" />
3843
<valueConverters:QnToStringConverter x:Key="QnToStringConverter" />

BilibiliLiveRecordDownLoader/MainWindow.xaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<ui:NavigationView
3939
x:Name="NavigationView"
4040
IsBackButtonVisible="Collapsed"
41-
PaneDisplayMode="Auto"
41+
PaneDisplayMode="Left"
4242
IsTabStop="False"
4343
IsPaneOpen="False">
4444
<ui:NavigationView.MenuItems>
@@ -49,13 +49,15 @@
4949
<ui:NavigationViewItem Icon="Message" Content="日志" Tag="3" />
5050
<ui:NavigationViewItem Icon="61272" Content="用户设置" Tag="5" />
5151
</ui:NavigationView.MenuItems>
52-
<reactiveUi:RoutedViewHost
53-
x:Name="RoutedViewHost"
54-
HorizontalContentAlignment="Stretch"
55-
VerticalContentAlignment="Stretch"
56-
Transition="Fade"
57-
Direction="Up"
58-
Duration="0:0:0.3" />
52+
<Border Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
53+
<reactiveUi:RoutedViewHost
54+
x:Name="RoutedViewHost"
55+
HorizontalContentAlignment="Stretch"
56+
VerticalContentAlignment="Stretch"
57+
Transition="Fade"
58+
Direction="Up"
59+
Duration="0:0:0.3" />
60+
</Border>
5961
</ui:NavigationView>
6062
</Grid>
6163
</reactiveUi:ReactiveWindow>

BilibiliLiveRecordDownLoader/MainWindow.xaml.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public MainWindow(
4242
{
4343
if (args.EventArgs.IsSettingsSelected)
4444
{
45-
ViewModel.Router.Navigate.Execute(settings);
45+
ViewModel.Router.NavigateAndReset.Execute(settings);
4646
return;
4747
}
4848

@@ -55,32 +55,32 @@ public MainWindow(
5555
{
5656
case @"1":
5757
{
58-
ViewModel.Router.Navigate.Execute(liveRecordList);
58+
ViewModel.Router.NavigateAndReset.Execute(liveRecordList);
5959
break;
6060
}
6161
case @"2":
6262
{
63-
ViewModel.Router.Navigate.Execute(taskList);
63+
ViewModel.Router.NavigateAndReset.Execute(taskList);
6464
break;
6565
}
6666
case @"3":
6767
{
68-
ViewModel.Router.Navigate.Execute(log);
68+
ViewModel.Router.NavigateAndReset.Execute(log);
6969
break;
7070
}
7171
case @"4":
7272
{
73-
ViewModel.Router.Navigate.Execute(streamRecord);
73+
ViewModel.Router.NavigateAndReset.Execute(streamRecord);
7474
break;
7575
}
7676
case @"5":
7777
{
78-
ViewModel.Router.Navigate.Execute(userSettings);
78+
ViewModel.Router.NavigateAndReset.Execute(userSettings);
7979
break;
8080
}
8181
case @"6":
8282
{
83-
ViewModel.Router.Navigate.Execute(ffmpegCommand);
83+
ViewModel.Router.NavigateAndReset.Execute(ffmpegCommand);
8484
break;
8585
}
8686
}

BilibiliLiveRecordDownLoader/Views/FFmpegCommandView.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
xmlns:ui="http://schemas.modernwpf.com/2019"
1111
xmlns:wpfMaskedTextBox="clr-namespace:WPFMaskedTextBox;assembly=WPFMaskedTextBox"
1212
mc:Ignorable="d"
13-
d:DesignHeight="550" d:DesignWidth="800" Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
13+
d:DesignHeight="550" d:DesignWidth="800"
14+
d:Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
1415
<Grid Margin="20,25,0,0">
1516
<ScrollViewer>
1617
<ui:SimpleStackPanel Spacing="0" Margin="0,0,20,0">

BilibiliLiveRecordDownLoader/Views/LiveRecordListView.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
xmlns:controls="http://schemas.modernwpf.com/2019"
1111
xmlns:models="clr-namespace:BilibiliLiveRecordDownLoader.Models"
1212
mc:Ignorable="d"
13-
d:DesignHeight="450" d:DesignWidth="800" Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
13+
d:DesignHeight="450" d:DesignWidth="800"
14+
d:Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
1415
<Grid Margin="10,15,0,0">
1516
<DockPanel>
1617
<controls:SimpleStackPanel

BilibiliLiveRecordDownLoader/Views/LogView.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
xmlns:reactiveUi="http://reactiveui.net"
99
xmlns:viewModels="clr-namespace:BilibiliLiveRecordDownLoader.ViewModels"
1010
mc:Ignorable="d"
11-
d:DesignHeight="450" d:DesignWidth="800" Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
11+
d:DesignHeight="450" d:DesignWidth="800"
12+
d:Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
1213
<Grid Margin="0,30,0,0">
1314
<TextBox x:Name="LogTextBox"
1415
IsReadOnly="True"

BilibiliLiveRecordDownLoader/Views/SettingView.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
xmlns:viewModels="clr-namespace:BilibiliLiveRecordDownLoader.ViewModels"
1010
xmlns:ui="http://schemas.modernwpf.com/2019"
1111
mc:Ignorable="d"
12-
d:DesignHeight="1200" d:DesignWidth="800" Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
12+
d:DesignHeight="1200" d:DesignWidth="800"
13+
d:Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
1314
<Grid Margin="20,25,0,0">
1415
<ScrollViewer>
1516
<ui:SimpleStackPanel Spacing="0" Margin="0,0,20,0">

BilibiliLiveRecordDownLoader/Views/StreamRecordView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
xmlns:controls="http://schemas.modernwpf.com/2019"
1212
mc:Ignorable="d"
1313
d:DesignHeight="450" d:DesignWidth="800"
14-
Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
14+
d:Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
1515
<Grid Margin="0,30,0,0">
1616
<DataGrid
1717
x:Name="RoomListDataGrid"

BilibiliLiveRecordDownLoader/Views/TaskListView.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
xmlns:ui="http://schemas.modernwpf.com/2019"
1111
xmlns:taskViewModels="clr-namespace:BilibiliLiveRecordDownLoader.Models.TaskViewModels"
1212
mc:Ignorable="d"
13-
d:DesignHeight="450" d:DesignWidth="800" Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
13+
d:DesignHeight="450" d:DesignWidth="800"
14+
d:Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
1415
<Grid Margin="0,30,0,0">
1516
<DataGrid
1617
x:Name="TaskListDataGrid"

BilibiliLiveRecordDownLoader/Views/UserSettingsView.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
xmlns:ui="http://schemas.modernwpf.com/2019"
1111
xmlns:constants="clr-namespace:BilibiliLiveRecordDownLoader.Shared.Utils;assembly=BilibiliLiveRecordDownLoader.Shared"
1212
mc:Ignorable="d"
13-
d:DesignHeight="600" d:DesignWidth="800" Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
13+
d:DesignHeight="600" d:DesignWidth="800"
14+
d:Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
1415
<Grid Margin="20,25,0,0">
1516
<ScrollViewer>
1617
<ui:SimpleStackPanel Spacing="0" Margin="0,0,20,0">

0 commit comments

Comments
 (0)