Use brush for painting line edits
Needs ReviewPublic

Authored by mwoehlke on Mar 12 2019, 5:13 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Modify Style::drawFrameLineEditPrimitive to use the brush rather than the color to fill the background of line edits. This is more correct in some corner cases where the brush is not a solid color.

Diff Detail

Repository
R113 Oxygen Theme
Lint
Lint Skipped
Unit
Unit Tests Skipped
mwoehlke created this revision.Mar 12 2019, 5:13 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 12 2019, 5:13 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mwoehlke requested review of this revision.Mar 12 2019, 5:13 PM

Note: this is "inspired" by qtColorButton, which uses a textured brush for colors with non-opaque alpha. This renders correctly with built-in styles, but not with current Oxygen. (I have a sneaking suspicion that it used to work, however, as I'm pretty sure I've been using oxygen since well before I wrote qtColorButton.)

mwoehlke updated this revision to Diff 53743.Mar 12 2019, 5:20 PM

Also use brush in fallback path

cfeck added a subscriber: cfeck.Mar 12 2019, 5:40 PM
cfeck added inline comments.
kstyle/oxygenstyle.cpp
3273

Why the reference?

mwoehlke added inline comments.Mar 12 2019, 5:49 PM
kstyle/oxygenstyle.cpp
3273

Force of habit... supposedly it forces copy elision (although new C++ is trying to make that happen regardless). Same pattern is used for rect and palette a couple lines above here.

Note: https://herbsutter.com/2008/01/01/gotw-88-a-candidate-for-the-most-important-const/