[nautilus/wip/antoniof/flowbox-to-gridview: 15/24] view-icon-item-ui: Fix icon sizing
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/flowbox-to-gridview: 15/24] view-icon-item-ui: Fix icon sizing
- Date: Wed, 9 Feb 2022 18:11:42 +0000 (UTC)
commit 6d3de5b988ef2d65a5cb53b521e31a1fa6c983a3
Author: António Fernandes <antoniof gnome org>
Date: Sun Feb 6 23:47:17 2022 +0000
view-icon-item-ui: Fix icon sizing
We want the top of the labels to align vertically among all items. For
this we set a minimum height and width for the container of the icon.
However, then a thumbnail is taller than it is wide, the picture makes
its container grow taller than the minimum height, despite the picture
never actually using being taller than the minimum height.
As in the previous commit, as a workaround, wrap the image in AdwClamp,
such that the height for width computation doesn't account for more than
height than necessary.
src/resources/ui/nautilus-view-icon-item-ui.ui | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/resources/ui/nautilus-view-icon-item-ui.ui b/src/resources/ui/nautilus-view-icon-item-ui.ui
index 6b384f5db..0b0f18d26 100644
--- a/src/resources/ui/nautilus-view-icon-item-ui.ui
+++ b/src/resources/ui/nautilus-view-icon-item-ui.ui
@@ -14,12 +14,17 @@
<property name="orientation">vertical</property>
<property name="halign">center</property>
<child>
- <object class="GtkPicture" id="icon">
- <property name="halign">center</property>
- <property name="hexpand">True</property>
- <property name="valign">center</property>
- <property name="vexpand">True</property>
- <property name="can-shrink">False</property>
+ <object class="AdwClamp">
+ <property name="maximum-size">0</property>
+ <property name="child">
+ <object class="GtkPicture" id="icon">
+ <property name="halign">center</property>
+ <property name="hexpand">True</property>
+ <property name="valign">center</property>
+ <property name="vexpand">True</property>
+ <property name="can-shrink">False</property>
+ </object>
+ </property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]