[gnome-software/bilelmoussaoui/no-frame: 3/7] gs-details-page: Stop using GtkFrame
- From: Phaedrus Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/bilelmoussaoui/no-frame: 3/7] gs-details-page: Stop using GtkFrame
- Date: Sun, 11 Apr 2021 05:22:27 +0000 (UTC)
commit 41be91869047556094d4231b6180f6d7132bbdfc
Author: Phaedrus Leeds <mwleeds protonmail com>
Date: Sat Apr 10 22:10:44 2021 -0700
gs-details-page: Stop using GtkFrame
Use a libhandy css class instead which is cleaner.
src/gs-details-page.c | 4 +--
src/gs-details-page.ui | 77 +++++++++++++++++++++-----------------------------
2 files changed, 33 insertions(+), 48 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 74126d693..00b0030b0 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -120,7 +120,6 @@ struct _GsDetailsPage
GtkWidget *label_licenses_intro;
GtkWidget *list_box_addons;
GtkWidget *list_box_version_history;
- GtkWidget *box_version_history_frame;
GtkWidget *row_latest_version;
GtkWidget *version_history_button;
GtkWidget *box_reviews;
@@ -1317,7 +1316,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
if (version_history == NULL) {
const char *version = gs_app_get_version (self->app);
if (version == NULL || *version == '\0')
- gtk_widget_set_visible (self->box_version_history_frame, FALSE);
+ gtk_widget_set_visible (self->list_box_version_history, FALSE);
else
gs_app_version_history_row_set_info (GS_APP_VERSION_HISTORY_ROW
(self->row_latest_version),
version, gs_app_get_release_date (self->app),
NULL);
@@ -3044,7 +3043,6 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_failed);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, list_box_addons);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, list_box_version_history);
- gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, box_version_history_frame);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, row_latest_version);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, version_history_button);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, box_reviews);
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index d415e25fb..f440535c2 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -424,69 +424,56 @@
</child>
</object>
</child>
-
<child>
- <object class="GtkFrame" id="box_addons_frame">
+ <object class="GtkListBox" id="list_box_addons">
<property name="visible">True</property>
- <property name="shadow_type">none</property>
+ <property name="selection_mode">none</property>
<property name="halign">fill</property>
<property name="valign">start</property>
- <child>
- <object class="GtkListBox" id="list_box_addons">
- <property name="visible">True</property>
- <property name="selection_mode">none</property>
- <style>
- <class name="content"/>
- </style>
- </object>
- </child>
+ <style>
+ <class name="content"/>
+ </style>
</object>
</child>
</object>
</child>
<child>
- <object class="GtkFrame" id="box_version_history_frame">
+ <object class="GtkListBox" id="list_box_version_history">
<property name="visible">True</property>
- <property name="shadow_type">none</property>
+ <property name="selection_mode">none</property>
<property name="halign">fill</property>
<property name="valign">start</property>
+ <style>
+ <class name="content"/>
+ </style>
+ <child>
+ <object class="GsAppVersionHistoryRow" id="row_latest_version">
+ </object>
+ </child>
<child>
- <object class="GtkListBox" id="list_box_version_history">
+ <object class="GtkListBoxRow" id="version_history_button">
<property name="visible">True</property>
- <property name="selection_mode">none</property>
- <style>
- <class name="content"/>
- </style>
- <child>
- <object class="GsAppVersionHistoryRow" id="row_latest_version">
- </object>
- </child>
+ <property name="can_focus">True</property>
<child>
- <object class="GtkListBoxRow" id="version_history_button">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="halign">center</property>
+ <property name="margin_top">12</property>
+ <property name="margin_bottom">12</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="label" translatable="yes">Version History</property>
+ </object>
+ </child>
<child>
- <object class="GtkBox">
+ <object class="GtkImage">
<property name="visible">True</property>
- <property name="orientation">horizontal</property>
- <property name="halign">center</property>
- <property name="margin_top">12</property>
- <property name="margin_bottom">12</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="label" translatable="yes">Version
History</property>
- </object>
- </child>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="icon-name">go-next-symbolic</property>
- <property name="margin_start">6</property>
- </object>
- </child>
+ <property name="icon-name">go-next-symbolic</property>
+ <property name="margin_start">6</property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]