Skip to content

Commit da9d38e

Browse files
committed
Fix ScrollBar compatibility with FD5 themes...
1 parent 4ddc932 commit da9d38e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

PluginCore/ScintillaNet/ScintillaControl.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ public void HandleEvent(Object sender, NotifyEvent e, HandlingPriority priority)
8888
{
8989
if (e.Type == EventType.ApplyTheme)
9090
{
91-
Boolean enabled = PluginBase.MainForm.GetThemeFlag("ScrollBar.UseCustom", false);
91+
Color color = PluginBase.MainForm.GetThemeColor("ScrollBar.ForeColor");
92+
String value = PluginBase.MainForm.GetThemeValue("ScrollBar.UseCustom");
93+
Boolean enabled = value == "true" || (value == null && color != Color.Empty);
9294
if (enabled && !this.Controls.Contains(this.vScrollBar))
9395
{
9496
this.AddScrollBars(this);
@@ -136,7 +138,9 @@ private void InitScrollBars(ScintillaControl sender)
136138
sender.hScrollBar.Orientation = ScrollBarOrientation.Horizontal;
137139
sender.hScrollBar.ContextMenuStrip.Renderer = new DockPanelStripRenderer();
138140
sender.hScrollBar.Dock = DockStyle.Bottom;
139-
if (PluginBase.MainForm.GetThemeFlag("ScrollBar.UseCustom", false))
141+
Color color = PluginBase.MainForm.GetThemeColor("ScrollBar.ForeColor");
142+
String value = PluginBase.MainForm.GetThemeValue("ScrollBar.UseCustom");
143+
if (value == "true" || (value == null && color != Color.Empty))
140144
{
141145
sender.AddScrollBars(sender);
142146
sender.UpdateScrollBarTheme(sender);

0 commit comments

Comments
 (0)