Changeset View
Changeset View
Standalone View
Standalone View
kcm/package/contents/ui/Screen.qml
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 22 | Controls.ScrollView { | |||
---|---|---|---|---|---|
44 | 44 | | |||
45 | property int xOffset: (width - totalSize.width / relativeFactor) / 2; | 45 | property int xOffset: (width - totalSize.width / relativeFactor) / 2; | ||
46 | property int yOffset: (height - totalSize.height / relativeFactor) / 2; | 46 | property int yOffset: (height - totalSize.height / relativeFactor) / 2; | ||
47 | 47 | | |||
48 | implicitHeight: Math.max(root.height * 0.4, units.gridUnit * 13) | 48 | implicitHeight: Math.max(root.height * 0.4, units.gridUnit * 13) | ||
49 | 49 | | |||
50 | Component.onCompleted: background.visible = true; | 50 | Component.onCompleted: background.visible = true; | ||
51 | 51 | | |||
52 | Kirigami.Heading { | ||||
53 | z: 90 | ||||
54 | anchors { | ||||
55 | top: parent.top | ||||
56 | left: parent.left | ||||
davidedmundson: It's better to set the left + right anchors and then setting the text alignment to be… | |||||
57 | right: parent.right | ||||
58 | margins: units.smallSpacing | ||||
59 | } | ||||
broulik: `i18n` | |||||
60 | level: 4 | ||||
61 | opacity: 0.6 | ||||
62 | horizontalAlignment: Text.AlignHCenter | ||||
63 | text: i18n("Drag screens to re-arrange them") | ||||
64 | visible: kcm.outputModel && kcm.outputModel.rowCount() > 1 | ||||
65 | } | ||||
66 | | ||||
52 | Row { | 67 | Row { | ||
53 | z: 90 | 68 | z: 90 | ||
54 | anchors { | 69 | anchors { | ||
55 | bottom: parent.bottom | 70 | bottom: parent.bottom | ||
56 | horizontalCenter: parent.horizontalCenter | 71 | horizontalCenter: parent.horizontalCenter | ||
57 | margins: units.smallSpacing | 72 | margins: units.smallSpacing | ||
58 | } | 73 | } | ||
59 | spacing: units.smallSpacing | 74 | spacing: units.smallSpacing | ||
Show All 24 Lines |
It's better to set the left + right anchors and then setting the text alignment to be horizontally centered.
That way we will wrap or elide if the translated string is too long rather than overflow.