Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit d6be952

Browse files
committed
changed the input boxes background
1 parent 86bb912 commit d6be952

File tree

2 files changed

+45
-22
lines changed

2 files changed

+45
-22
lines changed

UI/Windows/ConfigWindow.xaml

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
TitleCaps="False"
1414
ShowTitleBar="true"
1515
Closing="MetroWindow_Closing">
16-
16+
1717
<controls:MetroWindow.RightWindowCommands>
1818
<controls:WindowCommands>
1919
<Button Name="BackupConfigsButton" Content="Backup configs" Click="BackupConfigsButton_Click"/>
@@ -25,8 +25,13 @@
2525
<ResourceDictionary>
2626

2727
<Style x:Key="ListBoxStyle" BasedOn="{StaticResource {x:Type ListBox}}" TargetType="{x:Type ListBox}">
28-
<Setter Property="BorderBrush" Value="LightGray"/>
28+
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}"/>
2929
<Setter Property="BorderThickness" Value="1"/>
30+
<Setter Property="Background" Value="{DynamicResource GrayBrush10}"/>
31+
</Style>
32+
33+
<Style TargetType="ListBoxItem" BasedOn="{StaticResource MetroListBoxItem}">
34+
<Setter Property="Background" Value="{DynamicResource GrayBrush10}" />
3035
</Style>
3136

3237
<Style x:Key="DockPanelStyle" TargetType="DockPanel">
@@ -42,6 +47,22 @@
4247
<Setter Property="Margin" Value="0,5,0,5"/>
4348
</Style>
4449

50+
<Style TargetType="TextBox" BasedOn="{StaticResource MetroTextBox}">
51+
<Setter Property="Background" Value="{DynamicResource GrayBrush10}"/>
52+
</Style>
53+
54+
<Style TargetType="PasswordBox" BasedOn="{StaticResource MetroPasswordBox}">
55+
<Setter Property="Background" Value="{DynamicResource GrayBrush10}"/>
56+
</Style>
57+
58+
<Style x:Key="SearchMetroTextBoxStyle" TargetType="TextBox" BasedOn="{StaticResource SearchMetroTextBox}">
59+
<Setter Property="Background" Value="{DynamicResource GrayBrush10}"/>
60+
</Style>
61+
62+
<Style TargetType="ComboBox" BasedOn="{StaticResource MetroComboBox}">
63+
<Setter Property="Background" Value="{DynamicResource GrayBrush10}"/>
64+
</Style>
65+
4566
<Style TargetType="Separator">
4667
<Setter Property="Template">
4768
<Setter.Value>
@@ -67,19 +88,9 @@
6788
<Button Name="NewButton" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,5,0,0" Width="75" Content="New" Click="NewButton_Clicked" />
6889
<Button Name="DeleteButton" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="120,5,0,0" Width="75" Content="Delete" Click="DeleteButton_Clicked" />
6990
<ListBox Name="ConfigListBox" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="0,35,0,0" Width="200" SelectionChanged="ConfigListBox_SelectionChanged" />
70-
<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="200,30,0,0" Height="5" IsHitTestVisible="False">
71-
<Rectangle.Fill>
72-
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
73-
<GradientStopCollection>
74-
<GradientStop Offset="0" Color="Transparent" />
75-
<GradientStop Offset="1" Color="#44000000" />
76-
</GradientStopCollection>
77-
</LinearGradientBrush>
78-
</Rectangle.Fill>
79-
</Rectangle>
8091
<Line X1="200" X2="200" Y2="1000" VerticalAlignment="Stretch" Stroke="{DynamicResource BlackColorBrush}" StrokeThickness="1" />
81-
<ScrollViewer HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="201,35,0,0">
82-
<Grid Margin="0,5,0,5">
92+
<ScrollViewer HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="201,5,0,0">
93+
<Grid Margin="0,0,0,5">
8394
<StackPanel>
8495

8596
<!-- Section 1 -->
@@ -118,14 +129,14 @@
118129
<DockPanel>
119130
<TextBlock Name="CopyDirBlock" Text="Copy Directory: " IsHitTestVisible="False" />
120131
<TextBox Name="C_CopyDir" Margin="50,0,0,0" TextChanged="C_CopyDir_TextChanged"
121-
Style="{DynamicResource SearchMetroTextBox}"
132+
Style="{DynamicResource SearchMetroTextBoxStyle}"
122133
controls:TextBoxHelper.ButtonCommand="{Binding TextBoxButtonFolderCmd, Mode=OneWay, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
123134
</DockPanel>
124135

125136
<DockPanel>
126137
<TextBlock Name="ServerExeBlock" Text="Server Executable: " IsHitTestVisible="False" />
127138
<TextBox Name="C_ServerFile" Margin="50,0,0,0" TextChanged="C_ServerFile_TextChanged"
128-
Style="{StaticResource SearchMetroTextBox}"
139+
Style="{StaticResource SearchMetroTextBoxStyle}"
129140
controls:TextBoxHelper.ButtonCommand="{Binding TextBoxButtonFileCmd, Mode=OneWay, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
130141
</DockPanel>
131142

@@ -145,9 +156,7 @@
145156
<StackPanel Margin="5">
146157
<DockPanel>
147158
<TextBlock Name="PreBuildBlock" Text="Pre-Build Commandline: " IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Center"/>
148-
<ComboBox Name="CMD_ItemC" Width="200" SelectedIndex="0" HorizontalAlignment="Right" Margin="0,0,0,5">
149-
<ComboBoxItem Visibility="Collapsed">Macros</ComboBoxItem>
150-
</ComboBox>
159+
<ComboBox Name="CMD_ItemC" Width="200" HorizontalAlignment="Right" Margin="0,0,0,5"/>
151160
</DockPanel>
152161
<TextBox Name="C_PreBuildCmd" Height="80" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" TextChanged="C_PreBuildCmd_TextChanged" GotFocus="BuildCommandsBoxes_OnFocus" />
153162
</StackPanel>
@@ -240,9 +249,7 @@
240249
<StackPanel Margin="5">
241250
<DockPanel LastChildFill="True">
242251
<TextBlock Name="RConComBlock" Text="RCon Commands:" IsHitTestVisible="False" />
243-
<ComboBox Name="Rcon_MenuC" Width="200" SelectedIndex="0" HorizontalAlignment="Right" Margin="0,0,0,5">
244-
<ComboBoxItem Visibility="Collapsed">Macros</ComboBoxItem>
245-
</ComboBox>
252+
<ComboBox Name="Rcon_MenuC" Width="200" HorizontalAlignment="Right" Margin="0,0,0,5"/>
246253
</DockPanel>
247254
<TextBox Name="C_RConCmds" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" TextChanged="C_RConCmds_TextChanged" Height="100"/>
248255
</StackPanel>

UI/Windows/ConfigWindow.xaml.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ public ConfigWindow()
7171
CMD_ItemC.SelectionChanged += CompileMacros_OnClickedItem;
7272
CommandMacros.ToList().ForEach(x => Rcon_MenuC.Items.Add(x));
7373
Rcon_MenuC.SelectionChanged += CommandMacros_OnClickedItem;
74+
75+
var item1 = new ComboBoxItem()
76+
{
77+
Visibility = Visibility.Collapsed,
78+
Content = "Macros",
79+
};
80+
var item2 = new ComboBoxItem()
81+
{
82+
Visibility = Visibility.Collapsed,
83+
Content = "Macros",
84+
};
85+
CMD_ItemC.Items.Insert(0, item1);
86+
Rcon_MenuC.Items.Insert(0, item2);
87+
CMD_ItemC.SelectedIndex = 0;
88+
Rcon_MenuC.SelectedIndex = 0;
7489
}
7590

7691
public ICommand TextBoxButtonFolderCmd
@@ -628,6 +643,7 @@ private void Language_Translate()
628643
return;
629644
}
630645

646+
Title = Translate("Configs");
631647
AddSMDirButton.Content = Translate("Add");
632648
RemoveSMDirButton.Content = Translate("Remove");
633649
NewButton.Content = Translate("New");

0 commit comments

Comments
 (0)