KDevelop 5 : Fix HiDPI issue with project tree view
ClosedPublic

Authored by amccann on Oct 22 2015, 11:19 AM.

Details

Summary

Made ::paint(...) member function work more like QT5.5's QItemDelegate::paint(...)

Specifically, draws QIcon instead of Pixmap when appropriate.

Refs T664

Test Plan

Project view's decorations should be in same place in HiDPI mode.

Tested on OSX:

Before
After
After with project colouring

Diff Detail

Repository
R33 KDevPlatform
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
amccann updated this revision to Diff 1027.Oct 22 2015, 11:19 AM
amccann retitled this revision from to Fix HiDPI issue with project tree view.
amccann updated this object.
amccann edited the test plan for this revision. (Show Details)
amccann added a reviewer: kfunk.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptOct 22 2015, 11:19 AM
amccann edited the test plan for this revision. (Show Details)Oct 22 2015, 11:23 AM
amccann edited the test plan for this revision. (Show Details)
amccann edited the test plan for this revision. (Show Details)Oct 22 2015, 11:29 AM
amccann retitled this revision from Fix HiDPI issue with project tree view to KDevelop 5 : Fix HiDPI issue with project tree view.Oct 22 2015, 11:31 AM
mwolff added a subscriber: mwolff.Oct 22 2015, 12:00 PM

this smells like a bug in Qt to me, what Qt version are you using? In general, certainly unexpected and should also be fixed upstream.

I have little knowledge of this code, but imo we can merge it for now. But do please add a comment around your new code, and/or extract it into a separate function, to make it clear that this is a workaround.

plugins/projectmanagerview/projectmodelitemdelegate.cpp
34

please follow our style and join this line with the next

37

same here:

} else {
    return QIcon::Normal;
}
43

join into a single line please

65

join

69

join

105

join

amccann updated this revision to Diff 1039.Oct 23 2015, 4:15 AM
  • Fix HiDPI issue with project tree view
  • Address style issues, Comment fix better

@mwolff
This was originally developed against Qt5.5.0, however now has been tested against Qt5.5.1

I hope this patch is correct style wise.

Other details:

OSX 10.11.1 "El Capitan"

clang --version
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
mwolff accepted this revision.Oct 23 2015, 8:23 AM
mwolff added a reviewer: mwolff.

lgtm, do you have commit rights? if so, go ahead, otherwise one of us will push this change for you.

thanks!

This revision is now accepted and ready to land.Oct 23 2015, 8:23 AM

@mwolff
I don't have commit privs.

andric added a subscriber: andric.Oct 24 2015, 2:40 PM
amccann updated this revision to Diff 1101.Oct 29 2015, 7:40 PM
amccann edited edge metadata.
  • Fix HiDPI issue with project tree view
  • Address style issues, Comment fix better
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.

Oops, I think at my place of work, we have arcanist configured to squash commits.

I'll be sure do squash next time.