[gnome-taquin/arnaudb/wip/gtk4: 85/108] Fix CSS warning.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-taquin/arnaudb/wip/gtk4: 85/108] Fix CSS warning.
- Date: Tue, 29 Sep 2020 14:16:04 +0000 (UTC)
commit 302943106f83a9fcfa0018c1f234a77b525997f2
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Feb 20 16:32:33 2020 +0100
Fix CSS warning.
data/base-window.css | 4 ++--
data/new-game-screen.css | 14 +++++++-------
src/new-game-screen.vala | 5 ++---
src/taquin-main.vala | 8 ++++----
4 files changed, 15 insertions(+), 16 deletions(-)
---
diff --git a/data/base-window.css b/data/base-window.css
index fece59c..6665e4e 100644
--- a/data/base-window.css
+++ b/data/base-window.css
@@ -52,10 +52,10 @@
}
.horizontal.overlayed-list:dir(ltr).needs-padding > scrolledwindow > viewport > list > row {
- padding-right:calc(160px+1rem); /* width-request of edit_mode_box + a bit */
+ padding-right:calc(160px + 1rem); /* width-request of edit_mode_box + a bit */
}
.horizontal.overlayed-list:dir(rtl).needs-padding > scrolledwindow > viewport > list > row {
- padding-left :calc(160px+1rem); /* width-request of edit_mode_box + a bit */
+ padding-left :calc(160px + 1rem); /* width-request of edit_mode_box + a bit */
}
.horizontal.overlayed-list:dir(ltr).needs-padding > .linked-circular {
margin-right:1.5rem;
diff --git a/data/new-game-screen.css b/data/new-game-screen.css
index 480446b..39c38ed 100644
--- a/data/new-game-screen.css
+++ b/data/new-game-screen.css
@@ -19,7 +19,7 @@
.extra-flat-window.flat-window .new-game-screen { padding:0.4rem; }
button.radio-like-toggle,
-button.menubutton-like-combo {
+menubutton.menubutton-like-combo > button.toggle {
border-radius:15px;
/* -gtk-outline-radius:13px;*/
}
@@ -101,10 +101,10 @@ window:not(.hc-theme) button.radio-like-toggle
/* copying start-game button */
-.extra-flat-window button.menubutton-like-combo {
+.extra-flat-window menubutton.menubutton-like-combo > button.toggle {
min-height:2rem;
}
- button.menubutton-like-combo {
+ menubutton.menubutton-like-combo > button.toggle {
min-height:3rem;
min-width:11rem;
@@ -113,13 +113,13 @@ window:not(.hc-theme) button.radio-like-toggle
/* styling */
-button.menubutton-like-combo:checked,
-button.menubutton-like-combo:hover {
+menubutton.menubutton-like-combo > button.toggle:checked,
+menubutton.menubutton-like-combo > button.toggle:hover {
color:#2e3436; /* gtk-contained.css’ theme_fg_color */
/* background:-gtk-gradient (radial, center center, 0, center center, 0.5, from(rgba (255, 255, 255, 1)),
to(rgba (255, 255, 255, 0)));*/
}
-button.menubutton-like-combo:checked:backdrop,
-button.menubutton-like-combo:hover:backdrop {
+menubutton.menubutton-like-combo > button.toggle:checked:backdrop,
+menubutton.menubutton-like-combo > button.toggle:hover:backdrop {
color:@theme_unfocused_fg_color;
/* background:-gtk-gradient (radial, center center, 0, center center, 0.5, from(rgba (255, 255, 255, 0.3)),
to(rgba (255, 255, 255, 0)));*/
}
diff --git a/src/new-game-screen.vala b/src/new-game-screen.vala
index b56a97d..fd2339a 100644
--- a/src/new-game-screen.vala
+++ b/src/new-game-screen.vala
@@ -113,11 +113,10 @@ private class NewGameScreen : Box, AdaptativeWidget
}
// that is a quite usual menubutton label, so put it here
- internal static inline string get_size_button_label (int size)
+ internal static inline string get_size_button_label (uint8 size)
{
/* Translators: when configuring a new game, button label for the size of the game ("3 × 3", or 4,
or 5) */
- return _("Size: %d × %d ▾").printf (size, size);
- // return _("Size: %hhu × %hhu ▾").printf (size, size)); // TODO uint8
+ return _("Size: %hhu × %hhu").printf (size, size);
}
/*\
diff --git a/src/taquin-main.vala b/src/taquin-main.vala
index e4a387f..321823c 100644
--- a/src/taquin-main.vala
+++ b/src/taquin-main.vala
@@ -257,10 +257,10 @@ private class Taquin : Gtk.Application, BaseApplication
/* New-game screen signals */
settings.changed ["size"].connect (() => {
if (!size_changed)
- update_size_button_label (settings.get_int ("size") /* 2 <= size <= 9 */);
+ update_size_button_label ((uint8) settings.get_int ("size") /* 2 <= size <= 9 */);
size_changed = false;
});
- update_size_button_label (settings.get_int ("size") /* 2 <= size <= 9 */);
+ update_size_button_label ((uint8) settings.get_int ("size") /* 2 <= size <= 9 */);
settings.changed ["theme"].connect (() => {
if (!theme_changed)
@@ -470,10 +470,10 @@ private class Taquin : Gtk.Application, BaseApplication
{
size_changed = true;
int size = int.parse (((!) variant).get_string ());
- update_size_button_label (size /* 3 <= size <= 5 */);
+ update_size_button_label ((uint8) size /* 3 <= size <= 5 */);
settings.set_int ("size", size);
}
- private void update_size_button_label (int size)
+ private void update_size_button_label (uint8 size)
{
new_game_screen.update_menubutton_label (NewGameScreen.MenuButton.ONE,
NewGameScreen.get_size_button_label (size));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]