Skip to content

Commit 21705ac

Browse files
committed
Theming fixes and improvements...
- Added new settings - Removed global settings and pointed them to controls - Fixes and improvements
1 parent 43307c0 commit 21705ac

File tree

25 files changed

+161
-144
lines changed

25 files changed

+161
-144
lines changed

External/Plugins/ASCompletion/CustomControls/ModelsExplorer.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -471,21 +471,15 @@ private void SetMatch(TreeNode node)
471471
{
472472
if (lastMatch != null)
473473
{
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;
474+
lastMatch.BackColor = PluginBase.MainForm.GetThemeColor("TreeView.BackColor", SystemColors.Window);
475+
lastMatch.ForeColor = PluginBase.MainForm.GetThemeColor("TreeView.ForeColor", SystemColors.WindowText);
482476

483477
}
484478
lastMatch = node;
485479
if (lastMatch != null)
486480
{
487-
lastMatch.BackColor = PluginBase.MainForm.GetThemeColor("Global.Highlight", SystemColors.Highlight);
488-
lastMatch.ForeColor = PluginBase.MainForm.GetThemeColor("Global.HighlightText", SystemColors.HighlightText);
481+
lastMatch.BackColor = PluginBase.MainForm.GetThemeColor("TreeView.Highlight", SystemColors.Highlight);
482+
lastMatch.ForeColor = PluginBase.MainForm.GetThemeColor("TreeView.HighlightText", SystemColors.HighlightText);
489483
outlineTreeView.SelectedNode = node;
490484
}
491485
}

External/Plugins/ASCompletion/PluginUI.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ private void SetHighlight(TreeNode node)
504504
outlineTree.State.highlight = currentHighlight.FullPath;
505505

506506
//currentHighlight.BackColor = System.Drawing.Color.LightGray;
507-
currentHighlight.ForeColor = PluginBase.MainForm.GetThemeColor("Global.Highlight", Color.Blue);
507+
currentHighlight.ForeColor = PluginBase.MainForm.GetThemeColor("TreeView.Highlight", SystemColors.Highlight);
508508

509509
}
510510
}
@@ -1037,8 +1037,8 @@ private void ShowAndHilightNode(TreeNode node, bool hilight)
10371037
if (hilight)
10381038
{
10391039
node.EnsureVisible();
1040-
node.BackColor = PluginBase.MainForm.GetThemeColor("Global.Highlight", SystemColors.Highlight);
1041-
node.ForeColor = PluginBase.MainForm.GetThemeColor("Global.HighlightText", SystemColors.HighlightText);
1040+
node.BackColor = PluginBase.MainForm.GetThemeColor("TreeView.Highlight", SystemColors.Highlight);
1041+
node.ForeColor = PluginBase.MainForm.GetThemeColor("TreeView.HighlightText", SystemColors.HighlightText);
10421042
}
10431043
else
10441044
{
@@ -1097,9 +1097,7 @@ void FindProcTxtEnter(object sender, System.EventArgs e)
10971097
if (findProcTxt.Text == searchInvitation)
10981098
{
10991099
findProcTxt.Text = "";
1100-
Color fore = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.ForeColor");
1101-
if (fore == Color.Empty) findProcTxt.ForeColor = System.Drawing.SystemColors.WindowText;
1102-
else findProcTxt.ForeColor = fore;
1100+
findProcTxt.ForeColor = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.ForeColor", SystemColors.WindowText);
11031101
}
11041102
}
11051103

@@ -1108,7 +1106,7 @@ void FindProcTxtLeave(object sender, System.EventArgs e)
11081106
if (findProcTxt.Text == "")
11091107
{
11101108
findProcTxt.Text = searchInvitation;
1111-
findProcTxt.ForeColor = PluginBase.MainForm.GetThemeColor("Global.GrayText", SystemColors.GrayText);
1109+
findProcTxt.ForeColor = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.GrayText", SystemColors.GrayText);
11121110
clearButton.Enabled = false;
11131111
}
11141112
}
@@ -1127,7 +1125,7 @@ private void clearButton_Click(object sender, EventArgs e)
11271125
// Update colors on start after theme engine
11281126
public void UpdateAfterTheme()
11291127
{
1130-
findProcTxt.ForeColor = PluginBase.MainForm.GetThemeColor("Global.GrayText", SystemColors.GrayText);
1128+
findProcTxt.ForeColor = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.GrayText", SystemColors.GrayText);
11311129
}
11321130

