summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-20 18:03:11 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-20 19:40:01 (EDT)
commit42ca78390d46acf1a997634a6d1c59b8afc466fb (patch)
treeebe35efb8be550e9b66a19af5965d0ae8b633814 /src
parentc534c7e1bedb56b0f2e44b45a9d1ac5fcb9cef68 (diff)
downloadmarquee-42ca78390d46acf1a997634a6d1c59b8afc466fb.zip
marquee-42ca78390d46acf1a997634a6d1c59b8afc466fb.tar.gz
marquee-42ca78390d46acf1a997634a6d1c59b8afc466fb.tar.bz2
src/tab-chrome.c: Try to update scrollbar policies on toggle
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index d5de77b..a42ff26 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -54,15 +54,23 @@ static void
back_forward_toggle_button_toggled_cb(GtkToggleButton *toggle_button,
GtkStack *stack)
{
+ GtkWidget *child;
+
/* Use gtk_widget_show() and gtk_widget_hide() instead of
* gtk_stack_set_visible_child() so that the stack fits the size of only
* the visible child. */
- gtk_widget_show_all(gtk_stack_get_child_by_name(stack,
- gtk_toggle_button_get_active(toggle_button) ?
- "text" : "list"));
- gtk_widget_hide(gtk_stack_get_child_by_name(stack,
- gtk_toggle_button_get_active(toggle_button) ?
- "list" : "text"));
+
+ child = gtk_stack_get_child_by_name(stack,
+ gtk_toggle_button_get_active(toggle_button) ? "text" : "list");
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(child),
+ GTK_POLICY_NEVER, GTK_POLICY_NEVER);
+ gtk_widget_show_all(child);
+
+ child = gtk_stack_get_child_by_name(stack,
+ gtk_toggle_button_get_active(toggle_button) ? "list" : "text");
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(child),
+ GTK_POLICY_NEVER, GTK_POLICY_NEVER);
+ gtk_widget_hide(child);
}
static GtkWidget *