[gnome-builder] ui: add new ui for document views
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] ui: add new ui for document views
- Date: Thu, 11 Dec 2014 00:08:52 +0000 (UTC)
commit ae31655149b0f7329573a41eb2492cdfafd1a598
Author: Christian Hergert <christian hergert me>
Date: Sun Dec 7 02:40:55 2014 -0800
ui: add new ui for document views
src/resources/ui/gb-document-menu-button.ui | 88 +++++++++++++++++++++++++++
src/resources/ui/gb-document-stack.ui | 67 ++++++++++++++++++++
src/resources/ui/gb-editor-view.ui | 39 ++++++++++++
src/resources/ui/gb-editor-workspace.ui | 2 +-
4 files changed, 195 insertions(+), 1 deletions(-)
---
diff --git a/src/resources/ui/gb-document-menu-button.ui b/src/resources/ui/gb-document-menu-button.ui
new file mode 100644
index 0000000..d06efc6
--- /dev/null
+++ b/src/resources/ui/gb-document-menu-button.ui
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.14 -->
+ <template class="GbDocumentMenuButton" parent="GtkMenuButton">
+ <property name="popover">popover</property>
+ <style>
+ <class name="text-button"/>
+ </style>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">true</property>
+ <property name="hexpand">true</property>
+ <property name="orientation">horizontal</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label">
+ <property name="visible">true</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">false</property>
+ <property name="valign">baseline</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="modified_label">
+ <property name="visible">false</property>
+ <property name="xalign">0.0</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">false</property>
+ <property name="label">•</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">true</property>
+ <property name="hexpand">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkArrow">
+ <property name="visible">true</property>
+ <property name="arrow_type">GTK_ARROW_DOWN</property>
+ <property name="hexpand">false</property>
+ <property name="valign">baseline</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+ <object class="GtkPopover" id="popover">
+ <property name="border_width">9</property>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="visible">true</property>
+ <property name="expand">true</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkSearchEntry" id="search_entry">
+ <property name="visible">true</property>
+ <property name="placeholder-text" translatable="yes">Search Documents</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolled_window">
+ <property name="visible">true</property>
+ <property name="expand">true</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
+ <property name="height_request">200</property>
+ <property name="width_request">400</property>
+ <child>
+ <object class="GtkListBox" id="list_box">
+ <property name="selection-mode">GTK_SELECTION_SINGLE</property>
+ <property name="visible">true</property>
+ <child type="placeholder">
+ <object class="GtkLabel">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">No document were found</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/src/resources/ui/gb-document-stack.ui b/src/resources/ui/gb-document-stack.ui
new file mode 100644
index 0000000..65f5034
--- /dev/null
+++ b/src/resources/ui/gb-document-stack.ui
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.8 -->
+ <template class="GbDocumentStack" parent="GtkBox">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkBox" id="header_box">
+ <property name="visible">true</property>
+ <property name="orientation">horizontal</property>
+ <style>
+ <class name="linked"/>
+ </style>
+ <child>
+ <object class="GbDocumentMenuButton" id="document_button">
+ <property name="visible">true</property>
+ <property name="hexpand">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStack" id="controls">
+ <property name="homogeneous">false</property>
+ <property name="hexpand">false</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuButton" id="stack_menu">
+ <property name="visible">false</property>
+ <style>
+ <class name="image-button"/>
+ <class name="tab-header-first"/>
+ </style>
+ <child>
+ <object class="GtkImage">
+ <property name="visible">true</property>
+ <property name="icon_name">open-menu-symbolic</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="close">
+ <property name="visible">false</property>
+ <property name="tooltip_text">Close the current document</property>
+ <style>
+ <class name="image-button"/>
+ <class name="tab-header-last"/>
+ </style>
+ <child>
+ <object class="GtkImage">
+ <property name="visible">true</property>
+ <property name="icon_name">window-close-symbolic</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStack" id="stack">
+ <property name="visible">true</property>
+ <property name="expand">true</property>
+ <property name="transition-type">GTK_STACK_TRANSITION_TYPE_CROSSFADE</property>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/src/resources/ui/gb-editor-view.ui b/src/resources/ui/gb-editor-view.ui
new file mode 100644
index 0000000..4fc1885
--- /dev/null
+++ b/src/resources/ui/gb-editor-view.ui
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.14 -->
+ <template class="GbEditorView" parent="GbDocumentView">
+ <child internal-child="controls">
+ <object class="GtkBox">
+ <property name="visible">true</property>
+ <style>
+ <class name="linked"/>
+ </style>
+ <child>
+ <object class="GtkToggleButton" id="split_button">
+ <property name="visible">true</property>
+ <style>
+ <class name="image-button"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkPaned" id="paned">
+ <property name="orientation">vertical</property>
+ <property name="vexpand">true</property>
+ <property name="visible">true</property>
+ <child>
+ <object class="GbEditorFrame" id="frame">
+ <property name="expand">true</property>
+ <property name="visible">true</property>
+ </object>
+ <packing>
+ <property name="resize">true</property>
+ <property name="shrink">false</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/src/resources/ui/gb-editor-workspace.ui b/src/resources/ui/gb-editor-workspace.ui
index 705d989..c1d0f01 100644
--- a/src/resources/ui/gb-editor-workspace.ui
+++ b/src/resources/ui/gb-editor-workspace.ui
@@ -37,7 +37,7 @@
</object>
</child>
<child>
- <object class="GbTabGrid" id="tab_grid">
+ <object class="GbDocumentGrid" id="document_grid">
<property name="visible">True</property>
<property name="hexpand">True</property>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]