11331131
protected override Boolean ProcessDialogKey(Keys keyData)
@@ -1177,7 +1175,7 @@ private TreeNode FindMatch(TreeNodeCollection nodes)
11771175
{
11781176
foreach (TreeNode node in nodes)
11791177
{
1180-
if (node.BackColor == PluginBase.MainForm.GetThemeColor("Global.Highlight", SystemColors.Highlight)) return node;
1178+
if (node.BackColor == PluginBase.MainForm.GetThemeColor("TreeView.Highlight", SystemColors.Highlight)) return node;
11811179
if (node.Nodes.Count > 0)
11821180
{
11831181
TreeNode subnode = FindMatch(node.Nodes);

External/Plugins/FlashDebugger/Controls/StackframeUI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ private void FilterResults()
406406
string filterText = toolStripTextBoxFilter.Text.Trim();
407407
lv.Items.Clear();
408408
Regex regex = null;
409-
Color color = PluginBase.MainForm.GetThemeColor("Global.GrayText", SystemColors.GrayText);
409+
Color color = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.GrayText", SystemColors.GrayText);
410410
if (toolStripItemRegEx.Checked)
411411
{
412412
try

External/Plugins/FlashLogViewer/PluginUI.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,11 @@ public void RefreshDisplay(Boolean forceScroll)
382382
{
383383
string line = s.ReadLine();
384384
if (!this.PassesFilter(line)) continue;
385-
Color newColor = Color.Black;
385+
Color newColor = PluginBase.MainForm.GetThemeColor("FlashLogViewer.DebugColor", Color.Black);
386386
if (colorize)
387387
{
388-
if (reWarning.IsMatch(line)) newColor = Color.Orange;
389-
else if (reError.IsMatch(line)) newColor = Color.Red;
388+
if (reWarning.IsMatch(line)) newColor = PluginBase.MainForm.GetThemeColor("FlashLogViewer.WarningColor", Color.Orange);
389+
else if (reError.IsMatch(line)) newColor = PluginBase.MainForm.GetThemeColor("FlashLogViewer.ErrorColor", Color.Red);
390390
}
391391
if (newColor != currentColor)
392392
{
@@ -544,9 +544,9 @@ private void FilterTextBoxTextChanged(Object sender, EventArgs e)
544544
try
545545
{
546546
this.reFilter = new Regex(filterComboBox.Text, RegexOptions.IgnoreCase);
547-
this.filterComboBox.ForeColor = PluginBase.MainForm.GetThemeColor("Global.ControlText", SystemColors.ControlText);
547+
this.filterComboBox.ForeColor = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.ForeColor", SystemColors.WindowText);
548548
}
549-
catch { this.filterComboBox.ForeColor = Color.Red; }
549+
catch {}
550550
}
551551
this.lastPosition = 0;
552552
this.logTextBox.Clear();

External/Plugins/OutputPanel/PluginUI.cs

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ private void CopyOutput(Object sender, System.EventArgs e)
269269
/// </summary>
270270
public void UpdateAfterTheme()
271271
{
272-
this.findTextBox.ForeColor = System.Drawing.SystemColors.GrayText;
272+
this.findTextBox.ForeColor = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.GrayText", SystemColors.GrayText);
273273
}
274274

275275
/// <summary>
@@ -359,8 +359,8 @@ public void AddTraces()
359359
Int32 state;
360360
String message;
361361
TraceItem entry;
362-
Color newColor = Color.Black;
363-
Color currentColor = Color.Black;
362+
Color newColor = Color.Red;
363+
Color currentColor = Color.Red;
364364
int oldSelectionStart = this.textLog.SelectionStart;
365365
int oldSelectionLength = this.textLog.SelectionLength;
366366
List<HighlightMarker> markers = this.pluginMain.PluginSettings.HighlightMarkers;
@@ -398,62 +398,29 @@ public void AddTraces()
398398
switch (state)
399399
{
400400
case 0: // Info
401-
if (PluginBase.MainForm.GetThemeColor("OutputPanel.InfoColor") != Color.Empty)
402-
{
403-
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.InfoColor");
404-
}
405-
else newColor = Color.Gray;
401+
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.InfoColor", Color.Gray);
406402
break;
407403
case 1: // Debug
408-
if (PluginBase.MainForm.GetThemeColor("OutputPanel.DebugColor") != Color.Empty)
409-
{
410-
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.DebugColor");
411-
}
412-
else newColor = this.ForeColor;
404+
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.DebugColor", this.ForeColor);
413405
break;
414406
case 2: // Warning
415-
if (PluginBase.MainForm.GetThemeColor("OutputPanel.WarningColor") != Color.Empty)
416-
{
417-
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.WarningColor");
418-
}
419-
else newColor = Color.Orange;
407+
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.WarningColor", Color.Orange);
420408
break;
421409
case 3: // Error
422-
if (PluginBase.MainForm.GetThemeColor("OutputPanel.ErrorColor") != Color.Empty)
423-
{
424-
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.ErrorColor");
425-
}
426-
else newColor = Color.Red;
410+
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.ErrorColor", Color.Red);
427411
break;
428412
case 4: // Fatal
429-
if (PluginBase.MainForm.GetThemeColor("OutputPanel.FatalColor") != Color.Empty)
430-
{
431-
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.FatalColor");
432-
}
433-
else newColor = Color.Magenta;
413+
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.FatalColor", Color.Magenta);
434414
break;
435415
case -1: // ProcessStart
436-
if (PluginBase.MainForm.GetThemeColor("OutputPanel.ProcessStartColor") != Color.Empty)
437-
{
438-
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.ProcessStartColor");
439-
}
440-
else newColor = Color.Blue;
416+
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.ProcessStartColor", Color.Blue);
441417
break;
442418
case -2: // ProcessEnd
443-
if (PluginBase.MainForm.GetThemeColor("OutputPanel.ProcessEndColor") != Color.Empty)
444-
{
445-
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.ProcessEndColor");
446-
}
447-
else newColor = Color.Blue;
419+
newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.ProcessEndColor", Color.Blue);
448420
break;
449421
case -3: // ProcessError
450-
if (PluginBase.MainForm.GetThemeColor("OutputPanel.WarningColor") != Color.Empty
451-
&& PluginBase.MainForm.GetThemeColor("OutputPanel.ErrorColor") != Color.Empty)
452-
{
453-
if (message.IndexOf("Warning") >= 0) newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.WarningColor");
454-
else newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.ErrorColor");
455-
}
456-
else newColor = (message.IndexOf("Warning") >= 0) ? Color.Orange : Color.Red;
422+
if (message.IndexOf("Warning") >= 0) newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.WarningColor", Color.Orange);
423+
else newColor = PluginBase.MainForm.GetThemeColor("OutputPanel.ErrorColor", Color.Red);
457424
break;
458425
}
459426
if (newColor != currentColor)
@@ -519,7 +486,7 @@ private void FilterOutput(String findText)
519486
Match match = results[i];
520487
this.textLog.SelectionStart = match.Index;
521488
this.textLog.SelectionLength = match.Length;
522-
this.textLog.SelectionBackColor = Color.LightSkyBlue;
489+
this.textLog.SelectionBackColor = PluginBase.MainForm.GetThemeColor("OutputPanel.HighlightColor", SystemColors.Highlight);
523490
}
524491
}
525492
}
@@ -558,9 +525,7 @@ private void FindTextBoxEnter(Object sender, System.EventArgs e)
558525
if (this.findTextBox.Text == searchInvitation)
559526
{
560527
this.findTextBox.Text = "";
561-
Color fore = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.ForeColor");
562-
if (fore == Color.Empty) this.findTextBox.ForeColor = System.Drawing.SystemColors.WindowText;
563-
else this.findTextBox.ForeColor = fore;
528+
this.findTextBox.ForeColor = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.ForeColor", SystemColors.WindowText);
564529
}
565530
}
566531

@@ -573,7 +538,7 @@ private void FindTextBoxLeave(Object sender, System.EventArgs e)
573538
{
574539
this.clearButton.Enabled = false;
575540
this.findTextBox.Text = searchInvitation;
576-
this.findTextBox.ForeColor = System.Drawing.SystemColors.GrayText;
541+
this.findTextBox.ForeColor = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.GrayText", SystemColors.GrayText);
577542
}
578543
}
579544

