[hyena] GtkTheme: Fix border color on Windows
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] GtkTheme: Fix border color on Windows
- Date: Wed, 9 Mar 2011 14:58:56 +0000 (UTC)
commit 701ab970bbf1ade50cf85a60135e6efb7286b0d2
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue Mar 8 16:28:32 2011 -0600
GtkTheme: Fix border color on Windows
Using Dark[StateType.Active] was returning black, so use
StateType.Normal instead, and we don't shade it when focused.
Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs b/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
index 7e8cefc..32504d4 100644
--- a/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
+++ b/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
@@ -61,7 +61,11 @@ namespace Hyena.Gui.Theming
base.OnColorsRefreshed ();
rule_color = CairoExtensions.ColorShade (ViewFill, 0.95);
- border_color = Colors.GetWidgetColor (GtkColorClass.Dark, StateType.Active);
+
+ // On Windows we use Normal b/c Active incorrectly returns black (at least on XP)
+ border_color = Colors.GetWidgetColor (GtkColorClass.Dark,
+ Hyena.PlatformDetection.IsWindows ? StateType.Normal : StateType.Active
+ );
}
public override void DrawPie (double fraction)
@@ -186,7 +190,8 @@ namespace Hyena.Gui.Theming
}
}
- if (Widget.HasFocus) {
+ // FIXME Windows; shading the color by .8 makes it blend into the bg
+ if (Widget.HasFocus && !Hyena.PlatformDetection.IsWindows) {
cr.LineWidth = BorderWidth * 1.5;
cr.Color = CairoExtensions.ColorShade (border_color, 0.8);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]