Debian Codegraph @

src/window.ui

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <interface>
3 <requires lib="gtk" version="4.0"/>
4 <requires lib="Adw" version="1.0"/>
5 <template class="PaperClipWindow" parent="AdwApplicationWindow">
6 <property name="default-width">600</property>
7 <property name="default-height">500</property>
8 <property name="width-request">350</property>
9 <property name="height-request">320</property>
10 <property name="title">Paper Clip</property>
11 <signal name="close-request" handler="on_close_request"/>
12
13 <child>
14 <object class="AdwToolbarView">
15 <child type="top">
16 <object class="GtkBox">
17 <property name="orientation">vertical</property>
18 <child>
19 <object class="AdwHeaderBar" id="header_bar">
20 <child type="start">
21 <object class="GtkButton">
22 <property name="action-name">win.open</property>
23 <property name="tooltip-text" translatable="yes">Select a File</property>
24 <child>
25 <object class="AdwButtonContent">
26 <property name="icon-name">document-open-symbolic</property>
27 <property name="label" translatable="yes">Open</property>
28 </object>
29 </child>
30 </object>
31 </child>
32
33 <child type="end">
34 <object class="GtkMenuButton" id="menu_button">
35 <property name="icon-name">open-menu-symbolic</property>
36 <property name="menu-model">primary_menu</property>
37 </object>
38 </child>
39 </object>
40 </child>
41 <child>
42 <object class="GtkProgressBar" id="progress_bar">
43 <property name="hexpand">true</property>
44 <property name="opacity">0.0</property>
45 <style>
46 <class name="osd"/>
47 </style>
48 </object>
49 </child>
50 </object>
51 </child>
52 <child>
53 <object class="AdwToastOverlay" id="toast_overlay">
54 <child>
55 <object class="PaperClipDropOverlay" id="drop_overlay">
56 <property name="overlayed">
57 <object class="AdwBin" id="overlay_bin"/>
58 </property>
59
60 <property name="child">
61 <object class="GtkStack" id="view_stack">
62 <property name="transition-type">crossfade</property>
63 <child>
64 <object class="GtkStackPage">
65 <property name="name">empty</property>
66 <property name="child">
67 <object class="AdwClamp" id="welcome_clamp">
68 <child>
69 <object class="GtkBox" id="welcome_status">
70 <property name="orientation">vertical</property>
71 <property name="valign">center</property>
72 <property name="spacing">15</property>
73
74 <child>
75 <object class="GtkImage">
76 <property name="accessible-role">presentation</property>
77 <property name="icon-name">io.github.diegoivan.pdf_metadata_editor</property>
78 <property name="margin-bottom">12</property>
79 <property name="pixel-size">128</property>
80 <style>
81 <class name="icon-dropshadow"/>
82 </style>
83 </object>
84 </child>
85
86 <child>
87 <object class="GtkLabel">
88 <property name="label" translatable="yes">Open a Document</property>
89 <style>
90 <class name="title-1"/>
91 </style>
92 </object>
93 </child>
94
95 <child>
96 <object class="GtkLabel">
97 <property name="label" translatable="yes">Drag and drop a PDF file here</property>
98 </object>
99 </child>
100 </object>
101 </child>
102 </object>
103 </property>
104 </object>
105 </child>
106
107 <child>
108 <object class="GtkStackPage">
109 <property name="name">editor</property>
110 <property name="child">
111 <object class="PaperClipDocumentView" id="doc_view">
112 </object>
113 </property>
114 </object>
115 </child>
116
117 </object>
118 </property>
119 </object>
120 </child>
121 </object>
122 </child>
123 </object>
124 </child>
125
126 <child>
127 <object class="GtkShortcutController">
128 <child>
129 <object class="GtkShortcut">
130 <property name="trigger">&lt;Control&gt;o</property>
131 <property name="action">action(win.open)</property>
132 </object>
133 </child>
134
135 <child>
136 <object class="GtkShortcut">
137 <property name="trigger">&lt;Control&gt;w</property>
138 <property name="action">action(window.close)</property>
139 </object>
140 </child>
141
142 <child>
143 <object class="GtkShortcut">
144 <property name="trigger">F10</property>
145 <property name="action">action(win.main-menu)</property>
146 </object>
147 </child>
148 </object>
149 </child>
150
151 </template>
152 <menu id="primary_menu">
153 <section>
154 <item>
155 <attribute name="label" translatable="yes">_New Window</attribute>
156 <attribute name="action">app.new-window</attribute>
157 </item>
158 </section>
159 <section>
160 <item>
161 <attribute name="label" translatable="yes">_Save</attribute>
162 <attribute name="action">win.save</attribute>
163 <attribute name="accel">&lt;control&gt;s</attribute>
164 <attribute name="hidden-when">action-disabled</attribute>
165 </item>
166 <item>
167 <attribute name="label" translatable="yes">Save _As…</attribute>
168 <attribute name="action">win.save-as</attribute>
169 <attribute name="accel">&lt;control&gt;&lt;shift&gt;s</attribute>
170 <attribute name="hidden-when">action-disabled</attribute>
171 </item>
172 <item>
173 <attribute name="label" translatable="yes">Open _With…</attribute>
174 <attribute name="action">win.open-with</attribute>
175 <attribute name="hidden-when">action-disabled</attribute>
176 </item>
177 </section>
178 <section>
179 <item>
180 <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
181 <attribute name="action">app.shortcuts</attribute>
182 </item>
183 <item>
184 <attribute name="label" translatable="yes">_About Paper Clip</attribute>
185 <attribute name="action">app.about</attribute>
186 </item>
187 </section>
188 </menu>
189 </interface>
190