[gnome-nibbles/arnaudb/wip/gtk4: 162/188] Fix CSS file.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles/arnaudb/wip/gtk4: 162/188] Fix CSS file.
- Date: Fri, 2 Oct 2020 15:55:22 +0000 (UTC)
commit 3fd7f0a34e78a21121fcbc533ba710035ac79791
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Jun 15 19:31:28 2020 +0200
Fix CSS file.
data/nibbles.css | 20 ++++++++++++++------
data/ui/players.ui | 1 -
data/ui/speed.ui | 44 ++++++++++++++++++++++++++++++++++++--------
3 files changed, 50 insertions(+), 15 deletions(-)
---
diff --git a/data/nibbles.css b/data/nibbles.css
index 7facddf..b5e9ecf 100644
--- a/data/nibbles.css
+++ b/data/nibbles.css
@@ -54,7 +54,7 @@ button.toggle.text-button.number-box:checked {
/* the speed buttons */
button.toggle.text-button.speed-box,
-modelbutton.flat.speed-box
+checkbutton.text-button.speed-box
{
font-size: 1.5em;
font-weight: bold;
@@ -68,18 +68,22 @@ modelbutton.flat.speed-box
color:@theme-fg-color;
}
button.toggle.text-button.speed-box:disabled,
-modelbutton.flat.speed-box:disabled {
+checkbutton.text-button.speed-box:disabled {
color:@theme-fg-color;
}
button.toggle.text-button.speed-box:hover,
-modelbutton.flat.speed-box:hover {
+checkbutton.text-button.speed-box:hover {
background-color: rgba(60, 69, 71, 0.8);
}
button.toggle.text-button.speed-box:checked,
-modelbutton.flat.speed-box:checked {
+checkbutton.text-button.speed-box:checked {
background-color: #215d9c;
}
+button.text-button.toggle.speed-box > label {
+ margin-left:calc(2em + 4px); /* TODO not sure where the 4px are coming from */
+}
+
/* the empty space */
separator.speed-separator {
background-color:transparent;
@@ -88,11 +92,15 @@ separator.speed-separator {
}
/* the checkbutton */
-modelbutton.speed-box > check {
+checkbutton.text-button.speed-box > check {
min-height: 1em;
min-width: 1em;
}
+checkbutton.text-button.speed-box > label {
+ margin-left:1em;
+}
+
/*\
* * controls screen
\*/
@@ -102,7 +110,7 @@ button.controls-box {
background-image:-gtk-icontheme('emblem-system-symbolic');
background-size:2.5em;
background-repeat:no-repeat;
- background-position:calc(100%-1em) calc(100%-1em);
+ background-position:calc(100% - 1em) calc(100% - 1em);
background-color:transparent;
padding-top:1em;
diff --git a/data/ui/players.ui b/data/ui/players.ui
index 9ee3df4..d7549b4 100644
--- a/data/ui/players.ui
+++ b/data/ui/players.ui
@@ -21,7 +21,6 @@
<interface>
<template class="Players" parent="GtkBox">
<property name="orientation">vertical</property>
- <property name="halign">center</property>
<property name="width-request">644</property>
<child>
<object class="GtkBox">
diff --git a/data/ui/speed.ui b/data/ui/speed.ui
index cd4a569..b4e0a21 100644
--- a/data/ui/speed.ui
+++ b/data/ui/speed.ui
@@ -48,14 +48,21 @@
<property name="hexpand">True</property>
<property name="halign">fill</property>
<property name="use-underline">True</property>
- <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during game
configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "really slow" -->
- <property name="label" translatable="yes">_Beginner</property>
+ <property name="label"/> <!-- needed -->
<property name="action-name">speed.change-speed</property>
<property name="action-target">@i 4</property>
<property name="sensitive" bind-source="speed4" bind-property="active"
bind-flags="invert-boolean"/>
<style>
<class name="speed-box"/>
</style>
+ <child>
+ <object class="GtkLabel">
+ <property name="use-underline">True</property>
+ <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during
game configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "really slow" -->
+ <property name="label" translatable="yes">_Beginner</property>
+ <property name="halign">start</property>
+ </object>
+ </child>
</object>
</child>
<child>
@@ -63,14 +70,21 @@
<property name="hexpand">True</property>
<property name="halign">fill</property>
<property name="use-underline">True</property>
- <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during game
configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "quite slow" -->
- <property name="label" translatable="yes">_Slow</property>
+ <property name="label"/> <!-- needed -->
<property name="action-name">speed.change-speed</property>
<property name="action-target">@i 3</property>
<property name="sensitive" bind-source="speed3" bind-property="active"
bind-flags="invert-boolean"/>
<style>
<class name="speed-box"/>
</style>
+ <child>
+ <object class="GtkLabel">
+ <property name="use-underline">True</property>
+ <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during
game configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "really slow" -->
+ <property name="label" translatable="yes">_Slow</property>
+ <property name="halign">start</property>
+ </object>
+ </child>
</object>
</child>
<child>
@@ -78,14 +92,21 @@
<property name="hexpand">True</property>
<property name="halign">fill</property>
<property name="use-underline">True</property>
- <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during game
configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "normal" -->
- <property name="label" translatable="yes">_Medium</property>
+ <property name="label"/> <!-- needed -->
<property name="action-name">speed.change-speed</property>
<property name="action-target">@i 2</property>
<property name="sensitive" bind-source="speed2" bind-property="active"
bind-flags="invert-boolean"/>
<style>
<class name="speed-box"/>
</style>
+ <child>
+ <object class="GtkLabel">
+ <property name="use-underline">True</property>
+ <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during
game configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "really slow" -->
+ <property name="label" translatable="yes">_Medium</property>
+ <property name="halign">start</property>
+ </object>
+ </child>
</object>
</child>
<child>
@@ -93,14 +114,21 @@
<property name="hexpand">True</property>
<property name="halign">fill</property>
<property name="use-underline">True</property>
- <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during game
configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "fast" -->
- <property name="label" translatable="yes">_Fast</property>
+ <property name="label"/> <!-- needed -->
<property name="action-name">speed.change-speed</property>
<property name="action-target">@i 1</property>
<property name="sensitive" bind-source="speed1" bind-property="active"
bind-flags="invert-boolean"/>
<style>
<class name="speed-box"/>
</style>
+ <child>
+ <object class="GtkLabel">
+ <property name="use-underline">True</property>
+ <!-- Translators: title of a radiobutton in the "Preferences" panel displayed during
game configuration (with a mnemonic that appears when pressing Alt); sets worms speed to "really slow" -->
+ <property name="label" translatable="yes">_Fast</property>
+ <property name="halign">start</property>
+ </object>
+ </child>
</object>
</child>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]