Simplify code in the paintEvent
ClosedPublic

Authored by tcanabrava on Sep 20 2018, 2:52 PM.

Details

Summary

Simplifies the code in the paintEvent related to the
placement of the colored arcs.

Test Plan

Run blinken, verified that the arcs are in the correct place

Diff Detail

Repository
R324 Blinken
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tcanabrava created this revision.Sep 20 2018, 2:52 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptSep 20 2018, 2:52 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
tcanabrava requested review of this revision.Sep 20 2018, 2:52 PM
aacid added a comment.Sep 20 2018, 5:10 PM

I'm not really sold out that this is simpler, the array introduces a bit of a disconnect between the coordinates and the button color.

Would you do the same but leaving the coords in the drawPixmap line?

src/blinken.cpp
118

The spacing of all the new lines is wonky, use tabs

tcanabrava updated this revision to Diff 42040.Sep 21 2018, 9:17 AM
  • Remove array, calcule the quadrants directly
  • QStringLiteral
  • Tabs vs Spaces
aacid accepted this revision.Sep 21 2018, 10:12 PM

Cool looks defenitely easier to understand, please remove the unneded include and commit :)

src/blinken.cpp
12

I guess we don't need this now.

This revision is now accepted and ready to land.Sep 21 2018, 10:12 PM
This revision was automatically updated to reflect the committed changes.