Add a spacer item
AbandonedPublic

Authored by ngraham on Oct 19 2018, 11:15 PM.

Details

Reviewers
mart
Group Reviewers
Kirigami
Summary

This patch creates a very simple spacer item that can be used to add a pre-determined amount of whitespace (Units.gridUnit, or 18px) between items without having to re-invent the wheel or abuse another control.

BUG: 399959
FIXED-IN: 5.52

Test Plan

Layout with Kirigami.Spacer items between sections:

Diff Detail

Repository
R169 Kirigami
Branch
verticalspacer (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4070
Build 4088: arc lint + arc unit
ngraham created this revision.Oct 19 2018, 11:15 PM
Restricted Application added a project: Kirigami. Β· View Herald TranscriptOct 19 2018, 11:15 PM
Restricted Application added a subscriber: plasma-devel. Β· View Herald Transcript
ngraham requested review of this revision.Oct 19 2018, 11:15 PM
ngraham edited the test plan for this revision. (Show Details)Oct 19 2018, 11:15 PM
  1. What if in the future another, horizontal spacer component will become needed? Will you add a HorizontalSpacer.qml then? πŸ˜† Maybe have just a Spacer with horizontal property?
  2. Why Rectangle, it could be just Item, it does not cause rendering (Rectangle does)

Probably it is possible use just Item itself, without special control.
P.S. ^^ Just some thoughts, ignore me if I don't make sense.

ngraham updated this revision to Diff 43958.Oct 20 2018, 2:49 AM
  • Make it an Item, not a Rectangle
  • Make it do horizontal spacing too
ngraham retitled this revision from Add a vertical spacer item to Add a spacer item.Oct 20 2018, 2:50 AM
ngraham edited the summary of this revision. (Show Details)
ngraham edited the test plan for this revision. (Show Details)Oct 20 2018, 3:35 AM