Skip to content

Commit e4ead5d

Browse files
authored
fixed text input window text unreadable in dark mode (#309)
1 parent dd67ab7 commit e4ead5d

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

BardMusicPlayer/Resources/TextInputWindow.xaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
ResizeMode="CanMinimize">
1111
<Grid>
1212
<Grid.RowDefinitions>
13-
<RowDefinition Height="15" />
13+
<RowDefinition Height="Auto" />
1414
<RowDefinition Height="Auto" />
1515
<RowDefinition Height="5" />
1616
<RowDefinition Height="Auto" />
@@ -22,19 +22,19 @@
2222
<ColumnDefinition Width="10" />
2323
</Grid.ColumnDefinitions>
2424

25-
<TextBlock Grid.Row="0" Grid.Column="1" x:Name="InfoText" />
26-
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" x:Name="ResponseTextBox" Padding="5"
27-
Background="{DynamicResource MaterialDesignBackground}" />
25+
<TextBlock Grid.Row="0" Grid.Column="1" x:Name="InfoText" Text="Info" Margin="0,20,0,0" Foreground="{DynamicResource MaterialDesignBody}" />
26+
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,10,0,0" x:Name="ResponseTextBox" Padding="5"
27+
Background="{DynamicResource MaterialDesignBackground}" Foreground="{DynamicResource MaterialDesignBody}" />
2828
<Grid Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2">
2929
<Grid.ColumnDefinitions>
3030
<ColumnDefinition Width="*" />
3131
<ColumnDefinition Width="55" />
32-
<ColumnDefinition Width="5" />
32+
<ColumnDefinition Width="10" />
3333
<ColumnDefinition Width="55" />
3434
</Grid.ColumnDefinitions>
35-
<Button Grid.Column="1" Content="_Okay" IsDefault="True" Click="OKButton_Click" Margin="0,20,0,0"
35+
<Button Grid.Column="1" Content="_Okay" IsDefault="True" Click="OKButton_Click" Margin="0,20,0,10"
3636
Padding="0" />
37-
<Button Grid.Column="3" Content="_Cancel" IsCancel="True" Click="CancelButton_Click" Margin="0,20,0,0"
37+
<Button Grid.Column="3" Content="_Cancel" IsCancel="True" Click="CancelButton_Click" Margin="0,20,0,10"
3838
Padding="0" />
3939
</Grid>
4040
</Grid>

BardMusicPlayer/Resources/TextInputWindow.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ namespace BardMusicPlayer.Resources;
77
/// </summary>
88
public partial class TextInputWindow
99
{
10-
public TextInputWindow(string infoText, int maxInputLength = 40)
10+
public TextInputWindow(string infoText, int maxInputLength = 40, string windowTitle = "")
1111
{
1212
InitializeComponent();
1313
InfoText.Text = infoText;
1414
ResponseTextBox.Focus();
1515
ResponseTextBox.MaxLength = maxInputLength;
16+
Title = windowTitle;
1617
}
1718

1819
public string ResponseText

BardMusicPlayer/UI_Classic/Classic_Playlist.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private void PlaylistContainer_SelectionChanged(object sender, SelectionChangedE
102102
/// <param name="e"></param>
103103
private void Playlist_New_Button_Click(object? sender, RoutedEventArgs? e)
104104
{
105-
var inputBox = new TextInputWindow("Playlist Name");
105+
var inputBox = new TextInputWindow("Playlist Name", windowTitle: "Create new playlist");
106106
if (inputBox.ShowDialog() == true)
107107
{
108108
if (inputBox.ResponseText.Length < 1)

0 commit comments

Comments
 (0)