mednaffe icon indicating copy to clipboard operation
mednaffe copied to clipboard

mednaffe GUI too tall for pinephone

Open bogger33 opened this issue 2 years ago • 3 comments

Hello,

I use mednaffe a lot on my pinephone. It works almost perfectly, except that the GUI enforces a minimum window height that's bigger than fits on the screen (it would fit in terms of pixels, but not with gui scaling to make things legible/touch controllable). This means that the bottom part of the application is off screen, obscuring part of the game list (and the launch button, but I have a keyboard case so I just launch using enter).

It seems the minimum height is driven by the sidebars in the "global settings" and "systems" tab, since these always require all options to be visible without a scroll bar.

The windows minimum width is also too wide to show everything in portrait mode, but this is less of an issue since you'd generally not be using it that way.

It would be cool if the minimum height of the application could be reduced so it works better on extremely small screens. mednaffe is awesome and i'll keep using it either way but this would make things just a little bit nicer.

bogger33 avatar Jun 26 '22 14:06 bogger33

I tried taking a crack at it, but I'm not quite familiar enough with GTK, I think. From googling around, the impression I get is that all that's required is wrapping the TreeViews in MainWindow.ui in a GtkScrolledWindow, and the same for the gtkbox in Preferences.ui, but I'm not sure how to compile the ui files to what's actually used for building mednaffe in the end (My best guess is that it all just somehow gets squashed into a blob in resources.c?)

bogger33 avatar Jun 26 '22 23:06 bogger33

Yes, you need to regenerate resources.c with glib-compile-resources program if you change ui files.

Something like this:

$ glib-compile-resources --sourcedir=./share/glade --target=./src/resources.c --generate-source ./share/glade/resources.xml

AmatCoder avatar Jun 28 '22 21:06 AmatCoder

Thank you! I've created a pull request: #152

bogger33 avatar Jun 28 '22 22:06 bogger33