External/Plugins/ProjectManager/Helpers/TreeViews/DragDropTreeView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ private void HighlightTarget(TreeNode node)
194194
originalColor = node.BackColor;
195195
originalText = node.ForeColor;
196196
highlightedNode = node;
197-
highlightedNode.BackColor = PluginCore.PluginBase.MainForm.GetThemeColor("Global.Highlight", SystemColors.Highlight);
198-
highlightedNode.ForeColor = PluginCore.PluginBase.MainForm.GetThemeColor("Global.HighlightText", SystemColors.HighlightText);
197+
highlightedNode.BackColor = PluginCore.PluginBase.MainForm.GetThemeColor("TreeView.Highlight", SystemColors.Highlight);
198+
highlightedNode.ForeColor = PluginCore.PluginBase.MainForm.GetThemeColor("TreeView.HighlightText", SystemColors.HighlightText);
199199
}
200200
}
201201

External/Plugins/ProjectManager/Helpers/TreeViews/MultiSelectTreeView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ private void PaintNode(TreeNode node)
290290
if (!originalColor.Contains(node))
291291
{
292292
originalColor[node] = node.ForeColor;
293-
node.BackColor = PluginCore.PluginBase.MainForm.GetThemeColor("Global.Highlight", SystemColors.Highlight);
294-
node.ForeColor = PluginCore.PluginBase.MainForm.GetThemeColor("Global.HighlightText", SystemColors.HighlightText);
293+
node.BackColor = PluginCore.PluginBase.MainForm.GetThemeColor("TreeView.Highlight", SystemColors.Highlight);
294+
node.ForeColor = PluginCore.PluginBase.MainForm.GetThemeColor("TreeView.HighlightText", SystemColors.HighlightText);
295295
MultiSelectTreeNode mNode = node as MultiSelectTreeNode;
296296
if (mNode != null) mNode.Painted = true;
297297
}

