In this code of Adw.NavigationPage
Box widget is always fixed size, even with hexpand
property, but it should have 400px width in bigger window sizes and less than 400px when Adw.Clamp
shrinks it size.
This is how it looks when
width-request
is set for controls
(and how it should look without width-request
)Adw.NavigationPage sync_navigation_page {
title: _("Syncing");
Adw.ToolbarView {
[top]
Adw.HeaderBar {
show-end-title-buttons: false;
}
[top]
Adw.Clamp {
maximum-size: 400;
orientation: horizontal;
Box {
orientation: horizontal;
halign: center;
valign: start;
spacing: 8;
vexpand: true;
hexpand: true;
margin-top: 12;
styles ["card"]
Image sync_page_cover {
icon-name: "note-placeholder";
pixel-size: 100;
overflow: hidden;
styles ["rounded"]
}
Box {
orientation: vertical;
vexpand: true;
spacing: 2;
margin-top: 8;
Inscription sync_page_title {
text: "Unknown";
text-overflow: ellipsize_end;
styles ["heading"]
}
Inscription sync_page_artist {
text: "Unknown";
text-overflow: ellipsize_end;
styles ["heading"]
}
Box {
margin-top: 4;
margin-end: 8;
spacing: 4;
MediaControls controls {
}
ToggleButton toggle_repeat_button {
tooltip-text: _("Toggle song repeat");
icon-name: "toggle-repeat-symbolic";
active: false;
halign: center;
}
}
}
}
}
}
}