diff options
author | Milan Crha <mcrha@redhat.com> | 2014-07-07 18:51:41 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2014-07-07 18:51:41 +0800 |
commit | 50bda1bad222082488d3d9bc9fe1d0fb3867e974 (patch) | |
tree | 27042fc0a39e4a7f79d920bae88cb29aa5677d10 /modules/mail/e-mail-shell-sidebar.c | |
parent | 534864b39850ea2354b87419da6dc77538867756 (diff) | |
download | gsoc2013-evolution-50bda1bad222082488d3d9bc9fe1d0fb3867e974.tar gsoc2013-evolution-50bda1bad222082488d3d9bc9fe1d0fb3867e974.tar.gz gsoc2013-evolution-50bda1bad222082488d3d9bc9fe1d0fb3867e974.tar.bz2 gsoc2013-evolution-50bda1bad222082488d3d9bc9fe1d0fb3867e974.tar.lz gsoc2013-evolution-50bda1bad222082488d3d9bc9fe1d0fb3867e974.tar.xz gsoc2013-evolution-50bda1bad222082488d3d9bc9fe1d0fb3867e974.tar.zst gsoc2013-evolution-50bda1bad222082488d3d9bc9fe1d0fb3867e974.zip |
Replace GtkStyle usages with GtkStyleContext
This makes evolution depend on theme-defined named colors, namely:
theme_bg_color
theme_base_color
theme_fg_color
theme_text_color
theme_selected_bg_color
theme_selected_fg_color
theme_unfocused_selected_bg_color
theme_unfocused_selected_fg_color
If it's not defined, then a fallback color is used, in the worse case
one of the fallbacks defined in evolution itself.
Diffstat (limited to 'modules/mail/e-mail-shell-sidebar.c')
-rw-r--r-- | modules/mail/e-mail-shell-sidebar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c index d4c9e2d954..e0e12a081b 100644 --- a/modules/mail/e-mail-shell-sidebar.c +++ b/modules/mail/e-mail-shell-sidebar.c @@ -264,7 +264,7 @@ mail_shell_sidebar_get_preferred_width (GtkWidget *widget, EMailShellSidebar *sidebar; PangoLayout *layout; PangoRectangle ink_rect; - GtkStyle *style; + GtkBorder padding; gint border; gint sidebar_width; gint screen_width; @@ -280,12 +280,12 @@ mail_shell_sidebar_get_preferred_width (GtkWidget *widget, pango_layout_get_pixel_extents (layout, &ink_rect, NULL); g_object_unref (layout); - style = gtk_widget_get_style (widget); + gtk_style_context_get_padding (gtk_widget_get_style_context (widget), 0, &padding); screen_width = guess_screen_width (sidebar); /* Thickness of frame shadow plus some slack for padding. */ - border = 2 * style->xthickness + 4; + border = 2 * padding.left + 4; sidebar_width = ink_rect.width + border; sidebar_width = MIN (sidebar_width, screen_width / 4); *minimum_width = *natural_width = MAX (*natural_width, sidebar_width); |