[giggle] src/giggle-revision-view.c: Port to GtkStyleContext
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [giggle] src/giggle-revision-view.c: Port to GtkStyleContext
- Date: Sat, 26 Feb 2011 03:43:31 +0000 (UTC)
commit 91b72541f0362a0d69382a47a65110a423b38287
Author: Javier Jardón <jjardon gnome org>
Date: Sat Feb 26 03:21:25 2011 +0000
src/giggle-revision-view.c: Port to GtkStyleContext
src/giggle-revision-view.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/giggle-revision-view.c b/src/giggle-revision-view.c
index 3b8a7a5..f8bfdaa 100644
--- a/src/giggle-revision-view.c
+++ b/src/giggle-revision-view.c
@@ -133,20 +133,23 @@ revision_view_attach_info (GtkWidget *table,
GtkWidget *info,
int row)
{
- GtkStyle *style;
+ GtkStyleContext *context;
int xpad = 6, ypad = 3;
double yalign = 0.5;
GtkAttachOptions yattach = GTK_FILL;
int end = 2;
- style = gtk_widget_get_style (info);
+ context = gtk_widget_get_style_context (info);
if (GTK_IS_BUTTON (info))
xpad = ypad = 0;
if (GTK_IS_SCROLLED_WINDOW (info)) {
- xpad = MAX (0, xpad - style->xthickness);
- ypad = MAX (0, ypad - style->ythickness);
+ GtkBorder border;
+
+ gtk_style_context_get_border (context, 0, &border);
+ xpad = MAX (0, xpad - (border.left + border.right) / 2);
+ ypad = MAX (0, ypad - (border.top + border.bottom) / 2);
yattach |= GTK_EXPAND;
yalign = 0.0;
end = 3;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]