diff options
author | Robert Carr <racarr@canonical.com> | 2011-09-06 12:53:47 -0400 |
---|---|---|
committer | Robert Carr <racarr@canonical.com> | 2011-09-06 12:53:47 -0400 |
commit | 0d4a3db73f63d9bf90b2768c22e09fa2dfb437c2 (patch) | |
tree | 2deed0b89046e25e0031bbce50a4c5901f7a2ff1 /src | |
parent | 7bc5c9732169e3b644269202301330bd77142340 (diff) | |
download | ayatana-ido-0d4a3db73f63d9bf90b2768c22e09fa2dfb437c2.tar.gz ayatana-ido-0d4a3db73f63d9bf90b2768c22e09fa2dfb437c2.tar.bz2 ayatana-ido-0d4a3db73f63d9bf90b2768c22e09fa2dfb437c2.zip |
Use GtkBorder in drawing background
Diffstat (limited to 'src')
-rw-r--r-- | src/idooffscreenproxy.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/idooffscreenproxy.c b/src/idooffscreenproxy.c index b022ad0..b01c460 100644 --- a/src/idooffscreenproxy.c +++ b/src/idooffscreenproxy.c @@ -243,6 +243,7 @@ ido_offscreen_proxy_realize (GtkWidget *widget) gtk_style_context_add_class (context, GTK_STYLE_CLASS_MENUITEM); gtk_style_context_set_background (context, window); gtk_style_context_set_background (context, proxy->priv->offscreen_window); + gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP | GTK_JUNCTION_BOTTOM | GTK_JUNCTION_LEFT | GTK_JUNCTION_RIGHT); gdk_window_show (proxy->priv->offscreen_window); } @@ -450,16 +451,19 @@ ido_offscreen_proxy_draw (GtkWidget *widget, { IdoOffscreenProxy *proxy = IDO_OFFSCREEN_PROXY (widget); GdkWindow *window; - GtkStyleContext *sc; + GtkStyleContext *sc, *wsc; + GtkBorder border; window = gtk_widget_get_window (widget); sc = get_menu_style_context(); + wsc = gtk_widget_get_style_context (widget); + gtk_style_context_get_border (wsc, gtk_widget_get_state (widget), &border); gtk_render_background (sc, cr, - -1, -1, - gdk_window_get_width (window)+2, - gdk_window_get_height (window)+2); + -border.left,-border.top, + gdk_window_get_width (window) + border.right*2, + gdk_window_get_height (window) + border.bottom*2); |