[gnome-builder/wip/exalm/terminal-scrolling: 3/6] buildui: Put IdeTerminal into a scrolled window




commit e160f2a3146e2209bd93547651d1f72645c5461d
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sun Sep 26 05:49:24 2021 +0500

    buildui: Put IdeTerminal into a scrolled window
    
    Add a separator since there's no permanent scrollbar separating terminal
    from toolbar anymore.

 src/plugins/buildui/gbp-buildui-log-pane.c  | 5 -----
 src/plugins/buildui/gbp-buildui-log-pane.ui | 9 +++++----
 2 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/src/plugins/buildui/gbp-buildui-log-pane.c b/src/plugins/buildui/gbp-buildui-log-pane.c
index 2158f98e8..bd6b02c9c 100644
--- a/src/plugins/buildui/gbp-buildui-log-pane.c
+++ b/src/plugins/buildui/gbp-buildui-log-pane.c
@@ -35,7 +35,6 @@ struct _GbpBuilduiLogPane
 
   IdePipeline  *pipeline;
 
-  GtkScrollbar      *scrollbar;
   IdeTerminal       *terminal;
 
   guint              log_observer;
@@ -231,7 +230,6 @@ gbp_buildui_log_pane_class_init (GbpBuilduiLogPaneClass *klass)
 
   gtk_widget_class_set_css_name (widget_class, "buildlogpanel");
   gtk_widget_class_set_template_from_resource (widget_class, "/plugins/buildui/gbp-buildui-log-pane.ui");
-  gtk_widget_class_bind_template_child (widget_class, GbpBuilduiLogPane, scrollbar);
   gtk_widget_class_bind_template_child (widget_class, GbpBuilduiLogPane, terminal);
 
   properties [PROP_PIPELINE] =
@@ -364,9 +362,6 @@ gbp_buildui_log_pane_init (GbpBuilduiLogPane *self)
                            self,
                            G_CONNECT_SWAPPED);
 
-  gtk_range_set_adjustment (GTK_RANGE (self->scrollbar),
-                            gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (self->terminal)));
-
   dzl_dock_widget_set_title (DZL_DOCK_WIDGET (self), _("Build Output"));
 
   gbp_buildui_log_pane_reset_view (self);
diff --git a/src/plugins/buildui/gbp-buildui-log-pane.ui b/src/plugins/buildui/gbp-buildui-log-pane.ui
index 2c639440a..f76309459 100644
--- a/src/plugins/buildui/gbp-buildui-log-pane.ui
+++ b/src/plugins/buildui/gbp-buildui-log-pane.ui
@@ -2,8 +2,7 @@
 <interface>
   <template class="GbpBuilduiLogPane" parent="IdePane">
     <child>
-      <object class="GtkBox">
-        <property name="orientation">horizontal</property>
+      <object class="GtkScrolledWindow">
         <property name="visible">true</property>
         <child>
           <object class="IdeTerminal" id="terminal">
@@ -13,9 +12,11 @@
           </object>
         </child>
         <child>
-          <object class="GtkScrollbar" id="scrollbar">
-            <property name="orientation">vertical</property>
+          <object class="GtkSeparator">
             <property name="visible">true</property>
+            <style>
+              <class name="sidebar"/>
+            </style>
           </object>
         </child>
         <child>


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