[gnome-builder/wip/exalm/terminal-scrolling: 6/6] testui: Put IdeTerminal into a scrolled window
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/exalm/terminal-scrolling: 6/6] testui: Put IdeTerminal into a scrolled window
- Date: Sun, 26 Sep 2021 00:50:57 +0000 (UTC)
commit ebd7e52e87d42525110a5f629adc22a10d6c0b41
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Sep 26 05:51:03 2021 +0500
testui: Put IdeTerminal into a scrolled window
Add a separator since there's no permanent scrollbar separating terminal
from toolbar anymore.
src/plugins/testui/gbp-test-output-panel.c | 6 ------
src/plugins/testui/gbp-test-output-panel.ui | 9 +++++----
2 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/src/plugins/testui/gbp-test-output-panel.c b/src/plugins/testui/gbp-test-output-panel.c
index 4b3c91a3d..537bf989a 100644
--- a/src/plugins/testui/gbp-test-output-panel.c
+++ b/src/plugins/testui/gbp-test-output-panel.c
@@ -31,7 +31,6 @@ struct _GbpTestOutputPanel
{
IdePane parent_instance;
IdeTerminal *terminal;
- GtkScrollbar *scrollbar;
};
G_DEFINE_FINAL_TYPE (GbpTestOutputPanel, gbp_test_output_panel, IDE_TYPE_PANE)
@@ -42,7 +41,6 @@ gbp_test_output_panel_class_init (GbpTestOutputPanelClass *klass)
GtkWidgetClass *widget_class = (GtkWidgetClass*)klass;
gtk_widget_class_set_template_from_resource (widget_class, "/plugins/testui/gbp-test-output-panel.ui");
- gtk_widget_class_bind_template_child (widget_class, GbpTestOutputPanel, scrollbar);
gtk_widget_class_bind_template_child (widget_class, GbpTestOutputPanel, terminal);
}
@@ -128,7 +126,6 @@ gbp_test_output_panel_init (GbpTestOutputPanel *self)
{ "save", gbp_testui_output_panel_save_in_file },
};
g_autoptr(GSimpleActionGroup) actions = NULL;
- GtkAdjustment *vadj;
gtk_widget_init_template (GTK_WIDGET(self));
@@ -138,9 +135,6 @@ gbp_test_output_panel_init (GbpTestOutputPanel *self)
actions = g_simple_action_group_new ();
g_action_map_add_action_entries (G_ACTION_MAP (actions), entries, G_N_ELEMENTS (entries), self);
gtk_widget_insert_action_group (GTK_WIDGET (self), "test-output", G_ACTION_GROUP (actions));
-
- vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (self->terminal));
- gtk_range_set_adjustment (GTK_RANGE (self->scrollbar), vadj);
}
GtkWidget *
diff --git a/src/plugins/testui/gbp-test-output-panel.ui b/src/plugins/testui/gbp-test-output-panel.ui
index e09805a5b..5ec96ba4a 100644
--- a/src/plugins/testui/gbp-test-output-panel.ui
+++ b/src/plugins/testui/gbp-test-output-panel.ui
@@ -2,8 +2,7 @@
<interface>
<template class="GbpTestOutputPanel" 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]