inspector: Move scrolledwindow into prop list template

This commit is contained in:
Matthias Clasen 2014-05-09 23:15:34 -04:00
parent c744699201
commit bf46950a09
4 changed files with 92 additions and 92 deletions

View File

@ -53,9 +53,10 @@ struct _GtkInspectorPropListPrivate
GtkCellRenderer *value_renderer;
gboolean child_properties;
GtkTreeViewColumn *attribute_column;
GtkWidget *tree;
};
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorPropList, gtk_inspector_prop_list, GTK_TYPE_TREE_VIEW)
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorPropList, gtk_inspector_prop_list, GTK_TYPE_BOX)
static void
gtk_inspector_prop_list_init (GtkInspectorPropList *pl)
@ -143,6 +144,7 @@ gtk_inspector_prop_list_class_init (GtkInspectorPropListClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorPropList, model);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorPropList, value_renderer);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorPropList, attribute_column);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorPropList, tree);
}
static void

View File

@ -38,13 +38,13 @@ typedef struct _GtkInspectorPropListPrivate GtkInspectorPropListPrivate;
typedef struct _GtkInspectorPropList
{
GtkTreeView parent;
GtkBox parent;
GtkInspectorPropListPrivate *priv;
} GtkInspectorPropList;
typedef struct _GtkInspectorPropListClass
{
GtkTreeViewClass parent;
GtkBoxClass parent;
} GtkInspectorPropListClass;

View File

@ -11,7 +11,19 @@
<column type="gchararray"/>
</columns>
</object>
<template class="GtkInspectorPropList" parent="GtkTreeView">
<template class="GtkInspectorPropList" parent="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="expand">True</property>
<property name="hscrollbar-policy">automatic</property>
<property name="vscrollbar-policy">always</property>
<property name="shadow-type">in</property>
<property name="width-request">250</property>
<child>
<object class="GtkTreeView" id="tree">
<property name="visible">True</property>
<property name="model">model</property>
<property name="tooltip-column">4</property>
<child>
@ -81,5 +93,9 @@
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
</interface>

View File

@ -117,13 +117,6 @@
<property name="visible">True</property>
<property name="show-border">False</property>
<property name="scrollable">True</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="hscrollbar-policy">automatic</property>
<property name="vscrollbar-policy">always</property>
<property name="shadow-type">in</property>
<property name="width-request">250</property>
<child>
<object class="GtkInspectorPropList" id="prop_list">
<property name="visible">True</property>
@ -131,21 +124,12 @@
<property name="widget-tree">widget_tree</property>
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Properties</property>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="hscrollbar-policy">automatic</property>
<property name="vscrollbar-policy">always</property>
<property name="shadow-type">in</property>
<property name="width-request">250</property>
<child>
<object class="GtkInspectorPropList" id="child_prop_list">
<property name="visible">True</property>
@ -153,8 +137,6 @@
<property name="widget-tree">widget_tree</property>
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>