[gtk+] win32: Theme statusbars
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] win32: Theme statusbars
- Date: Fri, 16 Mar 2012 15:47:13 +0000 (UTC)
commit cb1a825cc35f5e4ba8533bd53a233faedc7db56c
Author: Alexander Larsson <alexl redhat com>
Date: Fri Mar 16 16:44:24 2012 +0100
win32: Theme statusbars
gtk/gtk-win32-base.css | 19 ++++++++++++++++++-
gtk/gtkwin32theme.c | 5 ++++-
2 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtk-win32-base.css b/gtk/gtk-win32-base.css
index 1fda1a2..1683952 100644
--- a/gtk/gtk-win32-base.css
+++ b/gtk/gtk-win32-base.css
@@ -825,9 +825,26 @@ GtkColorSwatch:prelight {
.pane-separator {
background-image: -gtk-win32-theme-part(rebar, 1 1);
+
/* Use this when background-position is supported
background-size: 20px 20px;
background-repeat: no-repeat;
background-position: center;
*/
-}
\ No newline at end of file
+}
+
+GtkStatusbar > GtkFrame {
+ border-width: 1px 1px 1px 1px;
+ border-style: solid;
+ border-image: -gtk-win32-theme-part(status, 0 0, margins (-1 0 0 0)) 2 1 1 1 stretch;
+ background-image: none;
+}
+
+/*
+ This doesn't quite look right with no background (i.e. when not on a statusbar
+
+.grip {
+ background-color: transparent;
+ background-image: -gtk-win32-theme-part(status, 3 1);
+}
+*/
\ No newline at end of file
diff --git a/gtk/gtkwin32theme.c b/gtk/gtkwin32theme.c
index 8e28f97..a9e0193 100644
--- a/gtk/gtkwin32theme.c
+++ b/gtk/gtkwin32theme.c
@@ -36,6 +36,7 @@ static HTHEME needs_alpha_fixup2 = NULL;
static HTHEME needs_alpha_fixup3 = NULL;
static HTHEME needs_alpha_fixup4 = NULL;
static HTHEME needs_alpha_fixup5 = NULL;
+static HTHEME needs_alpha_fixup6 = NULL;
typedef HRESULT (FAR PASCAL *GetThemeSysFontFunc) (HTHEME hTheme, int iFontID, OUT LOGFONTW *plf);
typedef int (FAR PASCAL *GetThemeSysSizeFunc) (HTHEME hTheme, int iSizeId);
@@ -148,6 +149,7 @@ _gtk_win32_theme_init (void)
needs_alpha_fixup3 = _gtk_win32_lookup_htheme_by_classname ("button");
needs_alpha_fixup4 = _gtk_win32_lookup_htheme_by_classname ("header");
needs_alpha_fixup5 = _gtk_win32_lookup_htheme_by_classname ("trackbar");
+ needs_alpha_fixup6 = _gtk_win32_lookup_htheme_by_classname ("status");
}
}
@@ -262,7 +264,8 @@ _gtk_win32_theme_part_create_surface (HTHEME theme,
theme == needs_alpha_fixup2 ||
(theme == needs_alpha_fixup3 && xp_part == 4) ||
theme == needs_alpha_fixup4 ||
- theme == needs_alpha_fixup5))
+ theme == needs_alpha_fixup5 ||
+ theme == needs_alpha_fixup6))
{
cairo_surface_t *img = cairo_win32_surface_get_image (surface);
guint32 *data = (guint32 *)cairo_image_surface_get_data (img);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]