[gimp/gtk3-port: 150/218] modules: port ColorselWheel to GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 150/218] modules: port ColorselWheel to GtkStyleContext
- Date: Fri, 14 Jan 2011 09:32:59 +0000 (UTC)
commit 41226c7352f4bb1583fe65b228be67660b77c92b
Author: Michael Natterer <mitch gimp org>
Date: Fri Dec 17 10:59:54 2010 +0100
modules: port ColorselWheel to GtkStyleContext
modules/color-selector-wheel.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/modules/color-selector-wheel.c b/modules/color-selector-wheel.c
index 465b095..b9f23ea 100644
--- a/modules/color-selector-wheel.c
+++ b/modules/color-selector-wheel.c
@@ -148,18 +148,22 @@ colorsel_wheel_size_allocate (GtkWidget *frame,
GtkAllocation *allocation,
ColorselWheel *wheel)
{
- GtkStyle *style = gtk_widget_get_style (frame);
- gint focus_width;
- gint focus_padding;
- gint size;
+ GtkStyleContext *context = gtk_widget_get_style_context (frame);
+ GtkBorder border;
+ gint focus_width;
+ gint focus_padding;
+ gint size;
gtk_widget_style_get (frame,
"focus-line-width", &focus_width,
"focus-padding", &focus_padding,
NULL);
+ gtk_style_context_get_border (context, gtk_widget_get_state_flags (frame),
+ &border);
+
size = (MIN (allocation->width, allocation->height) -
- 2 * MAX (style->xthickness, style->ythickness) -
+ MAX (border.left + border.right, border.top + border.bottom) -
2 * (focus_width + focus_padding));
gtk_hsv_set_metrics (GTK_HSV (wheel->hsv), size, size / 10);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]