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

Better dark mode #1992

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
19 changes: 14 additions & 5 deletions UndertaleModTool/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@
xmlns:local="clr-namespace:UndertaleModTool"
StartupUri="MainWindow.xaml">
<Application.Resources>
<local:ContextMenuDark x:Key="textBoxContextMenu">
<MenuItem Command="ApplicationCommands.Cut" />
<MenuItem Command="ApplicationCommands.Copy" />
<MenuItem Command="ApplicationCommands.Paste" />
</local:ContextMenuDark>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/ColourDictionaries/LightTheme.xaml" />
<ResourceDictionary Source="Themes/ControlColours.xaml" />
<ResourceDictionary Source="Themes/Controls.xaml" />
<ResourceDictionary>
<ContextMenu x:Key="textBoxContextMenu">
<MenuItem Command="ApplicationCommands.Cut" />
<MenuItem Command="ApplicationCommands.Copy" />
<MenuItem Command="ApplicationCommands.Paste" />
</ContextMenu>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
30 changes: 15 additions & 15 deletions UndertaleModTool/Controls/AudioFileReference.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
mc:Ignorable="d"
d:DesignHeight="20" d:DesignWidth="300">
<UserControl.Resources>
<local:ContextMenuDark x:Key="contextMenu">
<local:MenuItemDark Header="Open in new tab" Click="OpenInNewTabItem_Click"/>
</local:ContextMenuDark>
<ContextMenu x:Key="contextMenu">
<MenuItem Header="Open in new tab" Click="OpenInNewTabItem_Click"/>
</ContextMenu>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
Expand All @@ -18,9 +18,9 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<local:TextBoxDark Grid.Column="0" Text="{Binding AudioID}">
<TextBox Grid.Column="0" Text="{Binding AudioID}">
<TextBox.Style>
<Style TargetType="{x:Type TextBox}">
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Style.Triggers>
<DataTrigger Binding="{Binding GroupID}" Value="0">
<DataTrigger.Setters>
Expand All @@ -30,13 +30,13 @@
</Style.Triggers>
</Style>
</TextBox.Style>
</local:TextBoxDark>
<local:TextBoxDark Grid.Column="1" x:Name="ObjectText" IsReadOnly="True" Cursor="Arrow" AllowDrop="True"
</TextBox>
<TextBox Grid.Column="1" x:Name="ObjectText" IsReadOnly="True" Cursor="Arrow" AllowDrop="True"
ToolTip="This is an object reference. Drag and drop an object of matching type from the tree on the left to change it!"
ToolTipService.InitialShowDelay="250"
PreviewDragOver="TextBox_DragOver" PreviewDrop="TextBox_Drop" PreviewMouseDoubleClick="TextBox_MouseDoubleClick" PreviewMouseDown="Details_MouseDown">
<TextBox.Style>
<Style TargetType="{x:Type TextBox}">
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="Text">
<Setter.Value>
<MultiBinding StringFormat="{}(UndertaleEmbeddedAudio#{0})">
Expand Down Expand Up @@ -66,21 +66,21 @@
</Style.Triggers>
</Style>
</TextBox.Style>
</local:TextBoxDark>
<local:ButtonDark Grid.Column="2" Click="Details_Click" MouseDown="Details_MouseDown" Content=" ... " ToolTip="Open referenced object">
</TextBox>
<Button Grid.Column="2" Click="Details_Click" MouseDown="Details_MouseDown" Content=" ... " ToolTip="Open referenced object">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Style.Triggers>
<DataTrigger Binding="{Binding AudioReference, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="{x:Null}">
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</local:ButtonDark>
<local:ButtonDark Grid.Column="3" Click="Remove_Click" Content=" X " ToolTip="Remove reference">
</Button>
<Button Grid.Column="3" Click="Remove_Click" Content=" X " ToolTip="Remove reference">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Style.Triggers>
<DataTrigger Binding="{Binding AudioReference, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="{x:Null}">
<DataTrigger.Setters>
Expand All @@ -90,6 +90,6 @@
</Style.Triggers>
</Style>
</Button.Style>
</local:ButtonDark>
</Button>
</Grid>
</UserControl>
2 changes: 1 addition & 1 deletion UndertaleModTool/Controls/ColorPicker.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</Border>
</Viewbox>

<local:TextBoxDark x:Name="ColorText" Grid.Column="1" MaxLength="9" ToolTip="#AABBGGRR"/>
<TextBox x:Name="ColorText" Grid.Column="1" MaxLength="9" ToolTip="#AABBGGRR"/>
<!-- "Text" binding is in the code of "ColorPicker" -->
</Grid>
</UserControl>
36 changes: 0 additions & 36 deletions UndertaleModTool/Controls/System/ButtonDark.cs

This file was deleted.

52 changes: 0 additions & 52 deletions UndertaleModTool/Controls/System/ComboBoxDark.cs

This file was deleted.

110 changes: 0 additions & 110 deletions UndertaleModTool/Controls/System/ContextMenuDark.cs

This file was deleted.

61 changes: 0 additions & 61 deletions UndertaleModTool/Controls/System/DataGridDark.cs

This file was deleted.

Loading
Loading