[gnome-software: 1/5] app-row: Move the description below the version number
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/5] app-row: Move the description below the version number
- Date: Fri, 11 Feb 2022 14:00:16 +0000 (UTC)
commit 44e1dda7822b1ae38e65fee416ba96a89f906a7b
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Feb 9 13:50:02 2022 +0100
app-row: Move the description below the version number
This simplifies the layout and makes it more in line with the other
GNOME rows.
Fixes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1386
Fixes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1627
src/gs-app-row.c | 3 -
src/gs-app-row.ui | 184 ++++++++++++++++++++++++++----------------------------
2 files changed, 90 insertions(+), 97 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 7ff1b1c15..0966fa4cf 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -524,9 +524,6 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
gtk_widget_get_visible (priv->box_tag) ||
gtk_widget_get_visible (priv->description_label));
- gtk_widget_set_hexpand (priv->name_box,
- !gtk_widget_get_visible (priv->description_box));
-
gtk_label_set_max_width_chars (GTK_LABEL (priv->name_label),
gtk_widget_get_visible (priv->description_label) ? 20 : -1);
}
diff --git a/src/gs-app-row.ui b/src/gs-app-row.ui
index f38c120da..3d931f837 100644
--- a/src/gs-app-row.ui
+++ b/src/gs-app-row.ui
@@ -24,6 +24,7 @@
<property name="margin-start">12</property>
<property name="spacing">4</property>
<property name="valign">center</property>
+ <property name="hexpand">True</property>
<child>
<object class="GtkLabel" id="name_label">
<property name="wrap">True</property>
@@ -68,6 +69,95 @@
</child>
</object>
</child>
+ <child>
+ <object class="GtkBox" id="description_box">
+ <property name="margin_top">3</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">3</property>
+ <property name="valign">center</property>
+ <child>
+ <object class="GtkLabel" id="description_label">
+ <property name="visible" bind-source="GsAppRow" bind-property="show-description"
bind-flags="sync-create"/>
+ <property name="valign">start</property>
+ <property name="vexpand">True</property>
+ <property name="wrap">True</property>
+ <property name="wrap-mode">word-char</property>
+ <property name="ellipsize">end</property>
+ <property name="lines">2</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="box_tag">
+ <property name="spacing">4</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkBox" id="box_desc">
+ <property name="orientation">horizontal</property>
+ <property name="vexpand">True</property>
+ <child>
+ <object class="GtkLabel" id="label_origin">
+ <property name="xalign">0.0</property>
+ <property name="yalign">1.0</property>
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
+ <property name="ellipsize">end</property>
+ <style>
+ <class name="app-row-origin-text"/>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="label_installed">
+ <property name="visible">False</property>
+ <property name="orientation">horizontal</property>
+ <property name="halign">end</property>
+ <property name="hexpand">True</property>
+ <property name="valign">end</property>
+ <property name="spacing">6</property>
+ <property name="margin-end">24</property>
+ <child>
+ <object class="GtkImage" id="installed-icon">
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="pixel-size">16</property>
+ <property name="icon-name">software-installed-symbolic</property>
+ <style>
+ <class name="accent"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="installed-label">
+ <property name="valign">center</property>
+ <property name="label" translatable="yes">Installed</property>
+ <style>
+ <class name="caption"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_warning">
+ <property name="visible">False</property>
+ <property name="label">warning-text</property>
+ <property name="halign">start</property>
+ <property name="wrap">True</property>
+ <property name="xalign">0</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ <attribute name="foreground" value="#cccc00000000"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
<child>
<object class="GtkBox" id="system_updates_box">
<property name="orientation">horizontal</property>
@@ -105,100 +195,6 @@
</child>
</object>
</child>
- <child>
- <object class="GtkBox" id="description_box">
- <property name="margin_top">3</property>
- <property name="orientation">vertical</property>
- <property name="spacing">3</property>
- <property name="hexpand">True</property>
- <property name="valign">center</property>
- <child>
- <object class="GtkLabel" id="description_label">
- <property name="visible" bind-source="GsAppRow" bind-property="show-description"
bind-flags="sync-create"/>
- <property name="valign">start</property>
- <property name="vexpand">True</property>
- <property name="margin_start">24</property>
- <property name="margin_end">24</property>
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
- <property name="ellipsize">end</property>
- <property name="lines">2</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="box_tag">
- <property name="spacing">4</property>
- <property name="margin_start">24</property>
- <property name="margin_end">8</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox" id="box_desc">
- <property name="orientation">horizontal</property>
- <property name="vexpand">True</property>
- <child>
- <object class="GtkLabel" id="label_origin">
- <property name="xalign">0.0</property>
- <property name="yalign">1.0</property>
- <property name="halign">start</property>
- <property name="hexpand">True</property>
- <property name="ellipsize">end</property>
- <style>
- <class name="app-row-origin-text"/>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="label_installed">
- <property name="visible">False</property>
- <property name="orientation">horizontal</property>
- <property name="halign">end</property>
- <property name="hexpand">True</property>
- <property name="valign">end</property>
- <property name="spacing">6</property>
- <property name="margin-end">24</property>
- <child>
- <object class="GtkImage" id="installed-icon">
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="pixel-size">16</property>
- <property name="icon-name">software-installed-symbolic</property>
- <style>
- <class name="accent"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="installed-label">
- <property name="valign">center</property>
- <property name="label" translatable="yes">Installed</property>
- <style>
- <class name="caption"/>
- </style>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="label_warning">
- <property name="visible">False</property>
- <property name="label">warning-text</property>
- <property name="halign">start</property>
- <property name="wrap">True</property>
- <property name="xalign">0</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- <attribute name="foreground" value="#cccc00000000"/>
- </attributes>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
<child>
<object class="GtkBox" id="vertical_box">
<property name="orientation">vertical</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]