Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • K KItemViews
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 0
    • Merge requests 0
  • 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
  • KItemViews
  • Merge requests
  • !10

KExtendableItemDelegate: Fix HiDPI positioning of indicator arrows

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged snooxx 💤 requested to merge snooxx/kitemviews:snx/fix-itemdelegate-hidpi into master Mar 19, 2022
  • Overview 33
  • Commits 1
  • Pipelines 3
  • Changes 1

After fixing pixelated indicator arrows in KShortcutsEditorDelegate (i.e. a subclass, see kxmlgui!104 (merged) for the fix) used in the "Configure Keyboard Shortcuts" dialog, they were they were not drawn centered anymore, e.g. slightly moved upwards. The same problem can be observed in the download list of KGet.

This is because the increased size of the pixmap is not accounted for.

By transforming the pixmap size to device independent dimensions again, as used in the positioning calculations, the arrows will finally be shown correctly.

Note that running KItemViews in conjunction with a version of KXmlGUI not including the fix will still work fine, since the devicePixelRatio will only ever be set to 1 in that case.

CCBUG: 414904

Test Plan:

  • Launch QT_SCALE_FACTOR=1.7 ./bin/kxmlguiwindowtest (from KXmlGui, including the fix mentioned above).
  • Open "Configure Keyboard Shortcuts" dialog.
  • Arrows in "Shortcut" column positioned correctly, for both their expanded and collapsed states.
  • Test with -style Fusion and other scaling factors, too.
  • QT_SCALE_FACTOR=1.7 kget, start download, observe indicator arrow in download list.
Edited Mar 22, 2022 by snooxx 💤
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: snx/fix-itemdelegate-hidpi