Fix 4K/HiDPI UI issues: raw HTML tags, blank zoom buttons, thread warnings - #200
Open
360900 wants to merge 5 commits into
Open
Fix 4K/HiDPI UI issues: raw HTML tags, blank zoom buttons, thread warnings#200360900 wants to merge 5 commits into
360900 wants to merge 5 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported on Arch Linux, KDE Wayland, 4K display at 225% scale.
Issues
<b>HTML tags in its description text.QObject::setParent: Cannot set parent, new parent is in a different threadwarning printed on startup.Root causes and fixes
Raw HTML tags: the description label relies on Qt's AutoText detection, which only checks for markup before the first line break. The
<b>tags appear later in the string, so the label falls back to plain text. Fixed by setting the label to RichText explicitly.Dialog too small: the default size was 550x380 while the content needs about 440px of vertical space. Bumped the size tiers (default 560x520 on large screens) so everything fits without scrolling.
Blank zoom buttons: the buttons are icon only, with no text fallback, and the icon downloads were silently failing. The download base URL pointed to
seapear/AffinityOnLinux, which has noAffinityScripts/iconsdirectory, so every file returned 404 and the failures were swallowed. Fixed the URL toryzendew/AffinityOnLinux(the same repo the README install command uses; every icon file verified to exist there) and added simple text fallbacks (minus / reset / plus symbols) so the buttons are never blank even if icons are unavailable. Icons are now also reapplied through a signal once the background download finishes, instead of a broken cross-thread timer.Thread warnings: several
QTimer.singleShot,QMessageBox,setWindowIcon, andcheck_installation_statuscalls were made directly from worker threads. Replaced them with queued signals (icons_updated_signal,refresh_status_signal,show_main_menu_signal,window_icon_signal, plus the existingshow_message_signal), following the pattern already used elsewhere in the file. This removes the warning and also fixes status/button updates that previously never arrived.Startup freeze uncovered by the thread fix: with
check_installation_statusnow correctly running on the GUI thread, it became visible that it blocks for about 18 seconds, because it shells out towine reg queryfour times (~4.5s each due to wineserver startup). Replaced those four queries with instant parsing of the prefix'ssystem.reg/user.regfiles (new_wine_reg_key_exists/_read_wine_reg_valuehelpers, verified to return identical results against a real prefix). The status check now takes about 0.1s.Also included: main window default height raised from 0.8x to 0.9x of the screen height so more of the right panel is visible on large displays, and the dark theme scrollbar handle brightened so the panel is easier to discover.
Testing
Verified on the affected setup (Arch Linux, KDE Wayland, 3840x2400 at 225% scale): the NVIDIA dialog fits without scrolling and renders the bold text correctly, the zoom buttons show icons (or the fallback glyphs when icons are missing), no thread warnings appear, and there is no startup freeze.