[GUI] Clean up the UI

This commit is contained in:
Alexey Golub
2020-10-05 17:41:09 +03:00
parent 239c47c06e
commit a6bf546e79
7 changed files with 56 additions and 53 deletions

View File

@@ -54,7 +54,7 @@
<Run Text="{Binding Channels[0].Category, Mode=OneWay}" ToolTip="{Binding Channels[0].Category, Mode=OneWay}" />
<Run Text="/" />
<Run
FontWeight="DemiBold"
FontWeight="SemiBold"
Text="{Binding Channels[0].Name, Mode=OneWay}"
ToolTip="{Binding Channels[0].Name, Mode=OneWay}" />
</TextBlock>

View File

@@ -17,14 +17,6 @@
FontSize="17"
Text="Settings" />
<!-- Date format -->
<TextBox
Margin="16,8"
materialDesign:HintAssist.Hint="Date format"
materialDesign:HintAssist.IsFloating="True"
Text="{Binding DateFormat}"
ToolTip="Format used when rendering dates (refer to .NET date format)" />
<!-- Auto-updates -->
<DockPanel
Background="Transparent"
@@ -40,6 +32,24 @@
IsChecked="{Binding IsAutoUpdateEnabled}" />
</DockPanel>
<!-- Dark mode -->
<DockPanel
Background="Transparent"
LastChildFill="False"
ToolTip="Use darker colors in the UI">
<TextBlock
Margin="16,8"
DockPanel.Dock="Left"
Text="Dark mode" />
<ToggleButton
x:Name="DarkModeToggleButton"
Margin="16,8"
Checked="DarkModeToggleButton_Checked"
DockPanel.Dock="Right"
IsChecked="{Binding IsDarkModeEnabled}"
Unchecked="DarkModeToggleButton_Unchecked" />
</DockPanel>
<!-- Persist token -->
<DockPanel
Background="Transparent"
@@ -55,31 +65,22 @@
IsChecked="{Binding IsTokenPersisted}" />
</DockPanel>
<!-- Dark/Light theme -->
<DockPanel
Background="Transparent"
LastChildFill="False"
ToolTip="Persist last used token between sessions">
<TextBlock
Margin="16,8"
DockPanel.Dock="Left"
Text="Dark theme" />
<ToggleButton
Margin="16,8"
Checked="ToggleButton_Checked"
DockPanel.Dock="Right"
IsChecked="{Binding IsDarkThemeEnabled}"
Unchecked="ToggleButton_Unchecked" />
</DockPanel>
<!-- Date format -->
<TextBox
Margin="16,8"
materialDesign:HintAssist.Hint="Date format"
materialDesign:HintAssist.IsFloating="True"
Text="{Binding DateFormat}"
ToolTip="Format used when rendering dates (uses .NET date formatting rules)" />
<!-- Parallel limit -->
<StackPanel Background="Transparent" ToolTip="How many channels can be exported at the same time">
<TextBlock Margin="16,8">
<TextBlock Margin="16,8,16,4">
<Run Text="Parallel limit:" />
<Run Text="{Binding ParallelLimit, Mode=OneWay}" />
</TextBlock>
<Slider
Margin="16,8"
Margin="16,4,16,8"
IsSnapToTickEnabled="True"
Maximum="10"
Minimum="1"

View File

@@ -9,12 +9,12 @@ namespace DiscordChatExporter.Gui.Views.Dialogs
InitializeComponent();
}
private void ToggleButton_Checked(object sender, RoutedEventArgs e)
private void DarkModeToggleButton_Checked(object sender, RoutedEventArgs e)
{
App.SetDarkTheme();
}
private void ToggleButton_Unchecked(object sender, RoutedEventArgs e)
private void DarkModeToggleButton_Unchecked(object sender, RoutedEventArgs e)
{
App.SetLightTheme();
}