[gnome-games] savestate-listbox-row: Style labels with CSS
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] savestate-listbox-row: Style labels with CSS
- Date: Thu, 15 Aug 2019 15:03:04 +0000 (UTC)
commit 92726c71f4ca4801a273e2419a66e66046fd6707
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Thu Aug 15 19:36:58 2019 +0500
savestate-listbox-row: Style labels with CSS
This is a bit cleaner.
data/gtk-style.css | 9 +++++++++
data/ui/savestate-listbox-row.ui | 12 ++++--------
data/ui/savestates-list.ui | 8 ++++----
3 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/data/gtk-style.css b/data/gtk-style.css
index 75891f71..e64610af 100644
--- a/data/gtk-style.css
+++ b/data/gtk-style.css
@@ -18,6 +18,15 @@
border-radius: 5px;
}
+.savestate-name {
+ font-size: large;
+}
+
+.savestate-date {
+ opacity: 0.5;
+ font-size: small;
+}
+
.savestates-list {
border-left: none;
border-right: none;
diff --git a/data/ui/savestate-listbox-row.ui b/data/ui/savestate-listbox-row.ui
index 6c909600..88f30484 100644
--- a/data/ui/savestate-listbox-row.ui
+++ b/data/ui/savestate-listbox-row.ui
@@ -28,10 +28,9 @@
<property name="wrap">true</property>
<property name="wrap-mode">word-char</property>
<property name="xalign">0</property>
- <attributes>
- <!-- "1.2" is the value of "large" -->
- <attribute name="scale" value="1.2"/>
- </attributes>
+ <style>
+ <class name="savestate-name"/>
+ </style>
</object>
</child>
<child>
@@ -40,11 +39,8 @@
<property name="wrap">true</property>
<property name="xalign">0</property>
<style>
- <class name="dim-label"/>
+ <class name="savestate-date"/>
</style>
- <attributes>
- <attribute name="scale" value="0.8"/>
- </attributes>
</object>
</child>
</object>
diff --git a/data/ui/savestates-list.ui b/data/ui/savestates-list.ui
index 95bc1601..a45e85f7 100644
--- a/data/ui/savestates-list.ui
+++ b/data/ui/savestates-list.ui
@@ -49,10 +49,10 @@
<property name="visible">True</property>
<property name="margin">12</property>
<property name="label" translatable="yes">Create new savestate</property>
- <attributes>
- <!-- "1.2" is the value of "large" -->
- <attribute name="scale" value="1.2"/>
- </attributes>
+ <property name="wrap">True</property>
+ <style>
+ <class name="savestate-name"/>
+ </style>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]