bforsbe / OccuPy

GNU General Public License v3.0
17 stars 3 forks source link

Make GUI window resizable #19

Open Guillawme opened 1 year ago

Guillawme commented 1 year ago

Hello,

OccuPy is very useful and easy to use, thank you!

The GUI window doesn't seem to be resizable (the mouse cursor changes shape, which indicates I should be able to resize, but when trying to pull on the corner nothing happens). This is a bit frustrating because some elements inside of it are squished in a small space, and that makes them difficult to read or interact with (some buttons and dropdown menus appear very small, for example).

I am running it on Rocky Linux 9, and it is the latest version (0.1.13) installed using pip in a fresh conda environment that was created to only contain python=3.11 (and its few dependencies pulled automatically by conda) before I installed OccuPy.

Thank you.

bforsbe commented 1 year ago

I'm afraid that's down to my poor pyQT skills. It might be that there's some unfortunate scaling effects if I have misconfigured how QT reads your display size. There's a note of some such issues relating to HD screens here

If the GUI looks genuinely strange you can post a screenshot and I'll see if I can figure out what the deal is.

Guillawme commented 1 year ago

The screen I am using doesn't seem to be HD, but not sure how to check (all I can find easily is that the screen resolution is 1920x1200).

It's nothing extreme, see this screenshot:

Screenshot from 2023-09-27 08-34-48

It is mostly the "scale map", "solvent def" and "target map" labels and corresponding dropdown menus and "browse" buttons that don't get enough space and get cropped. So I thought this would be easily solved by resizing the window, but like I said pulling on the corner doesn't resize (in either direction).

bforsbe commented 1 year ago

I can reproduce this by setting my OS font to 12 instead of 10 before opening OccuPy.

We do set the window sizes in term of pixels so this isn't surprising, but I never saw it in testing. I'll try to change it so that the GUI elements are rescaled based on detected OS font size. For now the easy solve for you should be to reduce to OS font size, but I suspect you'll just live with it looking the way it does until I've managed to fix it.

bforsbe commented 1 year ago

I also noticed now that you probably can't even see the pivot slider on the sigmoid modification tab, right?

Guillawme commented 1 year ago

I can reproduce this by setting my OS font to 12 instead of 10 before opening OccuPy.

We do set the window sizes in term of pixels so this isn't surprising, but I never saw it in testing. I'll try to change it so that the GUI elements are rescaled based on detected OS font size. For now the easy solve for you should be to reduce to OS font size, but I suspect you'll just live with it looking the way it does until I've managed to fix it.

I can lower font size temporarily and will do that in the meantime. But ideally one would want the GUI to adjust automatically, yes. I set a larger font size precisely because I needed it to comfortably use this particular screen, and other people might do the same (I forgot to mention it in my first message, so it seemed closer to a default setup than it really is).

Guillawme commented 1 year ago

I also noticed now that you probably can't even see the pivot slider on the sigmoid modification tab, right?

I can see this slider. It's only the items under "Optional/extra options" that are a bit too closely packed to each other and deformed (as in the screenshot).