edit: Use proper styling for toolbar

This commit is contained in:
Sophie Herold 2024-09-19 20:13:53 +02:00
parent b6bdc9398d
commit e9869bcb40
5 changed files with 149 additions and 135 deletions

View file

@ -52,9 +52,9 @@
</menu>
<template class="LpEditCrop" parent="GtkWidget">
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwToolbarView">
<property name="bottom-bar-style">raised</property>
<property name="content">
<object class="GtkOverlay">
<property name="margin-top">18</property>
<property name="margin-end">18</property>
@ -70,118 +70,131 @@
<property name="crop">LpEditCrop</property>
</object>
</child>
<child type="overlay">
<object class="GtkButton">
<property name="label">Apply</property>
<property name="action-name">edit.apply-crop</property>
<property name="halign">end</property>
<property name="valign">start</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="homogeneous">true</property>
<property name="spacing">6</property>
<property name="margin-bottom">16</property>
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<child>
</property>
<child type="bottom">
<object class="AdwClamp">
<property name="maximum-size">360</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="homogeneous">true</property>
<property name="spacing">6</property>
<style>
<class name="toolbar" />
</style>
<child>
<object class="GtkMenuButton">
<property name="icon-name">aspect-ratio-symbolic</property>
<property name="tooltip-text" translatable="yes">Aspect Ratio</property>
<property name="halign">start</property>
<property name="direction">up</property>
<style>
<class name="flat" />
</style>
<property name="popover">
<object class="GtkPopoverMenu">
<property name="menu-model">aspect_ratio_menu</property>
<child type="orientation">
<object class="GtkBox">
<property name="homogeneous">true</property>
<property name="spacing">6</property>
<child>
<object class="GtkToggleButton" id="landscape">
<property name="icon-name">page-orientation-landscape-symbolic</property>
<property name="tooltip-text" translatable="yes">Orientation Landscape</property>
<property name="hexpand">true</property>
<property name="action-name">edit-crop.orientation</property>
<property name="action-target">'landscape'</property>
<style>
<class name="flat" />
</style>
</object>
</child>
<child>
<object class="GtkToggleButton" id="portrait">
<property name="icon-name">page-orientation-portrait-symbolic</property>
<property name="tooltip-text" translatable="yes">Orientation Portrait</property>
<property name="hexpand">true</property>
<property name="action-name">edit-crop.orientation</property>
<property name="action-target">'portrait'</property>
<style>
<class name="flat" />
</style>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkMenuButton">
<property name="icon-name">aspect-ratio-symbolic</property>
<property name="tooltip-text" translatable="yes">Aspect Ratio</property>
<property name="halign">start</property>
<property name="direction">up</property>
<style>
<class name="flat" />
</style>
<property name="popover">
<object class="GtkPopoverMenu">
<property name="menu-model">aspect_ratio_menu</property>
<child type="orientation">
<object class="GtkBox">
<property name="homogeneous">true</property>
<property name="spacing">6</property>
<child>
<object class="GtkToggleButton" id="landscape">
<property name="icon-name">page-orientation-landscape-symbolic</property>
<property name="tooltip-text" translatable="yes">Orientation Landscape</property>
<property name="hexpand">true</property>
<property name="action-name">edit-crop.orientation</property>
<property name="action-target">'landscape'</property>
<style>
<class name="flat" />
</style>
</object>
</child>
<child>
<object class="GtkToggleButton" id="portrait">
<property name="icon-name">page-orientation-portrait-symbolic</property>
<property name="tooltip-text" translatable="yes">Orientation Portrait</property>
<property name="hexpand">true</property>
<property name="action-name">edit-crop.orientation</property>
<property name="action-target">'portrait'</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</property>
</object>
</property>
</child>
<child>
<object class="GtkButton">
<property name="icon-name">edit-mirror-symbolic</property>
<property name="valign">start</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton">
<property name="icon-name">edit-mirror-symbolic</property>
<property name="valign">start</property>
<style>
<class name="flat" />
</style>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="halign">center</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton">
<property name="icon-name">object-rotate-left-symbolic</property>
<property name="valign">start</property>
<style>
<class name="flat" />
</style>
</object>
</child>
<child>
<object class="GtkButton">
<property name="icon-name">object-rotate-right-symbolic</property>
<property name="valign">start</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="halign">end</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton">
<property name="label">Reset</property>
<property name="valign">start</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="halign">center</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton">
<property name="icon-name">object-rotate-left-symbolic</property>
<property name="valign">start</property>
<style>
<class name="flat" />
</style>
</object>
</child>
<child>
<object class="GtkButton">
<property name="icon-name">object-rotate-right-symbolic</property>
<property name="valign">start</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="halign">end</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton">
<property name="label">Reset</property>
<property name="valign">start</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
</property>
</object>
</child>
</object>