[gnome-taquin] Allow to run on a flat screen.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-taquin] Allow to run on a flat screen.
- Date: Mon, 21 Jan 2019 06:12:24 +0000 (UTC)
commit dde52f596c5fe511a5a910b72469a408c535a3ee
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Jan 18 16:20:08 2019 +0100
Allow to run on a flat screen.
That is allowed by the use of BaseWindow.
data/taquin-screens.ui | 3 +++
data/taquin.css | 23 ++++++++++++++++-------
src/game-window.vala | 2 +-
3 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/data/taquin-screens.ui b/data/taquin-screens.ui
index 459e14a..7bc139c 100644
--- a/data/taquin-screens.ui
+++ b/data/taquin-screens.ui
@@ -59,6 +59,9 @@
<property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="spacing">6</property>
+ <style>
+ <class name="new-game-screen"/>
+ </style>
<child>
<object class="GtkLabel" id="games_label">
<property name="visible">False</property>
diff --git a/data/taquin.css b/data/taquin.css
index 06930ab..aa9b4d8 100644
--- a/data/taquin.css
+++ b/data/taquin.css
@@ -17,10 +17,13 @@
@import url("base-window.css");
- button.start-game-button { margin-top:2rem; margin-bottom:1rem; transition:margin-top 0
ease; }
+ .new-game-screen { padding: 0.5rem; } /* for top */
+ .flat-window button.start-game-button { margin-top:0.5rem; } /* for bottom */
-.extra-thin-window button.start-game-button,
-.extra-thin-window label.section-header { margin-top:1rem; }
+ button.start-game-button { margin-top:2.0rem; margin-bottom:0.5rem; transition:margin-top
0 ease; }
+
+.extra-thin-window label.section-header,
+.extra-thin-window button.start-game-button { margin-top:1.0rem; }
button.radio-like-toggle,
button.menubutton-like-combo {
@@ -48,22 +51,28 @@ button.menubutton-like-combo {
padding:0.5rem 1rem 1rem 1rem;
}
-window:not(.extra-thin-window) button.radio-like-toggle {
+ window:not(.extra-thin-window) button.radio-like-toggle {
transition:background-size 0s ease 0.01s,
background-position 0s ease 0.01s,
min-height 0s ease 0.01s,
padding 0s ease 0.01s;
}
-.extra-thin-window button.radio-like-toggle {
+.flat-window:not(.extra-thin-window) button.radio-like-toggle {
+ background-size:8rem;
+ min-height:9rem;
+}
+
+ .extra-thin-window button.radio-like-toggle {
background-size:5rem;
background-position:0.4rem center;
min-height:3rem;
padding:1.8rem 1rem 1rem 5rem;
}
- button.radio-like-toggle label { padding-bottom:10rem; }
-.extra-thin-window button.radio-like-toggle label { padding-bottom:1rem; }
+ button.radio-like-toggle label { padding-bottom:10rem; }
+ .extra-thin-window button.radio-like-toggle label { padding-bottom: 1rem; }
+.flat-window:not(.extra-thin-window) button.radio-like-toggle label { padding-bottom: 6rem; }
/*\
* * options buttons
diff --git a/src/game-window.vala b/src/game-window.vala
index 2732eb8..b8ba5cd 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -45,7 +45,7 @@ private class GameWindow : BaseWindow, AdaptativeWidget
construct
{
- height_request = 500; // FIXME remove limit
+ height_request = 400; // FIXME remove limit
}
public GameWindow (string? css_resource, string name, int width, int height, bool maximized, bool
start_now, GameWindowFlags flags, Box _new_game_screen, Widget view_content, NightLightMonitor
night_light_monitor)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]