Improve dark theme a bit

This commit is contained in:
AndnixSH
2023-07-30 16:52:55 +02:00
parent 6ef981bd25
commit afa73115bc
3 changed files with 851 additions and 790 deletions
+80 -54
View File
@@ -20,23 +20,23 @@ namespace APKToolGUI.Controls
public static Color tabBorderColor = Color.FromArgb(45, 45, 45);
public static Color menuItemHoverColor = Color.FromArgb(51, 51, 51);
public static Color menuItemSelectedColor = Color.FromArgb(41, 41, 41);
public static Color separatorColor = Color.FromArgb(62, 62, 62);
public static void SetTheme(Control.ControlCollection container, Form form)
{
form.BackColor = bgColor;
form.ForeColor = Color.White;
foreach (Control component in container)
{
Debug.WriteLine(component.GetType());
component.BackColor = bgColor;
component.ForeColor = Color.White;
SetThemeTabControl(component);
SetThemeTabControl(component, container);
}
}
public static void SetThemeTabControl(Control component)
public static void SetThemeTabControl(Control component, Control.ControlCollection container)
{
if (component is TabControl)
{
@@ -44,9 +44,9 @@ namespace APKToolGUI.Controls
foreach (Control tabControl in component.Controls)
{
SetThemeTabControl(tabControl);
SetThemeTabControl(tabControl, container);
Debug.WriteLine("tabPage " + tabControl.GetType());
//Debug.WriteLine("tabPage " + tabControl.GetType());
((TabControl)component).DrawItem += (sender, e) =>
{
@@ -90,7 +90,7 @@ namespace APKToolGUI.Controls
foreach (Control tabPage in tabControl.Controls)
{
SetThemeTabControl(tabPage);
SetThemeTabControl(tabPage, container);
}
}
}
@@ -98,7 +98,7 @@ namespace APKToolGUI.Controls
{
foreach (Control control in component.Controls)
{
SetThemeTabControl(control);
SetThemeTabControl(control, container);
}
component.BackColor = bgColor;
component.ForeColor = Color.White;
@@ -115,7 +115,13 @@ namespace APKToolGUI.Controls
{
dditem.BackColor = bgColor;
dditem.ForeColor = Color.White;
Debug.WriteLine(dditem.Text);
//Debug.WriteLine(dditem.Text);
}
foreach (ToolStripSeparator toolStripSeparator in toolStripMenuItem.DropDownItems.OfType<ToolStripSeparator>())
{
toolStripSeparator.BackColor = Color.Blue;
toolStripSeparator.ForeColor = Color.Blue;
Debug.WriteLine(toolStripSeparator.Name);
}
toolStripMenuItem.BackColor = bgColor;
@@ -127,7 +133,7 @@ namespace APKToolGUI.Controls
{
foreach (Control control in component.Controls)
{
SetThemeTabControl(control);
SetThemeTabControl(control, container);
}
component.BackColor = bgColor;
component.ForeColor = Color.White;
@@ -148,17 +154,14 @@ namespace APKToolGUI.Controls
}
else if (component is TextBox)
{
foreach (Control panel in component.Controls)
{
SetThemeTabControl(panel);
}
component.BackColor = txtBoxColor;
component.ForeColor = Color.White;
((TextBox)component).BorderStyle = BorderStyle.FixedSingle;
}
else if (component is RichTextBox)
{
((RichTextBox)component).BorderStyle = BorderStyle.None;
if (component.Name == "logTxtBox")
((RichTextBox)component).BorderStyle = BorderStyle.None;
component.BackColor = bgColor;
component.ForeColor = Color.White;
}
@@ -171,54 +174,77 @@ namespace APKToolGUI.Controls
public class MenuItemColorTable : ProfessionalColorTable
{
public override Color ImageMarginGradientBegin
{
get { return bgColor; }
}
/// <summary>
/// Gets the starting color of the gradient used when
/// a top-level System.Windows.Forms.ToolStripMenuItem is pressed.
/// </summary>
public override Color MenuItemPressedGradientBegin => menuItemSelectedColor;
public override Color ImageMarginGradientEnd
{
get { return bgColor; }
}
/// <summary>
/// Gets the end color of the gradient used when a top-level
/// System.Windows.Forms.ToolStripMenuItem is pressed.
/// </summary>
public override Color MenuItemPressedGradientEnd => menuItemSelectedColor;
public override Color ToolStripDropDownBackground
{
get { return bgColor; }
}
/// <summary>
/// Gets the border color to use with a
/// System.Windows.Forms.ToolStripMenuItem.
/// </summary>
public override Color MenuItemBorder => menuItemSelectedColor;
public override Color MenuItemSelected
{
get { return menuItemHoverColor; }
}
/// <summary>
/// Gets the starting color of the gradient used when the
/// System.Windows.Forms.ToolStripMenuItem is selected.
/// </summary>
public override Color MenuItemSelectedGradientBegin => menuItemSelectedColor;
public override Color MenuBorder
{
get { return menuItemHoverColor; }
}
/// <summary>
/// Gets the end color of the gradient used when the
/// System.Windows.Forms.ToolStripMenuItem is selected.
/// </summary>
public override Color MenuItemSelectedGradientEnd => menuItemSelectedColor;
public override Color MenuItemBorder
{
get { return menuItemHoverColor; }
}
/// <summary>
/// Gets the border color to use with a
/// System.Windows.Forms.ToolStripMenuItem.
/// </summary>
public override Color MenuItemSelected => menuItemHoverColor;
public override Color MenuItemSelectedGradientBegin
{
get { return menuItemSelectedColor; }
}
/// <summary>
/// Gets the solid background color of the
/// System.Windows.Forms.ToolStripDropDown.
/// </summary>
public override Color ToolStripDropDownBackground => bgColor;
public override Color MenuItemSelectedGradientEnd
{
get { return menuItemSelectedColor; }
}
public override Color MenuItemPressedGradientBegin
{
get { return menuItemSelectedColor; }
}
/// <summary>
/// Gets the starting color of the gradient used in the image
/// margin of a System.Windows.Forms.ToolStripDropDownMenu.
/// </summary>
public override Color ImageMarginGradientBegin => bgColor;
public override Color MenuItemPressedGradientEnd
{
get { return menuItemSelectedColor; }
}
/// <summary>
/// Gets the middle color of the gradient used in the image
/// margin of a System.Windows.Forms.ToolStripDropDownMenu.
/// </summary>
public override Color ImageMarginGradientMiddle => bgColor;
/// <summary>
/// Gets the end color of the gradient used in the image
/// margin of a System.Windows.Forms.ToolStripDropDownMenu.
/// </summary>
public override Color ImageMarginGradientEnd => bgColor;
/// <summary>
/// Gets the color to use to for shadow effects on
/// the System.Windows.Forms.ToolStripSeparator.
/// </summary>
public override Color SeparatorDark => separatorColor;
/// <summary>
/// Gets the color that is the border color to use
/// on a System.Windows.Forms.MenuStrip.
/// </summary>
public override Color MenuBorder => menuItemHoverColor;
}
}
}
+696 -688
View File
File diff suppressed because it is too large Load Diff
+75 -48
View File
@@ -993,6 +993,36 @@
<data name="basicInfoTabPage.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label34.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label34.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label34.Location" type="System.Drawing.Point, System.Drawing">
<value>10, 550</value>
</data>
<data name="label34.Size" type="System.Drawing.Size, System.Drawing">
<value>166, 13</value>
</data>
<data name="label34.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="label34.Text" xml:space="preserve">
<value> </value>
</data>
<data name="&gt;&gt;label34.Name" xml:space="preserve">
<value>label34</value>
</data>
<data name="&gt;&gt;label34.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label34.Parent" xml:space="preserve">
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label34.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="launchActivityTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>116, 168</value>
</data>
@@ -1012,7 +1042,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;launchActivityTxtBox.ZOrder" xml:space="preserve">
<value>0</value>
<value>1</value>
</data>
<data name="label31.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1042,7 +1072,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label31.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="archSdkTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>379, 251</value>
@@ -1063,7 +1093,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;archSdkTxtBox.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="label30.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1093,7 +1123,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label30.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="apkDlLinkBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@@ -1120,7 +1150,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;apkDlLinkBtn.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="apkSosLinkBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@@ -1147,7 +1177,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;apkSosLinkBtn.ZOrder" xml:space="preserve">
<value>5</value>
<value>6</value>
</data>
<data name="apkMirrorLinkBtn.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
@@ -1177,7 +1207,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;apkMirrorLinkBtn.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="apkSupportLinkBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@@ -1204,7 +1234,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;apkSupportLinkBtn.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="apkGkLinkBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@@ -1231,7 +1261,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;apkGkLinkBtn.ZOrder" xml:space="preserve">
<value>8</value>
<value>9</value>
</data>
<data name="label17.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1261,7 +1291,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label17.ZOrder" xml:space="preserve">
<value>9</value>
<value>10</value>
</data>
<data name="localsTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>116, 399</value>
@@ -1285,7 +1315,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;localsTxtBox.ZOrder" xml:space="preserve">
<value>10</value>
<value>11</value>
</data>
<data name="selApkFileInfoBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@@ -1312,7 +1342,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;selApkFileInfoBtn.ZOrder" xml:space="preserve">
<value>11</value>
<value>12</value>
</data>
<data name="label18.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1342,7 +1372,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label18.ZOrder" xml:space="preserve">
<value>12</value>
<value>13</value>
</data>
<data name="appTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>113, 34</value>
@@ -1363,7 +1393,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;appTxtBox.ZOrder" xml:space="preserve">
<value>13</value>
<value>14</value>
</data>
<data name="permTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>116, 305</value>
@@ -1387,7 +1417,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;permTxtBox.ZOrder" xml:space="preserve">
<value>14</value>
<value>15</value>
</data>
<data name="apkComboLinkBtn.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
@@ -1417,7 +1447,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;apkComboLinkBtn.ZOrder" xml:space="preserve">
<value>15</value>
<value>16</value>
</data>
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1447,7 +1477,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label15.ZOrder" xml:space="preserve">
<value>16</value>
<value>17</value>
</data>
<data name="fileTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>113, 7</value>
@@ -1468,7 +1498,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;fileTxtBox.ZOrder" xml:space="preserve">
<value>17</value>
<value>18</value>
</data>
<data name="label14.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1498,7 +1528,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label14.ZOrder" xml:space="preserve">
<value>18</value>
<value>19</value>
</data>
<data name="densityTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>116, 277</value>
@@ -1519,7 +1549,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;densityTxtBox.ZOrder" xml:space="preserve">
<value>19</value>
<value>20</value>
</data>
<data name="apkAioLinkBtn.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
@@ -1549,7 +1579,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;apkAioLinkBtn.ZOrder" xml:space="preserve">
<value>20</value>
<value>21</value>
</data>
<data name="packNameTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>113, 62</value>
@@ -1570,7 +1600,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;packNameTxtBox.ZOrder" xml:space="preserve">
<value>21</value>
<value>22</value>
</data>
<data name="apkPureLinkBtn.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
@@ -1600,7 +1630,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;apkPureLinkBtn.ZOrder" xml:space="preserve">
<value>22</value>
<value>23</value>
</data>
<data name="verTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>116, 195</value>
@@ -1621,7 +1651,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;verTxtBox.ZOrder" xml:space="preserve">
<value>23</value>
<value>24</value>
</data>
<data name="psLinkBtn.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
@@ -1651,7 +1681,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;psLinkBtn.ZOrder" xml:space="preserve">
<value>24</value>
<value>25</value>
</data>
<data name="minSdkTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>116, 222</value>
@@ -1672,7 +1702,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;minSdkTxtBox.ZOrder" xml:space="preserve">
<value>25</value>
<value>26</value>
</data>
<data name="label19.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1702,7 +1732,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label19.ZOrder" xml:space="preserve">
<value>26</value>
<value>27</value>
</data>
<data name="targetSdkTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>379, 223</value>
@@ -1723,7 +1753,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;targetSdkTxtBox.ZOrder" xml:space="preserve">
<value>27</value>
<value>28</value>
</data>
<data name="screenTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>116, 250</value>
@@ -1744,7 +1774,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;screenTxtBox.ZOrder" xml:space="preserve">
<value>28</value>
<value>29</value>
</data>
<data name="label7.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1774,7 +1804,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label7.ZOrder" xml:space="preserve">
<value>29</value>
<value>30</value>
</data>
<data name="label9.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1804,7 +1834,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label9.ZOrder" xml:space="preserve">
<value>30</value>
<value>31</value>
</data>
<data name="buildTxtBox.Location" type="System.Drawing.Point, System.Drawing">
<value>379, 195</value>
@@ -1825,7 +1855,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;buildTxtBox.ZOrder" xml:space="preserve">
<value>31</value>
<value>32</value>
</data>
<data name="label8.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1855,7 +1885,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label8.ZOrder" xml:space="preserve">
<value>32</value>
<value>33</value>
</data>
<data name="apkIconPicBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@@ -1882,7 +1912,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;apkIconPicBox.ZOrder" xml:space="preserve">
<value>33</value>
<value>34</value>
</data>
<data name="label11.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1912,7 +1942,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label11.ZOrder" xml:space="preserve">
<value>34</value>
<value>35</value>
</data>
<data name="label10.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1942,7 +1972,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label10.ZOrder" xml:space="preserve">
<value>35</value>
<value>36</value>
</data>
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1972,7 +2002,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>36</value>
<value>37</value>
</data>
<data name="label12.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2002,7 +2032,7 @@
<value>basicInfoTabPage</value>
</data>
<data name="&gt;&gt;label12.ZOrder" xml:space="preserve">
<value>37</value>
<value>38</value>
</data>
<data name="basicInfoTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 27</value>
@@ -6198,37 +6228,37 @@
<value>309, 13</value>
</metadata>
<data name="saveLogToFileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 22</value>
<value>180, 22</value>
</data>
<data name="saveLogToFileToolStripMenuItem.Text" xml:space="preserve">
<value>Save log to file</value>
</data>
<data name="settingsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 22</value>
<value>180, 22</value>
</data>
<data name="settingsToolStripMenuItem.Text" xml:space="preserve">
<value>Settings</value>
</data>
<data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>165, 6</value>
<value>177, 6</value>
</data>
<data name="openTempFolderToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 22</value>
<value>180, 22</value>
</data>
<data name="openTempFolderToolStripMenuItem.Text" xml:space="preserve">
<value>Open temp folder</value>
</data>
<data name="clearTempFolderToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 22</value>
<value>180, 22</value>
</data>
<data name="clearTempFolderToolStripMenuItem.Text" xml:space="preserve">
<value>Clear temp folder</value>
</data>
<data name="toolStripMenuItem2.Size" type="System.Drawing.Size, System.Drawing">
<value>165, 6</value>
<value>177, 6</value>
</data>
<data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 22</value>
<value>180, 22</value>
</data>
<data name="exitToolStripMenuItem.Text" xml:space="preserve">
<value>Exit</value>
@@ -7986,9 +8016,6 @@
//////////w4AAAcP///////
</value>
</data>
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>99, 97</value>
</data>