diff options
| author | lempamo <[email protected]> | 2017-09-13 12:55:01 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-09-13 12:55:01 -0400 |
| commit | 868078d5cb4edafda5a01f116391d927ceeedf9d (patch) | |
| tree | 71c05bcab43f9473576b0e09e09e37f267c66ae5 /Histacom2.Engine/UI/ClassicButton.cs | |
| parent | 74722bac5a707c206c3756ffdc156630af730fca (diff) | |
| download | histacom2-868078d5cb4edafda5a01f116391d927ceeedf9d.tar.gz histacom2-868078d5cb4edafda5a01f116391d927ceeedf9d.tar.bz2 histacom2-868078d5cb4edafda5a01f116391d927ceeedf9d.zip | |
colored taskbar things and new buttons in calc
Diffstat (limited to 'Histacom2.Engine/UI/ClassicButton.cs')
| -rw-r--r-- | Histacom2.Engine/UI/ClassicButton.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Histacom2.Engine/UI/ClassicButton.cs b/Histacom2.Engine/UI/ClassicButton.cs index 1a77964..26dbd26 100644 --- a/Histacom2.Engine/UI/ClassicButton.cs +++ b/Histacom2.Engine/UI/ClassicButton.cs @@ -28,8 +28,14 @@ namespace Histacom2.Engine.UI } } + public bool AdaptForeColorWithTheme { get; set; } + public bool AdaptFontWithTheme { get; set; } + public ClassicButton() : base() { + AdaptForeColorWithTheme = true; + AdaptFontWithTheme = true; + if (SaveSystem.currentTheme != null) BackColor = SaveSystem.currentTheme.threeDObjectsColor; else BackColor = Color.Silver; _lightBack = ControlPaint.Light(BackColor, 50); @@ -53,6 +59,18 @@ namespace Histacom2.Engine.UI if (SaveSystem.currentTheme != null) BackColor = SaveSystem.currentTheme.threeDObjectsColor; else BackColor = Color.Silver; + if (AdaptForeColorWithTheme) + { + if (SaveSystem.currentTheme != null) ForeColor = SaveSystem.currentTheme.threeDObjectsTextColor; + else ForeColor = Color.Black; + } + + if (AdaptFontWithTheme) + { + if (SaveSystem.currentTheme != null) Font = SaveSystem.currentTheme.buttonFont; + else Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular); + } + _lightBack = Paintbrush.GetLightFromColor(BackColor); _darkBack = Paintbrush.GetDarkFromColor(BackColor); |
