Commit 31ab451a authored by Julian Sparber's avatar Julian Sparber
Browse files

debian: add landscape patches

parent e358efa1
From 753d7c5d4f5e1689a0ca6e0bf3797d8819a16b55 Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Mon, 14 Dec 2020 18:14:59 +0100
Subject: [PATCH 2/5] timer-setup: remove unused lables
---
data/ui/timer-setup.ui | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/data/ui/timer-setup.ui b/data/ui/timer-setup.ui
index 08a8fb1..d12056f 100644
--- a/data/ui/timer-setup.ui
+++ b/data/ui/timer-setup.ui
@@ -206,17 +206,6 @@
<property name="halign">center</property>
<property name="valign">center</property>
<property name="column_spacing">10</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
<child>
<object class="GtkSpinButton" id="h_spinbutton">
<property name="visible">True</property>
@@ -325,17 +314,6 @@
<property name="top_attach">0</property>
</packing>
</child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">6</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">True</property>
--
2.29.2
From b437907b7a197d14ac7acd7f7ab31759141efc60 Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Mon, 14 Dec 2020 18:34:46 +0100
Subject: [PATCH 3/5] timer: Allow much smaller heights useing a ScrolledWindow
---
data/ui/timer-face.ui | 81 +++++++++++++++++++++----------------
data/ui/timer-setup.ui | 1 -
src/timer-setup-dialog.vala | 13 +++++-
3 files changed, 57 insertions(+), 38 deletions(-)
diff --git a/data/ui/timer-face.ui b/data/ui/timer-face.ui
index 123a8c5..87331ec 100644
--- a/data/ui/timer-face.ui
+++ b/data/ui/timer-face.ui
@@ -7,55 +7,66 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkBox" id="no_timer_container">
+ <object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="orientation">vertical</property>
- <property name="spacing">18</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="hscrollbar-policy">never</property>
+ <property name="propagate-natural-height">True</property>
+ <property name="propagate-natural-width">True</property>
<child>
- <object class="GtkLabel">
+ <object class="GtkBox" id="no_timer_container">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Select Duration</property>
- <style>
- <class name="timer-header"/>
- </style>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="start_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">18</property>
+ <property name="margin">12</property>
<child>
- <object class="GtkImage">
+ <object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes">Select Duration</property>
+ <style>
+ <class name="timer-header"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="start_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="icon_name">media-playback-start-symbolic</property>
+ <child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="icon_name">media-playback-start-symbolic</property>
+ </object>
+ </child>
+ <style>
+ <class name="pill-button"/>
+ <class name="large-button"/>
+ <class name="suggested-action"/>
+ </style>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
- <style>
- <class name="pill-button"/>
- <class name="large-button"/>
- <class name="suggested-action"/>
- </style>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
<packing>
diff --git a/data/ui/timer-setup.ui b/data/ui/timer-setup.ui
index d12056f..e3bcda8 100644
--- a/data/ui/timer-setup.ui
+++ b/data/ui/timer-setup.ui
@@ -198,7 +198,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">12</property>
- <property name="margin_bottom">12</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
diff --git a/src/timer-setup-dialog.vala b/src/timer-setup-dialog.vala
index e360ad8..6e94b90 100644
--- a/src/timer-setup-dialog.vala
+++ b/src/timer-setup-dialog.vala
@@ -25,14 +25,23 @@ public class SetupDialog: Gtk.Dialog {
public SetupDialog (Gtk.Window parent) {
Object (modal: true, transient_for: parent, title: _("New Timer"), use_header_bar: 1);
- this.set_default_size (640, 360);
add_button (_("Cancel"), Gtk.ResponseType.CANCEL);
var create_button = add_button (_("Add"), Gtk.ResponseType.ACCEPT);
create_button.get_style_context ().add_class ("suggested-action");
timer_setup = new Setup ();
- this.get_content_area ().add (timer_setup);
+ timer_setup.margin = 12;
+ var container = new Gtk.ScrolledWindow (null, null);
+ container.hexpand = true;
+ container.vexpand = true;
+ container.propagate_natural_height = true;
+ container.propagate_natural_width = true;
+ container.hscrollbar_policy = Gtk.PolicyType.NEVER;
+ container.border_width = 0;
+ container.visible = true;
+ container.add (timer_setup);
+ this.get_content_area ().add (container);
timer_setup.duration_changed.connect ((duration) => {
this.set_response_sensitive (Gtk.ResponseType.ACCEPT, duration != 0);
});
--
2.29.2
From c97304d42b0e39bb52892301b5e5dbb69b59fef7 Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Tue, 15 Dec 2020 14:23:43 +0100
Subject: [PATCH 4/5] 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.29.2
From 8b43e42cfa61c4eedd5617e557870014639e5df7 Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Tue, 15 Dec 2020 14:31:12 +0100
Subject: [PATCH 5/5] world-standalone: allow smaller window heights
---
data/ui/world-standalone.ui | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/data/ui/world-standalone.ui b/data/ui/world-standalone.ui
index 46667d7..8f7acff 100644
--- a/data/ui/world-standalone.ui
+++ b/data/ui/world-standalone.ui
@@ -38,22 +38,8 @@
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="margin_start">34</property>
- <property name="margin_end">34</property>
- <property name="margin_bottom">12</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <child>
- <object class="GtkLabel" id="dummy_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"> </property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
<child>
<object class="GtkLabel" id="time_label">
<property name="visible">True</property>
--
2.29.2
......@@ -34,3 +34,11 @@
# Autostart Clocks
0001-add-option-to-start-hidden.patch
0002-autostart-gnome-clocks.patch
# Allow clocks to be resized to small window heights a.k.a. Landscape mode on phones:
# https://gitlab.gnome.org/GNOME/gnome-clocks/-/merge_requests/152
0001-alarm-setup-dialog-Allow-much-smaller-heights-useing.patch
0002-timer-setup-remove-unused-lables.patch
0003-timer-Allow-much-smaller-heights-useing-a-ScrolledWi.patch
0004-alarm-make-ringing-panel-fit-to-small-window-heights.patch
0005-world-standalone-allow-smaller-window-heights.patch
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment