phosh-arch/gnome-clocks-mobile/0015-alarm-make-ringing-panel-fit-to-small-window-heights.patch
2024-08-13 08:17:11 -07:00

226 lines
11 KiB
Diff

From 845abcf43c0f86ee9405ef7aeaee63adcc16e1d1 Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Tue, 15 Dec 2020 14:23:43 +0100
Subject: [PATCH 15/16] alarm: make ringing panel fit to small window heights
---
data/ui/alarm-ringing-panel.ui | 181 ++++++++++++++++-----------------
1 file changed, 90 insertions(+), 91 deletions(-)
diff --git a/data/ui/alarm-ringing-panel.ui b/data/ui/alarm-ringing-panel.ui
index df04bc7..76ead33 100644
--- a/data/ui/alarm-ringing-panel.ui
+++ b/data/ui/alarm-ringing-panel.ui
@@ -7,119 +7,118 @@
<object class="HdyWindowHandle">
<property name="visible">True</property>
<child>
- <object class="GtkGrid">
+ <object class="HdyClamp">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">6</property>
- <property name="margin_right">6</property>
- <property name="margin_top">6</property>
- <property name="margin_bottom">6</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="row_spacing">48</property>
- <property name="column_spacing">24</property>
<child>
- <object class="GtkGrid" id="button_grid">
+ <object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="row_spacing">24</property>
<property name="column_spacing">24</property>
- <child>
- <object class="GtkButton" id="stop_button">
- <property name="label" translatable="yes">Stop</property>
- <property name="width_request">200</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <style>
- <class name="pill-button"/>
- <class name="large-button"/>
- <class name="destructive-action"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="snooze_button">
- <property name="label" translatable="yes">Snooze</property>
- <property name="width_request">200</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <style>
- <class name="pill-button"/>
- <class name="large-button"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">center</property>
+ <property name="row_spacing">12</property>
+ <property name="margin">12</property>
<property name="valign">center</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="orientation">vertical</property>
<child>
- <object class="GtkLabel" id="time_label">
+ <object class="GtkFlowBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="justify">center</property>
- <property name="wrap">True</property>
- <property name="xalign">0.5</property>
- <attributes>
- <attribute name="font-features" value="tnum=1"/>
- </attributes>
- <style>
- <class name="clocks-ringing-label"/>
- </style>
+ <property name="row_spacing">24</property>
+ <property name="column_spacing">24</property>
+ <property name="max_children_per_line">2</property>
+ <property name="hexpand">True</property>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="stop_button">
+ <property name="label" translatable="yes">Stop</property>
+ <property name="width_request">200</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <style>
+ <class name="pill-button"/>
+ <class name="large-button"/>
+ <class name="destructive-action"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBoxChild">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="snooze_button">
+ <property name="label" translatable="yes">Snooze</property>
+ <property name="width_request">200</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <style>
+ <class name="pill-button"/>
+ <class name="large-button"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="title_label">
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="justify">center</property>
- <property name="wrap">True</property>
- <property name="margin_top">24</property>
- <style>
- <class name="clocks-ringing-title"/>
- </style>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="time_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="justify">center</property>
+ <property name="wrap">True</property>
+ <property name="xalign">0.5</property>
+ <attributes>
+ <attribute name="font-features" value="tnum=1"/>
+ </attributes>
+ <style>
+ <class name="clocks-ringing-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="title_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="justify">center</property>
+ <property name="wrap">True</property>
+ <style>
+ <class name="clocks-ringing-title"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
</object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
</child>
</object>
</child>
--
2.34.1