[gnome-software/1139-version-history-fixes] Fix the UI of a few list boxes
- From: Phaedrus Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1139-version-history-fixes] Fix the UI of a few list boxes
- Date: Wed, 17 Feb 2021 20:13:55 +0000 (UTC)
commit e11e56eb8862d1d7ef6c50fdd5714f5e0e568bcc
Author: Phaedrus Leeds <mwleeds endlessos org>
Date: Tue Feb 16 19:31:42 2021 -0800
Fix the UI of a few list boxes
Fix a few UI papercuts of list boxes for the add-ons box, version history box,
and origin popover.
Fixes #1139
src/gnome-software.ui | 3 +++
src/gs-app-version-history-dialog.c | 16 ----------------
src/gs-app-version-history-dialog.ui | 4 +++-
src/gs-app-version-history-row.c | 1 +
src/gs-details-page.c | 20 --------------------
src/gs-details-page.ui | 13 +++++--------
6 files changed, 12 insertions(+), 45 deletions(-)
---
diff --git a/src/gnome-software.ui b/src/gnome-software.ui
index eb6b2d039..2698c91f7 100644
--- a/src/gnome-software.ui
+++ b/src/gnome-software.ui
@@ -593,6 +593,9 @@
<object class="GtkListBox" id="origin_popover_list_box">
<property name="selection-mode">none</property>
<property name="visible">true</property>
+ <style>
+ <class name="content"/>
+ </style>
</object>
</child>
</object>
diff --git a/src/gs-app-version-history-dialog.c b/src/gs-app-version-history-dialog.c
index 439ad2946..94d55cc0c 100644
--- a/src/gs-app-version-history-dialog.c
+++ b/src/gs-app-version-history-dialog.c
@@ -61,26 +61,10 @@ populate_version_history (GsAppVersionHistoryDialog *dialog,
}
}
-static void
-list_header_func (GtkListBoxRow *row,
- GtkListBoxRow *before,
- gpointer user_data)
-{
- GtkWidget *header = NULL;
- if (before != NULL)
- header = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_list_box_row_set_header (row, header);
-}
-
static void
gs_app_version_history_dialog_init (GsAppVersionHistoryDialog *dialog)
{
gtk_widget_init_template (GTK_WIDGET (dialog));
-
- gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->listbox),
- list_header_func,
- dialog,
- NULL);
}
static void
diff --git a/src/gs-app-version-history-dialog.ui b/src/gs-app-version-history-dialog.ui
index b8527a041..8c7d3d36e 100644
--- a/src/gs-app-version-history-dialog.ui
+++ b/src/gs-app-version-history-dialog.ui
@@ -27,7 +27,9 @@
<child>
<object class="GtkFrame">
<property name="visible">True</property>
- <property name="shadow_type">in</property>
+ <property name="shadow_type">none</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
<property name="margin-bottom">18</property>
<property name="margin-top">18</property>
<child>
diff --git a/src/gs-app-version-history-row.c b/src/gs-app-version-history-row.c
index e01e6987e..921393fae 100644
--- a/src/gs-app-version-history-row.c
+++ b/src/gs-app-version-history-row.c
@@ -61,6 +61,7 @@ gs_app_version_history_row_set_info (GsAppVersionHistoryRow *row,
version_tmp = g_strdup_printf (_("New in Version %s"), version_number);
gtk_label_set_label (GTK_LABEL (row->version_number_label), version_tmp);
gtk_label_set_label (GTK_LABEL (row->version_description_label), version_description);
+ gtk_style_context_remove_class (gtk_widget_get_style_context
(row->version_description_label), "dim-label");
} else {
g_autofree char *version_tmp = NULL;
const gchar *version_description_fallback;
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 099ff06d0..4df6722d3 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1433,17 +1433,6 @@ gs_details_page_refresh_all (GsDetailsPage *self)
g_list_free (addons);
}
-static void
-list_header_func (GtkListBoxRow *row,
- GtkListBoxRow *before,
- gpointer user_data)
-{
- GtkWidget *header = NULL;
- if (before != NULL)
- header = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_list_box_row_set_header (row, header);
-}
-
static gint
list_sort_func (GtkListBoxRow *a,
GtkListBoxRow *b,
@@ -2786,9 +2775,6 @@ gs_details_page_setup (GsPage *page,
gtk_list_box_set_sort_func (GTK_LIST_BOX (origin_popover_list_box),
origin_popover_list_sort_func,
NULL, NULL);
- gtk_list_box_set_header_func (GTK_LIST_BOX (origin_popover_list_box),
- list_header_func,
- NULL, NULL);
g_signal_connect (origin_popover_list_box, "row-activated",
G_CALLBACK (origin_popover_row_activated_cb),
self);
@@ -2952,16 +2938,10 @@ gs_details_page_init (GsDetailsPage *self)
self);
self->size_group_origin_popover = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_list_box_set_header_func (GTK_LIST_BOX (self->list_box_addons),
- list_header_func,
- self, NULL);
gtk_list_box_set_sort_func (GTK_LIST_BOX (self->list_box_addons),
list_sort_func,
self, NULL);
- gtk_list_box_set_header_func (GTK_LIST_BOX (self->list_box_version_history),
- list_header_func,
- self, NULL);
g_signal_connect (self->list_box_version_history, "row-activated",
G_CALLBACK (version_history_list_row_activated_cb), self);
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index e4f65d527..10687f236 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -427,17 +427,17 @@
<child>
<object class="GtkFrame" id="box_addons_frame">
<property name="visible">True</property>
- <property name="shadow_type">in</property>
+ <property name="shadow_type">none</property>
<property name="halign">fill</property>
<property name="valign">start</property>
- <style>
- <class name="view"/>
- </style>
<child>
<object class="GtkListBox" id="list_box_addons">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selection_mode">none</property>
+ <style>
+ <class name="content"/>
+ </style>
</object>
</child>
</object>
@@ -447,12 +447,9 @@
<child>
<object class="GtkFrame" id="box_version_history_frame">
<property name="visible">True</property>
- <property name="shadow_type">in</property>
+ <property name="shadow_type">none</property>
<property name="halign">fill</property>
<property name="valign">start</property>
- <style>
- <class name="view"/>
- </style>
<child>
<object class="GtkListBox" id="list_box_version_history">
<property name="visible">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]