summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tab-chrome.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 0e12da5..d5de77b 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -41,6 +41,16 @@ forward_clicked_cb(GtkButton __attribute__((unused)) *toolbutton,
}
static void
+back_forward_scrolled_window_size_allocate_cb(
+ GtkScrolledWindow *scrolled_window,
+ GdkRectangle __attribute__((unused)) *allocation,
+ gpointer __attribute__((unused)) user_data)
+{
+ gtk_scrolled_window_set_policy(scrolled_window,
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+}
+
+static void
back_forward_toggle_button_toggled_cb(GtkToggleButton *toggle_button,
GtkStack *stack)
{
@@ -205,19 +215,25 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event,
list_scrolled_window = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(
GTK_SCROLLED_WINDOW(list_scrolled_window),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ GTK_POLICY_NEVER, GTK_POLICY_NEVER);
/* gtk_scrolled_window_set_propagate_natural_width(
GTK_SCROLLED_WINDOW(list_scrolled_window), TRUE); */
gtk_container_add(GTK_CONTAINER(list_scrolled_window), list_box);
+ g_signal_connect(list_scrolled_window, "size-allocate",
+ G_CALLBACK(back_forward_scrolled_window_size_allocate_cb),
+ NULL);
/* Set up the text scrolled window. */
text_scrolled_window = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(
GTK_SCROLLED_WINDOW(text_scrolled_window),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ GTK_POLICY_NEVER, GTK_POLICY_NEVER);
/* gtk_scrolled_window_set_propagate_natural_width(
GTK_SCROLLED_WINDOW(text_scrolled_window), TRUE); */
gtk_container_add(GTK_CONTAINER(text_scrolled_window), text_view);
+ g_signal_connect(text_scrolled_window, "size-allocate",
+ G_CALLBACK(back_forward_scrolled_window_size_allocate_cb),
+ NULL);
/* Set up the stack. */
stack = gtk_stack_new();