quickgui icon indicating copy to clipboard operation
quickgui copied to clipboard

bug: bottom of interface cut off (again) for some

Open philclifford opened this issue 1 year ago • 1 comments

          Quickgui 1.2.10. I'm still having this problem.

image

Pop_os 22.04. Not using wayland

image

Window can not be resized or maximized

Originally posted by @glantucan in https://github.com/quickemu-project/quickgui/issues/100#issuecomment-2325564841

philclifford avatar Sep 03 '24 18:09 philclifford

Also reported in discord by another user presumably on fedora.

philclifford avatar Sep 03 '24 18:09 philclifford

Just installed it on a new computer fresh PopOS 22.04 install. Same thing. Not a big deal cause I can still use quickemu, but I understand this a gui for more or less unexperienced linux users and PopOS seems to be very popular this days as an entry level distro

glantucan avatar Oct 27 '24 18:10 glantucan

Also a problem on Kubuntu, can't create VMs now.

mikey0000 avatar Nov 05 '24 20:11 mikey0000

I've just found this issue myself, I'm looking in to it.

marxjohnson avatar Nov 08 '24 13:11 marxjohnson

Ok, this is a bit strange.

We have some lines to set the max, min and default window size. When I increase these so that the window is the right size, the actual window size in pixels doesn't seem to bear any apparent relation to the size I set:

Screenshot from 2024-11-08 14-01-35 Screenshot from 2024-11-08 14-01-49

It could be that I'm making incorrect assumptions about how Size() works. @ymauray Do you have any thoughts about this?

marxjohnson avatar Nov 08 '24 14:11 marxjohnson

@marxjohnson The comments in main.dart, on line 76, says the size also needs to be changed in my_application.cc.

Could that be what the cause of all your troubles ?

main.dart, line 76 :

  // Don't forget to also change the size in linux/my_application.cc:50
  if (Platform.isMacOS) {
    setWindowMinSize(const Size(692 + 2, 580 + 30));
    setWindowMaxSize(const Size(692 + 2, 580 + 30));
  } else {
    setWindowMinSize(const Size(692, 580));
    setWindowMaxSize(const Size(692, 580));
  }

The reason for all those shenanigans is that, depending on the platform, setWinM??Size will or won't take the window decoration into account. Heck, I think on some linux DE, it may or may not do the same thing. Maybe there should be some kind of if (myDE.behaves()) { ... } else { ... } code here, for linux.

linux/my_application.cc, lines 50 and 51 :

  gtk_window_set_default_size(window, 692, 580);
  gtk_widget_show(GTK_WIDGET(window));

All this is on the main branch.

ymauray avatar Nov 08 '24 14:11 ymauray

I've been changing the gtk_window_set_default_size() call to match the setWindowMinSize() call. Same result, the actual minimum window size is much smaller in pixels that the numbers passed to setWindowMinSize(), even with decorations.

FWIW, I am currently running stock Ubuntu 22.04.

marxjohnson avatar Nov 08 '24 17:11 marxjohnson