External/Plugins/ResultsPanel/PluginUI.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ public void NextEntry(Object sender, System.EventArgs e)
947947
this.entryIndex = (this.entryIndex + 1) % this.entriesView.Items.Count;
948948
this.entriesView.SelectedItems.Clear();
949949
this.entriesView.Items[this.entryIndex].Selected = true;
950-
this.entriesView.Items[this.entryIndex].ForeColor = PluginBase.MainForm.GetThemeColor("Global.Highlight", Color.Blue);
950+
this.entriesView.Items[this.entryIndex].ForeColor = PluginBase.MainForm.GetThemeColor("ListView.Highlight", SystemColors.Highlight);
951951
this.entriesView.EnsureVisible(this.entryIndex);
952952
this.EntriesViewDoubleClick(null, null);
953953
}
@@ -965,7 +965,7 @@ public void PreviousEntry(Object sender, System.EventArgs e)
965965
if (--this.entryIndex < 0) this.entryIndex = this.entriesView.Items.Count - 1;
966966
this.entriesView.SelectedItems.Clear();
967967
this.entriesView.Items[this.entryIndex].Selected = true;
968-
this.entriesView.Items[this.entryIndex].ForeColor = PluginBase.MainForm.GetThemeColor("Global.Highlight", Color.Blue);
968+
this.entriesView.Items[this.entryIndex].ForeColor = PluginBase.MainForm.GetThemeColor("ListView.Highlight", SystemColors.Highlight);
969969
this.entriesView.EnsureVisible(this.entryIndex);
970970
this.EntriesViewDoubleClick(null, null);
971971
}

External/Themes/FullThemes/DefaultTheme/$(BaseDir)/Settings/Themes/CURRENT

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
# FD UI THEME (5.1+)
44

5-
# In: Projects, Results, Outline, Models, Logs
6-
#Global.Highlight=#ff99ff
7-
#Global.HighlightText=#ff00ff
8-
#Global.ControlText=#ff3333
9-
#Global.GrayText=#0033ff
5+
#ListView.Highlight=#ffa500
6+
#ListView.HighlightText=#ffa500
7+
#TreeView.Highlight=#ffa500
8+
#TreeView.HighlightText=#ffa500
9+
10+
#FlashLogViewer.DebugColor
11+
#FlashLogViewer.WarningColor
12+
#FlashLogViewer.ErrorColor
1013

1114
#OutputPanel.InfoColor=#808080
1215
#OutputPanel.DebugColor=#000000
@@ -15,8 +18,10 @@
1518
#OutputPanel.FatalColor=#ff00ff
1619
#OutputPanel.ProcessStartColor=#ff0000
1720
#OutputPanel.ProcessEndColor=ff0000
21+
#OutputPanel.HighlightColor=#ff0000
1822

1923
#QuickFind.ErrorBack=#ff0000
24+
#ToolStripTextBoxControl.GrayText=#808080
2025
#CompletionList.SelectedTextColor=#ff0000
2126
#CompletionList.SelectedBackColor=#ff0000
2227
#CompletionList.PackageColor=#ff0000

External/Themes/FullThemes/DefaultTheme/$(BaseDir)/Settings/Themes/Default.fdi

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
# FD UI THEME (5.1+)
44

5-
# In: Projects, Results, Outline, Models, Logs
6-
#Global.Highlight=#ff99ff
7-
#Global.HighlightText=#ff00ff
8-
#Global.ControlText=#ff3333
9-
#Global.GrayText=#0033ff
5+
#ListView.Highlight=#ffa500
6+
#ListView.HighlightText=#ffa500
7+
#TreeView.Highlight=#ffa500
8+
#TreeView.HighlightText=#ffa500
9+
10+
#FlashLogViewer.DebugColor
11+
#FlashLogViewer.WarningColor
12+
#FlashLogViewer.ErrorColor
1013

1114
#OutputPanel.InfoColor=#808080
1215
#OutputPanel.DebugColor=#000000
@@ -15,8 +18,10 @@
1518
#OutputPanel.FatalColor=#ff00ff
1619
#OutputPanel.ProcessStartColor=#ff0000
1720
#OutputPanel.ProcessEndColor=ff0000
21+
#OutputPanel.HighlightColor=#ff0000
1822

1923
#QuickFind.ErrorBack=#ff0000
24+
#ToolStripTextBoxControl.GrayText=#808080
2025
#CompletionList.SelectedTextColor=#ff0000
2126
#CompletionList.SelectedBackColor=#ff0000
2227
#CompletionList.PackageColor=#ff0000

0 commit comments

Comments
 (0)