[banshee/stable-1.6] [Theme] Removed DrawFrameBorderFocused
- From: Aaron Bockover <abock src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-1.6] [Theme] Removed DrawFrameBorderFocused
- Date: Sun, 2 May 2010 21:32:30 +0000 (UTC)
commit ae37ba2655830a04a3f5e5087692ffdf1bce1567
Author: Aaron Bockover <abockover novell com>
Date: Sun May 2 17:09:47 2010 -0400
[Theme] Removed DrawFrameBorderFocused
DrawFrameBorder now just uses the Widget.HasFocus state to make its
adjustments to the rendering.
.../Hyena.Data.Gui/ListView/ListView_Rendering.cs | 8 +-------
.../Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs | 16 +++++++---------
src/Libraries/Hyena.Gui/Hyena.Gui.Theming/Theme.cs | 2 --
3 files changed, 8 insertions(+), 18 deletions(-)
---
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
index 8b14a9e..02ac248 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
@@ -140,13 +140,7 @@ namespace Hyena.Data.Gui
}
}
- // Focused frame border is bolder than BorderWidth,
- // draw it after the rows to avoid visual artifacts.
- if (HasFocus) {
- Theme.DrawFrameBorderFocused (cairo_context, Allocation);
- } else {
- Theme.DrawFrameBorder (cairo_context, Allocation);
- }
+ Theme.DrawFrameBorder (cairo_context, Allocation);
PaintDraggingColumn (damage);
diff --git a/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs b/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
index a898f62..467c648 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
@@ -169,8 +169,13 @@ namespace Hyena.Gui.Theming
}
}
- cr.LineWidth = BorderWidth;
- cr.Color = border_color;
+ if (Widget.HasFocus) {
+ cr.LineWidth = BorderWidth * 1.5;
+ cr.Color = CairoExtensions.ColorShade (border_color, 0.8);
+ } else {
+ cr.LineWidth = BorderWidth;
+ cr.Color = border_color;
+ }
double offset = (double)cr.LineWidth / 2.0;
@@ -185,13 +190,6 @@ namespace Hyena.Gui.Theming
cr.Stroke ();
}
- public override void DrawFrameBorderFocused (Cairo.Context cr, Gdk.Rectangle alloc)
- {
- cr.LineWidth = BorderWidth * 1.5;
- cr.Color = CairoExtensions.ColorShade (border_color, 0.8);
- DrawFrameBorder (cr, alloc);
- }
-
public override void DrawColumnHighlight (Cairo.Context cr, Gdk.Rectangle alloc, Cairo.Color color)
{
Cairo.Color light_color = CairoExtensions.ColorShade (color, 1.6);
diff --git a/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/Theme.cs b/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/Theme.cs
index fc6b076..18d6de2 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/Theme.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/Theme.cs
@@ -124,8 +124,6 @@ namespace Hyena.Gui.Theming
public abstract void DrawFrameBorder (Cairo.Context cr, Gdk.Rectangle alloc);
- public abstract void DrawFrameBorderFocused (Cairo.Context cr, Gdk.Rectangle alloc);
-
public abstract void DrawHeaderBackground (Cairo.Context cr, Gdk.Rectangle alloc);
public abstract void DrawColumnHeaderFocus (Cairo.Context cr, Gdk.Rectangle alloc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]