[gnome-games/wip/exalm/collection: 185/186] WIP: collection
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/collection: 185/186] WIP: collection
- Date: Mon, 24 Feb 2020 16:15:47 +0000 (UTC)
commit aa43edb214d0662abddd3ae0843043e344920508
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Thu May 23 01:43:36 2019 +0500
WIP: collection
data/gtk-style.css | 22 +++++++++++++++++-----
data/ui/collection-icon-view.ui | 6 ------
data/ui/game-icon-view.ui | 11 +++++++----
src/ui/game-thumbnail.vala | 2 +-
4 files changed, 25 insertions(+), 16 deletions(-)
---
diff --git a/data/gtk-style.css b/data/gtk-style.css
index 591dcf18..9158ab01 100644
--- a/data/gtk-style.css
+++ b/data/gtk-style.css
@@ -25,17 +25,29 @@
border-right: none;
}
+flowboxchild {
+ padding: 0;
+}
+
gamesgamethumbnail {
- background-color: mix(@theme_base_color, @theme_bg_color, 0.5);
+ background-color: shade(@theme_base_color, 0.5);
border-width: 1px;
border-style: solid;
- border-radius: 2px;
- border-color: @theme_bg_color;
- color: @theme_fg_color;
+ border-color: black;/*@theme_bg_color;*/
+ color: alpha(@theme_fg_color, 0.25);
+}
+
+.game-title {
+ color: white;
+ background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
+ text-shadow: 0 1px 2px black;
+ font-weight: bold;
+ padding-top: 28px;
+ padding-bottom: 6px;
}
gamescollectioniconview flowboxchild {
- min-width: 128px;
+ min-width: 180px;
}
gamescollectioniconview.large flowboxchild {
diff --git a/data/ui/collection-icon-view.ui b/data/ui/collection-icon-view.ui
index 4bb4c1b4..43e5f8d0 100644
--- a/data/ui/collection-icon-view.ui
+++ b/data/ui/collection-icon-view.ui
@@ -20,13 +20,7 @@
<property name="can-focus">True</property>
<property name="halign">center</property>
<property name="valign">start</property>
- <property name="margin-start">28</property>
- <property name="margin-end">28</property>
- <property name="margin-top">21</property>
- <property name="margin-bottom">21</property>
<property name="homogeneous">True</property>
- <property name="column-spacing">14</property>
- <property name="row-spacing">14</property>
<property name="selection-mode">single</property>
<signal name="child-activated" handler="on_child_activated"/>
</object>
diff --git a/data/ui/game-icon-view.ui b/data/ui/game-icon-view.ui
index 0aaab4bf..5bcb0693 100644
--- a/data/ui/game-icon-view.ui
+++ b/data/ui/game-icon-view.ui
@@ -4,23 +4,26 @@
<template class="GamesGameIconView" parent="GtkFlowBoxChild">
<property name="visible">True</property>
<child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <object class="GtkOverlay">
+ <property name="visible">True</property>
<child>
<object class="GamesGameThumbnail" id="thumbnail">
<property name="visible">True</property>
</object>
</child>
- <child>
+ <child type="overlay">
<object class="GtkLabel" id="title">
<property name="visible">True</property>
+ <property name="valign">end</property>
<property name="ellipsize">middle</property>
<property name="justify">center</property>
<property name="lines">2</property>
<property name="max-width-chars">0</property>
<property name="wrap">True</property>
<property name="wrap-mode">word-char</property>
+ <style>
+ <class name="game-title"/>
+ </style>
</object>
</child>
</object>
diff --git a/src/ui/game-thumbnail.vala b/src/ui/game-thumbnail.vala
index 8b5ef689..51d8d3ac 100644
--- a/src/ui/game-thumbnail.vala
+++ b/src/ui/game-thumbnail.vala
@@ -1,7 +1,7 @@
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.GameThumbnail : Gtk.DrawingArea {
- private const double EMBLEM_SCALE = 0.125;
+ private const double EMBLEM_SCALE = 0.5;
private const double ICON_SCALE = 0.75;
private ulong cover_changed_id;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]