[gtk+/toolpalette] Also flip scrollbars in the toolpalette example
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/toolpalette] Also flip scrollbars in the toolpalette example
- Date: Tue, 14 Jul 2009 19:56:01 +0000 (UTC)
commit 33c4cb76d86c192ea4dbb8f0db34bbbc37158305
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jul 14 15:55:12 2009 -0400
Also flip scrollbars in the toolpalette example
demos/gtk-demo/toolpalette.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/demos/gtk-demo/toolpalette.c b/demos/gtk-demo/toolpalette.c
index 671aa77..602fc1e 100644
--- a/demos/gtk-demo/toolpalette.c
+++ b/demos/gtk-demo/toolpalette.c
@@ -16,6 +16,7 @@ static void load_special_items (GtkToolPalette *palette);
static void on_combo_orientation_changed(GtkComboBox *combo_box, gpointer user_data)
{
GtkToolPalette *palette = GTK_TOOL_PALETTE (user_data);
+ GtkScrolledWindow *sw = GTK_SCROLLED_WINDOW (GTK_WIDGET (palette)->parent);
GtkTreeModel *model = gtk_combo_box_get_model (combo_box);
GtkTreeIter iter;
@@ -26,6 +27,11 @@ static void on_combo_orientation_changed(GtkComboBox *combo_box, gpointer user_d
gtk_tree_model_get (model, &iter, 1, &val, -1);
gtk_orientable_set_orientation (GTK_ORIENTABLE (palette), val);
+
+ if (val == GTK_ORIENTATION_HORIZONTAL)
+ gtk_scrolled_window_set_policy (sw, GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
+ else
+ gtk_scrolled_window_set_policy (sw, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
}
static void on_combo_style_changed(GtkComboBox *combo_box, gpointer user_data)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]