Skip to content

Commit 99a67b3

Browse files
committed
Theme coloring fixes...
1 parent c9b3e6e commit 99a67b3

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

External/Plugins/ASCompletion/CustomControls/ModelsExplorer.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,15 @@ private void SetMatch(TreeNode node)
471471
{
472472
if (lastMatch != null)
473473
{
474-
lastMatch.BackColor = SystemColors.Window;
475-
lastMatch.ForeColor = SystemColors.WindowText;
474+
//lastMatch.BackColor = SystemColors.Window;
475+
//lastMatch.ForeColor = SystemColors.WindowText;
476+
Color back = PluginBase.MainForm.GetThemeColor("FixedTreeView.BackColor");
477+
Color fore = PluginBase.MainForm.GetThemeColor("FixedTreeView.ForeColor");
478+
if (back == Color.Empty) lastMatch.BackColor = System.Drawing.SystemColors.Window;
479+
else lastMatch.BackColor = back;
480+
if (fore == Color.Empty) lastMatch.ForeColor = System.Drawing.SystemColors.WindowText;
481+
else lastMatch.ForeColor = fore;
482+
476483
}
477484
lastMatch = node;
478485
if (lastMatch != null)

External/Plugins/ASCompletion/PluginUI.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ private void SetHighlight(TreeNode node)
495495
if (currentHighlight != null)
496496
{
497497
//currentHighlight.BackColor = System.Drawing.SystemColors.Window;
498-
currentHighlight.ForeColor = System.Drawing.SystemColors.WindowText;
498+
currentHighlight.ForeColor = outlineTree.ForeColor;
499499
}
500500
outlineTree.SelectedNode = currentHighlight = node;
501501
if (currentHighlight != null)
@@ -1093,7 +1093,9 @@ void FindProcTxtEnter(object sender, System.EventArgs e)
10931093
if (findProcTxt.Text == searchInvitation)
10941094
{
10951095
findProcTxt.Text = "";
1096-
findProcTxt.ForeColor = System.Drawing.SystemColors.WindowText;
1096+
Color fore = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.ForeColor");
1097+
if (fore == Color.Empty) findProcTxt.ForeColor = System.Drawing.SystemColors.WindowText;
1098+
else findProcTxt.ForeColor = fore;
10971099
}
10981100
}
10991101

@@ -1171,8 +1173,7 @@ private TreeNode FindMatch(TreeNodeCollection nodes)
11711173
{
11721174
foreach (TreeNode node in nodes)
11731175
{
1174-
if (node.BackColor == System.Drawing.Color.LightSkyBlue)
1175-
return node;
1176+
if (node.BackColor == SystemColors.Highlight) return node;
11761177
if (node.Nodes.Count > 0)
11771178
{
11781179
TreeNode subnode = FindMatch(node.Nodes);

External/Plugins/OutputPanel/PluginUI.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,9 @@ private void FindTextBoxEnter(Object sender, System.EventArgs e)
525525
if (this.findTextBox.Text == searchInvitation)
526526
{
527527
this.findTextBox.Text = "";
528-
this.findTextBox.ForeColor = System.Drawing.SystemColors.WindowText;
528+
Color fore = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.ForeColor");
529+
if (fore == Color.Empty) this.findTextBox.ForeColor = System.Drawing.SystemColors.WindowText;
530+
else this.findTextBox.ForeColor = fore;
529531
}
530532
}
531533

External/Plugins/ResultsPanel/PluginUI.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ public void NextEntry(Object sender, System.EventArgs e)
943943
if (this.entriesView.Items.Count == 0) return;
944944
if (this.entryIndex >= 0 && this.entryIndex < this.entriesView.Items.Count)
945945
{
946-
this.entriesView.Items[this.entryIndex].ForeColor = SystemColors.WindowText;
946+
this.entriesView.Items[this.entryIndex].ForeColor = this.entriesView.ForeColor;
947947
}
948948
this.entryIndex = (this.entryIndex + 1) % this.entriesView.Items.Count;
949949
this.entriesView.SelectedItems.Clear();
@@ -961,7 +961,7 @@ public void PreviousEntry(Object sender, System.EventArgs e)
961961
if (this.entriesView.Items.Count == 0) return;
962962
if (this.entryIndex >= 0 && this.entryIndex < this.entriesView.Items.Count)
963963
{
964-
this.entriesView.Items[this.entryIndex].ForeColor = SystemColors.WindowText;
964+
this.entriesView.Items[this.entryIndex].ForeColor = this.entriesView.ForeColor;
965965
}
966966
if (--this.entryIndex < 0) this.entryIndex = this.entriesView.Items.Count - 1;
967967
this.entriesView.SelectedItems.Clear();

0 commit comments

Comments
 (0)