window: Add ToastOverlay and use toasts for feedback
This commit is contained in:
parent
084304cadc
commit
400672b6b6
3 changed files with 76 additions and 46 deletions
|
|
@ -38,34 +38,38 @@
|
|||
</object>
|
||||
</property>
|
||||
<property name="content">
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible-child">status_page</property>
|
||||
<property name="vexpand">True</property>
|
||||
<child>
|
||||
<object class="AdwStatusPage" id="status_page">
|
||||
<property name="title" translatable="yes">Image Viewer</property>
|
||||
<property name="description" translatable="yes">Click "Open File…" or drag an image here.</property>
|
||||
<object class="AdwToastOverlay" id="toast_overlay">
|
||||
<property name="child">
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible-child">status_page</property>
|
||||
<property name="vexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="halign">center</property>
|
||||
<property name="label" translatable="yes">Open File…</property>
|
||||
<property name="action-name">win.open</property>
|
||||
<style>
|
||||
<class name="pill"/>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
<object class="AdwStatusPage" id="status_page">
|
||||
<property name="title" translatable="yes">Image Viewer</property>
|
||||
<property name="description" translatable="yes">Click "Open File…" or drag an image here.</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="halign">center</property>
|
||||
<property name="label" translatable="yes">Open File…</property>
|
||||
<property name="action-name">win.open</property>
|
||||
<style>
|
||||
<class name="pill"/>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="LpImageView" id="image_view"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkDropTarget" id="drop_target">
|
||||
<property name="actions">copy</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="LpImageView" id="image_view"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkDropTarget" id="drop_target">
|
||||
<property name="actions">copy</property>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
</property>
|
||||
<style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue