[gnome-games/wip/exalm/tnum: 6/24] ui: Introduce CollectionListItem
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/tnum: 6/24] ui: Introduce CollectionListItem
- Date: Wed, 19 Aug 2020 18:22:23 +0000 (UTC)
commit f07d1477fa07d884f988b82e599dfa1d4b6d1532
Author: Neville <nevilleantony98 gmail com>
Date: Thu Aug 6 23:50:16 2020 +0530
ui: Introduce CollectionListItem
This will be used to show collections in a ListBox. This will be used
in the upcoming commits to provide an interface to choose collections.
data/org.gnome.Games.gresource.xml | 1 +
data/ui/collection-list-item.ui | 14 ++++++++++++++
src/meson.build | 1 +
src/ui/collection-list-item.vala | 14 ++++++++++++++
4 files changed, 30 insertions(+)
---
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index 71464b25a..6e5cd1e57 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -14,6 +14,7 @@
<file preprocess="xml-stripblanks">ui/checkmark-item.ui</file>
<file preprocess="xml-stripblanks">ui/collection-empty.ui</file>
<file preprocess="xml-stripblanks">ui/collection-icon-view.ui</file>
+ <file preprocess="xml-stripblanks">ui/collection-list-item.ui</file>
<file preprocess="xml-stripblanks">ui/collection-thumbnail.ui</file>
<file preprocess="xml-stripblanks">ui/collection-view.ui</file>
<file preprocess="xml-stripblanks">ui/collections-main-page.ui</file>
diff --git a/data/ui/collection-list-item.ui b/data/ui/collection-list-item.ui
new file mode 100644
index 000000000..5abb8f375
--- /dev/null
+++ b/data/ui/collection-list-item.ui
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="3.24"/>
+ <template class="GamesCollectionListItem" parent="HdyActionRow">
+ <property name="visible">True</property>
+ <property name="activatable-widget">check_button</property>
+ <child type="prefix">
+ <object class="GtkCheckButton" id="check_button">
+ <property name="visible">True</property>
+ <property name="valign">center</property>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/src/meson.build b/src/meson.build
index 7db764e86..67b9c9098 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -115,6 +115,7 @@ vala_sources = [
'ui/checkmark-item.vala',
'ui/collection-empty.vala',
'ui/collection-icon-view.vala',
+ 'ui/collection-list-item.vala',
'ui/collection-thumbnail.vala',
'ui/collection-view.vala',
'ui/collections-main-page.vala',
diff --git a/src/ui/collection-list-item.vala b/src/ui/collection-list-item.vala
new file mode 100644
index 000000000..da56c7d70
--- /dev/null
+++ b/src/ui/collection-list-item.vala
@@ -0,0 +1,14 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+[GtkTemplate (ui = "/org/gnome/Games/ui/collection-list-item.ui")]
+private class Games.CollectionListItem : Hdy.ActionRow {
+ public Collection collection { get; construct; }
+
+ construct {
+ title = collection.get_title ();
+ }
+
+ public CollectionListItem (Collection collection) {
+ Object (collection: collection);
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]