[anjuta/gnome-3-0] libanjuta: Adapt tab drawing order to Gtk+'s new order
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/gnome-3-0] libanjuta: Adapt tab drawing order to Gtk+'s new order
- Date: Mon, 25 Apr 2011 19:27:37 +0000 (UTC)
commit 0c418691edc6b0f54051b12450d979441ec1e58c
Author: Johannes Schmid <jhs gnome org>
Date: Sun Apr 17 16:57:55 2011 +0200
libanjuta: Adapt tab drawing order to Gtk+'s new order
libanjuta/anjuta-tabber.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/libanjuta/anjuta-tabber.c b/libanjuta/anjuta-tabber.c
index ec6edbb..13e1dcf 100644
--- a/libanjuta/anjuta-tabber.c
+++ b/libanjuta/anjuta-tabber.c
@@ -401,6 +401,11 @@ anjuta_tabber_render_tab (GtkWidget* widget,
GtkStyle* style = gtk_widget_get_style (GTK_WIDGET (tabber->priv->notebook));
GtkStyleContext* context = gtk_widget_get_style_context (GTK_WIDGET (tabber->priv->notebook));
GtkStateFlags state = current ? GTK_STATE_FLAG_ACTIVE : GTK_STATE_FLAG_NORMAL;
+
+ if (current)
+ gtk_widget_set_state_flags (tab, GTK_STATE_FLAG_ACTIVE, FALSE);
+ else
+ gtk_widget_unset_state_flags (tab, GTK_STATE_FLAG_ACTIVE);
xthickness = style->xthickness;
ythickness = style->ythickness;
@@ -512,11 +517,14 @@ anjuta_tabber_draw (GtkWidget* widget, cairo_t* cr)
current_tab = g_list_nth (tabber->priv->children, tabber->priv->active_page);
- for (child = tabber->priv->children; child != NULL; child = g_list_next (child))
+ for (child = tabber->priv->children; child != current_tab; child = g_list_next (child))
{
- if (child != current_tab)
- anjuta_tabber_draw_tab (tabber, cr, child, FALSE);
+ anjuta_tabber_draw_tab (tabber, cr, child, FALSE);
}
+ for (child = g_list_last (tabber->priv->children); child != current_tab; child = g_list_previous (child))
+ {
+ anjuta_tabber_draw_tab (tabber, cr, child, FALSE);
+ }
anjuta_tabber_draw_tab (tabber, cr, current_tab, TRUE);
return GTK_WIDGET_CLASS (anjuta_tabber_parent_class)->draw (widget, cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]