Added option to change grid thickness
Needs ReviewPublic

Authored by piotrkakol on Jun 3 2020, 11:57 PM.

Details

Reviewers
ngraham
Summary

Before these changes grid took a lot of space, especially for smaller taskbars. Even with grid disabled there were big spaces between squares that was not used. Now users can decrease grid thickness which will increase squares size making the clock bigger and easier to read.

Diff Detail

Repository
R114 Plasma Addons
Branch
grid-thickness-option (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 27105
Build 27123: arc lint + arc unit
piotrkakol created this revision.Jun 3 2020, 11:57 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 3 2020, 11:57 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
piotrkakol requested review of this revision.Jun 3 2020, 11:57 PM
piotrkakol edited the summary of this revision. (Show Details)Jun 4 2020, 12:00 AM
piotrkakol added a comment.EditedJun 4 2020, 12:03 AM

This is probably the last diff from my initial Binary Clock rework from D13937.
If you have any ideas what else can be improved after these changes, please let me know.

Would it make sense to have it scale smoothly according to panel size by default?

@ngraham It does scale smooth-ish-ly according to taskbar size. You can see that square size (dotSize in BinaryClock.qml) is calculated based on taskbar size (height for horizontal taskbar and width for vertical taskbar). When you change taskbar size, binary clock changes size as well.

mart added a subscriber: mart.Jun 8 2020, 8:39 AM

please use gitlab on invent.kde.org for new review requests

mart added a comment.Jun 8 2020, 8:44 AM

couldn't also gridThickness automatically scale itself without having to expose it to the user?

In D29845#674882, @mart wrote:

please use gitlab on invent.kde.org for new review requests

I logged in on that page and I don't know what to do. Why don't I just add reviewers from my previous Binary Clock widget diffs?

In D29845#674884, @mart wrote:

couldn't also gridThickness automatically scale itself without having to expose it to the user?

It could be done in another diff as it's another functionality. However, I would need to think of a formula that would do it. Because when you have fixed taskbar height and border thickness you can calculate square size (which is how it works after this diff), when you have fixed height and square size you can calculate border thickness (which is inferior idea imo). But given taskbar height, to calculate both square size and border thickness you would need to know the ratio between them or ratio on of them to the taskbar size. And I don't know how to choose the best ratio that is not arbitrary.