[gnome-software: 12/18] details-page: Make the icon size consistent
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 12/18] details-page: Make the icon size consistent
- Date: Fri, 13 Aug 2021 15:12:59 +0000 (UTC)
commit 333f173e26ad07196ef4c6ebf7cb5c98e7d30c23
Author: Adrien Plazas <kekun plazas laposte net>
Date: Tue Aug 10 17:18:53 2021 +0200
details-page: Make the icon size consistent
This makes the icon size not depend on what is available on the system,
which makes the UI unpredictable.
This makes it work properly when changing the scale while the app runs,
and this ensures the icon won't be too large for phone screens.
src/gs-details-page.c | 5 +----
src/gs-details-page.ui | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 12f1138ae..430705db7 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -964,7 +964,6 @@ gs_details_page_refresh_all (GsDetailsPage *self)
const gchar *tmp;
g_autofree gchar *origin = NULL;
g_autoptr(GPtrArray) version_history = NULL;
- guint icon_size;
gboolean link_rows_visible;
/* change widgets */
@@ -1014,15 +1013,13 @@ gs_details_page_refresh_all (GsDetailsPage *self)
};
for (gsize i = 0; i < G_N_ELEMENTS (icon_fallbacks) && icon == NULL; i++) {
- icon_size = icon_fallbacks[i].icon_size;
icon = gs_app_get_icon_for_size (self->app,
- icon_size,
+ icon_fallbacks[i].icon_size,
gtk_widget_get_scale_factor
(self->application_details_icon),
icon_fallbacks[i].fallback_icon_name);
}
}
- gtk_image_set_pixel_size (GTK_IMAGE (self->application_details_icon), icon_size);
gtk_image_set_from_gicon (GTK_IMAGE (self->application_details_icon), icon,
GTK_ICON_SIZE_INVALID);
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index df648a31a..e72c22ed9 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -127,7 +127,6 @@
<object class="GtkImage" id="application_details_icon">
<property name="visible">True</property>
<property name="halign">start</property>
- <property name="valign">start</property>
<property name="pixel_size">128</property>
<style>
<class name="icon-dropshadow"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]