Merge lp:~vanvugt/ubuntu-system-settings/fix-1569227 into lp:ubuntu-system-settings

Proposed by Daniel van Vugt
Status: Merged
Approved by: Jonas G. Drange
Approved revision: 1742
Merged at revision: 1743
Proposed branch: lp:~vanvugt/ubuntu-system-settings/fix-1569227
Merge into: lp:ubuntu-system-settings
Diff against target: 154 lines (+21/-50)
3 files modified
plugins/mouse/Connected.qml (+18/-25)
plugins/mouse/ItemTitle.qml (+1/-1)
plugins/mouse/SectionHeader.qml (+2/-24)
To merge this branch: bzr merge lp:~vanvugt/ubuntu-system-settings/fix-1569227
Reviewer Review Type Date Requested Status
Jonas G. Drange (community) Approve
Review via email: mp+310981@code.launchpad.net

Commit message

Fix unlabelled sliders in Mouse & Touchpad (LP: #1569227)

The problem was that the labels existed but had been clipped to zero
height in ItemTitle.qml, so never appeared. However once you make them
appear they conflict visually with the things around them (also fixed
here).

Also:
  * improved the title texts
  * increased the visibility of the main Mouse and Touchpad titles
  * removed the clumsy misplaced "Slow" and "Fast" labels
  * added comments describing what needs fixing next (in SliderMenu
    which is a different project) to replace the old Slow and Fast labels

System Settings needs A LOT of visual fixes so I had to restrain myself
and tried to keep this change mostly about just fixing LP: #1569227.

To post a comment you must log in.
1742. By Daniel van Vugt

Shrink the diff

Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

LGTM, thank you.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/mouse/Connected.qml'
--- plugins/mouse/Connected.qml 2016-08-04 09:56:29 +0000
+++ plugins/mouse/Connected.qml 2016-11-16 10:14:27 +0000
@@ -55,12 +55,11 @@
55 }55 }
56 spacing: 056 spacing: 0
57 height: childrenRect.height57 height: childrenRect.height
58 ItemTitle {
59 text: i18n.tr("Move:")
60 showDivider: false
61 }
6258
63 Menus.SliderMenu {59 Menus.SliderMenu {
60 /* FIXME: No appropriate icons exist yet, also SliderMenu lacks
61 support for text labels on the ends. */
62 text: i18n.tr("Cursor speed:")
64 anchors { 63 anchors {
65 left: parent.left64 left: parent.left
66 right: parent.right65 right: parent.right
@@ -94,12 +93,10 @@
94 spacing: 093 spacing: 0
95 height: childrenRect.height94 height: childrenRect.height
9695
97 ItemTitle {
98 text: i18n.tr("Scroll:")
99 showDivider: false
100 }
101
102 Menus.SliderMenu {96 Menus.SliderMenu {
97 /* FIXME: No appropriate icons exist yet, also SliderMenu lacks
98 support for text labels on the ends. */
99 text: i18n.tr("Wheel scrolling speed:")
103 anchors { 100 anchors {
104 left: parent.left101 left: parent.left
105 right: parent.right102 right: parent.right
@@ -132,12 +129,11 @@
132 spacing: 0129 spacing: 0
133 height: childrenRect.height130 height: childrenRect.height
134 visible: showAllUI131 visible: showAllUI
135 ItemTitle {
136 text: i18n.tr("Double-click:")
137 showDivider: false
138 }
139132
140 Menus.SliderMenu {133 Menus.SliderMenu {
134 /* FIXME: No appropriate icons exist yet, also SliderMenu lacks
135 support for text labels on the ends. */
136 text: i18n.tr("Double-click speed:")
141 anchors { 137 anchors {
142 left: parent.left138 left: parent.left
143 right: parent.right139 right: parent.right
@@ -228,12 +224,11 @@
228 }224 }
229 spacing: 0225 spacing: 0
230 height: childrenRect.height226 height: childrenRect.height
231 ItemTitle {
232 text: i18n.tr("Move:")
233 showDivider: false
234 }
235227
236 Menus.SliderMenu {228 Menus.SliderMenu {
229 /* FIXME: No appropriate icons exist yet, also SliderMenu lacks
230 support for text labels on the ends. */
231 text: i18n.tr("Cursor speed:")
237 anchors { 232 anchors {
238 left: parent.left233 left: parent.left
239 right: parent.right234 right: parent.right
@@ -266,12 +261,11 @@
266 }261 }
267 spacing: 0262 spacing: 0
268 height: childrenRect.height263 height: childrenRect.height
269 ItemTitle {
270 text: i18n.tr("Scroll:")
271 showDivider: false
272 }
273264
274 Menus.SliderMenu {265 Menus.SliderMenu {
266 /* FIXME: No appropriate icons exist yet, also SliderMenu lacks
267 support for text labels on the ends. */
268 text: i18n.tr("Finger scrolling speed:")
275 anchors { 269 anchors {
276 left: parent.left270 left: parent.left
277 right: parent.right271 right: parent.right
@@ -305,12 +299,11 @@
305 spacing: 0299 spacing: 0
306 height: childrenRect.height300 height: childrenRect.height
307 visible: showAllUI301 visible: showAllUI
308 ItemTitle {
309 text: i18n.tr("Double-click:")
310 showDivider: false
311 }
312302
313 Menus.SliderMenu {303 Menus.SliderMenu {
304 /* FIXME: No appropriate icons exist yet, also SliderMenu lacks
305 support for text labels on the ends. */
306 text: i18n.tr("Double-click speed:")
314 anchors { 307 anchors {
315 left: parent.left308 left: parent.left
316 right: parent.right309 right: parent.right
317310
=== modified file 'plugins/mouse/ItemTitle.qml'
--- plugins/mouse/ItemTitle.qml 2015-12-04 19:17:51 +0000
+++ plugins/mouse/ItemTitle.qml 2016-11-16 10:14:27 +0000
@@ -23,7 +23,7 @@
23ListItem.Standard {23ListItem.Standard {
24 id: itemEmpty24 id: itemEmpty
25 property string text25 property string text
26 height: label.height - units.gu(2)26 height: label.height
27 Label {27 Label {
28 id: label28 id: label
29 anchors {29 anchors {
3030
=== modified file 'plugins/mouse/SectionHeader.qml'
--- plugins/mouse/SectionHeader.qml 2016-03-16 17:03:35 +0000
+++ plugins/mouse/SectionHeader.qml 2016-11-16 10:14:27 +0000
@@ -43,7 +43,8 @@
43 top: parent.top43 top: parent.top
44 }44 }
45 text: root.text45 text: root.text
46 fontSize: "medium"46 /* We are "large" to avoid looking like normal "medium" text */
47 fontSize: "large"
47 elide: Text.ElideRight48 elide: Text.ElideRight
48 color: Theme.palette.normal.baseText49 color: Theme.palette.normal.baseText
49 font.weight: Text.Normal50 font.weight: Text.Normal
@@ -51,27 +52,4 @@
51 highlightWhenPressed: false52 highlightWhenPressed: false
52 showDivider: false53 showDivider: false
53 }54 }
54 Item {
55 anchors {
56 left: parent.left
57 right: parent.right
58 }
59 height: childrenRect.height + units.gu(1)
60 Label {
61 anchors {
62 left: parent.left
63 top: parent.top
64 }
65 text: i18n.tr("Slow")
66 fontSize: "small"
67 }
68 Label {
69 anchors {
70 right: parent.right
71 top: parent.top
72 }
73 text: i18n.tr("Fast")
74 fontSize: "small"
75 }
76 }
77}55}

Subscribers

People subscribed via source and target branches