[epiphany/wip/christopherdavis/switch-views-with-size] ephy-window: Change views with size



commit 3878a0f23ca3356323c5cfad7908b0af1d001b96
Author: Christopher Davis <brainblasted disroot org>
Date:   Sun Apr 21 20:37:53 2019 -0400

    ephy-window: Change views with size
    
    Previously when switching between mobile and desktop sizing
    with the Tabs view open gave you a large, strange tabs view.
    With this we just switch back to the main content if the
    window is big enough to permit it.

 src/ephy-window.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 4264559bd..769cb076b 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -543,6 +543,12 @@ update_adaptive_mode (EphyWindow *window)
   ephy_header_bar_set_adaptive_mode (header_bar, adaptive_mode);
   ephy_action_bar_set_adaptive_mode (action_bar, adaptive_mode);
   ephy_notebook_set_adaptive_mode (notebook, adaptive_mode);
+
+  /* When switching to desktop sizes, drop the tabs view and go back
+   * to the main view.
+   */
+  if (adaptive_mode == EPHY_ADAPTIVE_MODE_NORMAL)
+    gtk_stack_set_visible_child_name (GTK_STACK (window->main_stack), "content");
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]