I have a widget with image and texts below it. But when the text is too long, the widget resizes, which is breaking app’s logic. Is there any way to set widget’s width (and height?) fixed?
Blueprint code of the widget:
using Gtk 4.0;
template $songCard: Box {
orientation: vertical;
height-request: 160;
width-request: 160;
valign: center;
halign: center;
hexpand: false;
vexpand: false;
styles [
"card",
]
Overlay {
Picture cover {
name: 'cover';
file: "file:/home/dzheremi/Pictures/note.png";
}
[overlay]
Box hover {
name: 'hover';
orientation: vertical;
homogeneous: true;
hexpand: true;
vexpand: true;
Image play {
name: 'play';
icon-name: 'media-playback-start-symbolic';
pixel-size: 45;
}
}
}
Box {
orientation: horizontal;
halign: start;
margin-top: 4;
margin-start: 8;
margin-bottom: 1;
margin-end: 8;
hexpand: false;
vexpand: false;
Label song_title {
label: "Unknowns";
styles [
'heading',
]
}
}
Box {
orientation: horizontal;
halign: start;
margin-top: 1;
margin-start: 8;
margin-bottom: 4;
hexpand: false;
vexpand: false;
Label song_artist {
label: "Unknown";
}
}
}