[gnome-builder/wip/exalm/terminal-scrolling: 5/7] debuggerui: Put IdeTerminal into a scrolled window




commit feb6bfa5deb472b6d5b6206d912c26b6efa5a30c
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sun Sep 26 05:50:10 2021 +0500

    debuggerui: Put IdeTerminal into a scrolled window
    
    Add a separator to compensate.
    
    Clean up GtkBox child properties while we're here.

 src/plugins/debuggerui/ide-debugger-log-view.c  |  5 ----
 src/plugins/debuggerui/ide-debugger-log-view.ui | 37 ++++++++-----------------
 2 files changed, 11 insertions(+), 31 deletions(-)
---
diff --git a/src/plugins/debuggerui/ide-debugger-log-view.c b/src/plugins/debuggerui/ide-debugger-log-view.c
index da8d0e28b..ad23110ae 100644
--- a/src/plugins/debuggerui/ide-debugger-log-view.c
+++ b/src/plugins/debuggerui/ide-debugger-log-view.c
@@ -29,7 +29,6 @@ struct _IdeDebuggerLogView
   GtkBox parent_instance;
 
   IdeTerminal *terminal;
-  GtkScrollbar *scroller;
   GtkEntry *commandentry;
 
   IdeDebugger *debugger;
@@ -180,7 +179,6 @@ ide_debugger_log_view_class_init (IdeDebuggerLogViewClass *klass)
   gtk_widget_class_set_template_from_resource (widget_class, "/plugins/debuggerui/ide-debugger-log-view.ui");
   gtk_widget_class_bind_template_child (widget_class, IdeDebuggerLogView, terminal);
   gtk_widget_class_bind_template_child (widget_class, IdeDebuggerLogView, commandentry);
-  gtk_widget_class_bind_template_child (widget_class, IdeDebuggerLogView, scroller);
   gtk_widget_class_bind_template_callback (widget_class, on_entry_activate);
 }
 
@@ -188,9 +186,6 @@ static void
 ide_debugger_log_view_init (IdeDebuggerLogView *self)
 {
   gtk_widget_init_template (GTK_WIDGET (self));
-
-  gtk_range_set_adjustment (GTK_RANGE (self->scroller),
-                            gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (self->terminal)));
 }
 
 void
diff --git a/src/plugins/debuggerui/ide-debugger-log-view.ui b/src/plugins/debuggerui/ide-debugger-log-view.ui
index a6e810379..b66fc2afb 100644
--- a/src/plugins/debuggerui/ide-debugger-log-view.ui
+++ b/src/plugins/debuggerui/ide-debugger-log-view.ui
@@ -7,35 +7,23 @@
     <property name="can-focus">False</property>
     <property name="orientation">vertical</property>
     <child>
-      <object class="GtkBox">
+      <object class="GtkScrolledWindow">
         <property name="visible">True</property>
         <child>
           <object class="IdeTerminal" id="terminal">
             <property name="visible">True</property>
+            <property name="vexpand">True</property>
           </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkScrollbar" id="scroller">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
-            <property name="orientation">vertical</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
-      <packing>
-        <property name="expand">True</property>
-        <property name="fill">True</property>
-      </packing>
+    </child>
+    <child>
+      <object class="GtkSeparator">
+        <property name="visible">true</property>
+        <style>
+          <class name="sidebar"/>
+        </style>
+      </object>
     </child>
     <child>
       <object class="GtkBox">
@@ -48,15 +36,12 @@
             <property name="primary-icon-name">pan-end-symbolic</property>
             <property name="visible">True</property>
             <property name="margin">6</property>
+            <property name="hexpand">True</property>
             <signal name="activate" handler="on_entry_activate" swapped="yes" object="IdeDebuggerLogView"/>
             <style>
               <class name="commandentry"/>
             </style>
           </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-          </packing>
         </child>
       </object>
     </child>


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