[gimp/gtk3-port: 148/251] modules: port ColorselWheel to GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 148/251] modules: port ColorselWheel to GtkStyleContext
- Date: Mon, 28 Mar 2011 19:35:11 +0000 (UTC)
commit 5de41797311d07a7b199530c8f1e7754d21a429a
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]