Loupe/data/gtk/window.ui
Christopher Davis e45b89f854 window: Rework fullscreen
We can use AdwFlap and have one single headerbar for both
fullscreen and unfullscreened.
2021-09-24 01:18:31 -07:00

126 lines
4.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="IvWindow" parent="AdwApplicationWindow">
<property name="default-width">600</property>
<property name="default-height">498</property>
<property name="width-request">360</property>
<property name="title">Image Viewer</property>
<property name="content">
<object class="AdwFlap" id="flap">
<property name="orientation">vertical</property>
<property name="fold-policy">never</property>
<property name="locked">true</property>
<property name="modal">false</property>
<property name="flap">
<object class="GtkHeaderBar" id="headerbar">
<property name="css-classes">titlebar</property>
<property name="show_title_buttons" bind-source="IvWindow" bind-property="fullscreened" bind-flags="sync-create|invert-boolean"/>
<child type="end">
<object class="GtkMenuButton" id="menu_button">
<property name="icon-name">open-menu-symbolic</property>
<property name="menu-model">primary_menu</property>
</object>
</child>
<child type="end">
<object class="GtkButton" id="fullscreen_button">
<property name="icon-name">view-fullscreen-symbolic</property>
<property name="action-name">win.toggle-fullscreen</property>
</object>
</child>
</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 Here Or Drag An Image To View</property>
<child>
<object class="GtkGestureClick" id="open_gesture"/>
</child>
</object>
</child>
<child>
<object class="IvImageView" id="image_view">
<property name="popover-menu-model">image_menu</property>
</object>
</child>
</object>
</property>
<style>
<class name="fullscreen-widget"/>
</style>
</object>
</property>
</template>
<menu id="primary_menu">
<section>
<item>
<attribute name="label" translatable="yes">_New Window</attribute>
<attribute name="action">app.new-window</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Open With…</attribute>
<attribute name="action">win.open-with</attribute>
</item>
<!--<item>
<attribute name="label" translatable="yes">_Display On…</attribute>
<attribute name="action">win.display-on</attribute>
</item>-->
<item>
<attribute name="label" translatable="yes">_Print…</attribute>
<attribute name="action">win.print</attribute>
</item>
<!--<item>
<attribute name="label" translatable="yes">_Rotate</attribute>
<attribute name="action">win.rotate-image</attribute>
</item>-->
<item>
<attribute name="label" translatable="yes">_Set As Wallpaper</attribute>
<attribute name="action">win.set-wallpaper</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="action">app.help</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About Image Viewer</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
</menu>
<menu id="image_menu">
<section>
<item>
<attribute name="label" translatable="yes">_Open With…</attribute>
<attribute name="action">win.open-with</attribute>
</item>
<!--<item>
<attribute name="label" translatable="yes">_Display On…</attribute>
<attribute name="action">win.display-on</attribute>
</item>-->
<item>
<attribute name="label" translatable="yes">_Print…</attribute>
<attribute name="action">win.print</attribute>
</item>
<!--<item>
<attribute name="label" translatable="yes">_Rotate</attribute>
<attribute name="action">win.rotate-image</attribute>
</item>-->
<item>
<attribute name="label" translatable="yes">_Set As Wallpaper</attribute>
<attribute name="action">win.set-wallpaper</attribute>
</item>
</section>
</menu>
</interface>