Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • K KXMLGUI
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FrameworksFrameworks
  • KXMLGUI
  • Merge requests
  • !104

KShortcutsEditorDelegate: Fix HiDPI rendering of indicator arrows

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged snooxx 💤 requested to merge snooxx/kxmlgui:snx/fix-shortcutsdialog-hidpi into master Mar 19, 2022
  • Overview 5
  • Commits 2
  • Pipelines 3
  • Changes 7

Even with HiDPI rendering enabled in applications, the standard "Configure Keyboard Shortcuts" dialog would still show pixelated indicator arrows in the "Shortcut" and "Alternate" columns.

This is because the respective pixmap is only scaled up, but not rendered appropriately sized from the beginning.

Setting the pixmap's devicePixelRatio and increasing its size fixes the issue. option.rect is in device independent pixels, and therefore should be kept as is.

Note: In order for the arrows to still get drawn in the right place, additional fixes in KExtendableItemDelegate (i.e. the base class) are necessary, see kitemviews!10 (merged).

BUG: 414904

Test Plan:

  • Launch QT_SCALE_FACTOR=1.7 ./bin/kxmlguiwindowtest.
  • Open "Configure Keyboard Shortcuts" dialog.
  • Arrows in "Shortcut" column should not be pixelated anymore, for both their expanded and collapsed states.
  • Test with -style Fusion and other scaling factors, too.
Edited Mar 22, 2022 by snooxx 💤
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: snx/fix-shortcutsdialog-hidpi