Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GUI layout issues with scaling #4316

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Feb 20, 2025

Problems

  • KDE users report that CKAN doesn't look right with 250% scaling; a lot of text is too small, and many controls are cut off or otherwise unusable.
  • If you set suppress_recommendations on a relationship (typically in a modpack), that mod's recommendations and suggestions aren't shown, but its supported-by mods still are.
  • @linuxgurugamer says that clicking the Play button sometimes does nothing if you do it quickly enough.

Causes

  • WinForms supports automatic scaling, but it's not enabled in most places in CKAN's GUI.
  • supports relationships are handled differently from recommendations and suggestions in a way that requires a separate solution to suppression, which wasn't done previously.
  • The Play button has a dropdown menu, which we generate in its OnHover event. Maybe this causes a delay while you're clicking (not 100% certain about this, but it's the lowest hanging fruit to try first).

Changes

  • Now we set AutoScaleDimensions and AutoScaleMode in most dialogs and controls to enable automatic scaling. In addition, some layout is re-worked to use docking instead of anchoring.
    Does not address Font Rescaling #878.
    Fixes [Bug]: UI Scaling on Linux (KDE) partially broken #4271 (maybe, needs confirmation).
  • Now supress_recommendations also applies to supports relationships (requested by @JonnyOThan on Discord).
  • Now the dropdown for the Play button is generated in its OnOpen event rather than in MouseHover, so it should be less disruptive to usage of that button.
    Fixes [Bug]: Clicking quickly on Play button doesn't play game #4308 (maybe, needs confirmation).
  • Now the Contents tab's Download button shows the size of the download to help you decide whether you want to download.
  • Now the Relationship tab's legend is moved to the bottom and condensed into a more horizontally-spread table.
  • Duplicate copies of SingleAssemblyResourceManager in CmdLine, ConsoleUI, and GUI are removed and replaced by re-using the one in Core.
  • On Mono, LeftRightRowPanel now forces each half to be 50% to work around some weird quirks of Mono's layout logic.
  • The Plugins dialog now centers on the main window instead of the overall screen.
  • ErrorDialog now invokes the GUI thread using a reference to the main form instead of itself, which fixes a crash I noticed during development.
  • Now virtual relationships' tooltips show the identifier

@HebaruSan HebaruSan added Bug Something is not working as intended Enhancement New features or functionality GUI Issues affecting the interactive GUI Core (ckan.dll) Issues affecting the core part of CKAN Windows Issues specific for Windows Linux Issues specific for Linux Mono Issues specific for Mono Relationships Issues affecting depends, recommends, etc. labels Feb 20, 2025
@HebaruSan
Copy link
Member Author

HebaruSan commented Feb 20, 2025

Easy test build link here:

@linuxgurugamer, could you please try that build and check whether it helps at all with #4308?

@spirritus, could you please try that build and check whether it helps at all with #4271?

@pablogila, could you please try that build and check whether it helps at all with #878?

@pablogila
Copy link

But this is the windows build, the #878 had problems in the linux one...

@HebaruSan
Copy link
Member Author

@pablogila, there is no "Linux build", it's the same exe file on all platforms. Just run it with Mono.

@pablogila
Copy link

Well I'm afraid I don't know what Mono is. I just followed the CKAN install instructions for Linux

@HebaruSan
Copy link
Member Author

mono ckan.exe

@HebaruSan HebaruSan force-pushed the fix/gui-scaling branch 4 times, most recently from 25b0385 to b60fe08 Compare February 24, 2025 00:19
@pablogila
Copy link

@HebaruSan I confirm that the problem persists, the GUI is also tiny using the Mono version that you provided before.

@HebaruSan
Copy link
Member Author

Darn, oh well. Thanks for taking a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality GUI Issues affecting the interactive GUI Linux Issues specific for Linux Mono Issues specific for Mono Relationships Issues affecting depends, recommends, etc. Windows Issues specific for Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Clicking quickly on Play button doesn't play game [Bug]: UI Scaling on Linux (KDE) partially broken
2 participants