HdyHeaderBar become too big inside Flatpak

My app, when running inside Flatpak with org.gnome.Platform v43 runtime, its header bar (as HdyHeaderBar widget) becomes too big. I don’t know what causes it. Seem not to be libhandy version, because when running outside Flatpak, in Ubuntu 22.10 (which comes with libhandy 1.8), the header bar size is still normal.

Here is what it looks when running inside Flatpak:

And running outside Flatpak:

Can someone suggest what to do to fix it?

The XML file of UI: CoBang/cobang-resp.glade at main · hongquan/CoBang · GitHub

1 Like

Check flatpak for updates (for org.gtk3theme.adw-gtk3 specifically). If there isn’t any update available, you will have to change your GTK3 (Legacy Applications) theme to something else, preferebly the default one.

After I do

flatpak install org.gtk.Gtk3theme.adw-gtk3

The theme of the app changes, but the header bar is still big

Sorry, I forgot that Ubuntu’s Yaru also looks like adw-gtk3 and assumed that you were using adw-gtk3 itself. Try changing your GTK3 theme to ‘Adwaita’.

gsettings set org.gnome.desktop.interface gtk-theme Adwaita

I tried changing theme, but the header bar is still big

After changing the theme, is it still not big on the host system and big only inside the Flatpak?

Yes, only big inside Flatpak. It is normal on the host system.

Try using a newer version of org.gnome.Sdk and org.gnome.Platform.

I already use the latest version, v43, of org.gnome.Sdk and org.gnome.Platform.
Manifest file: CoBang/vn.hoabinh.quan.CoBang.yaml at feature/upgrade-flatpak-env · hongquan/CoBang · GitHub

Are you sure you don’t have vexpand set to true on the header bar?

It looks like the problem is related to the icon theme, in particular the webcam icon. For some reason it’s bigger than the other icons in flatpak, and bumps up the (minimum) size of the whole headerbar.

1 Like

vexpand is not set (as you can see in the included UI XML file).

Yes, do you know how to fix it?

Try adding -symbolic at the end of icon-name.

Thank you, it is working (use camera-web-symbolic icon).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.