Merge lp:~gerboland/unity-2d/dash_checkboxes into lp:unity-2d/3.0

Proposed by Gerry Boland
Status: Merged
Approved by: Florian Boucault
Approved revision: 668
Merged at revision: 667
Proposed branch: lp:~gerboland/unity-2d/dash_checkboxes
Merge into: lp:unity-2d/3.0
Diff against target: 121 lines (+35/-36)
3 files modified
places/SearchRefineOptionType.qml (+4/-4)
places/TickBox.qml (+29/-30)
places/dash.qml (+2/-2)
To merge this branch: bzr merge lp:~gerboland/unity-2d/dash_checkboxes
Reviewer Review Type Date Requested Status
Florian Boucault (community) Needs Fixing
Review via email: mp+70903@code.launchpad.net

Description of the change

[dash] Tickboxes replaced with Checkboxes, as per latest design spec.

Checkboxes are wider than old tickboxes, so some widths in the dash changed.

Proper operation depends on
lp:~gerboland/unity-2d/button_distinguish_mouseOver_selected_states

To post a comment you must log in.
Revision history for this message
Florian Boucault (fboucault) wrote :

TickBox: color of the border and of the interior of the rectangle should be the same: full white with 0.8 opacity

Margin on the right looks much smaller on the mockups (measured around 15 pixels between the border of the rightmost tickbox and the inner border of the dash).

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

TickBox: color of the border when unselected is full white with 0.5 opacity

Revision history for this message
Bob The Builder (bobthebuilder-deactivatedaccount) wrote :

Attempt to merge into lp:unity-2d failed due to conflicts:

text conflict in places/TickBox.qml

668. By Gerry Boland

Merged lp:unity-2d

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'places/SearchRefineOptionType.qml'
2--- places/SearchRefineOptionType.qml 2011-08-09 16:18:45 +0000
3+++ places/SearchRefineOptionType.qml 2011-08-09 17:46:09 +0000
4@@ -51,8 +51,8 @@
5 property int columns: 2
6 property int rowsPerColumn: Math.ceil(count/columns)
7
8- cellHeight: 35
9- cellWidth: width/columns
10+ cellHeight: 42 //30px for button + 12px for vertical padding
11+ cellWidth: width/columns //145px for button + 10px for horizonal padding
12
13 anchors.top: header.bottom
14 anchors.topMargin: 15
15@@ -69,8 +69,8 @@
16 KeyNavigation.up: header
17
18 delegate: TickBox {
19- height: filters.cellHeight
20- width: filters.cellWidth-5
21+ height: filters.cellHeight-13 //29 = filters.cellHeight - vertical padding (10) - fix (3)
22+ width: filters.cellWidth-13 //144 = filters.cellWidth - horizontal padding (12) - fix (1)
23 /* Not checking for placeEntryModel != undefined leads to a segfault
24 when switching places */
25 text: placeEntryModel != undefined ? column_0 : ""
26
27=== modified file 'places/TickBox.qml'
28--- places/TickBox.qml 2011-08-09 16:18:45 +0000
29+++ places/TickBox.qml 2011-08-09 17:46:09 +0000
30@@ -17,6 +17,7 @@
31 */
32
33 import QtQuick 1.0
34+import Effects 1.0
35
36 AbstractButton {
37 id: tickBox
38@@ -28,39 +29,37 @@
39 width: childrenRect.width
40 height: childrenRect.height
41
42+ effect: DropShadow {
43+ blurRadius: 8
44+ color: "white"
45+ offset.x: 0
46+ offset.y: 0
47+ enabled: ( tickBox.state == "selected" )
48+ }
49+
50+ Rectangle {
51+ id: container
52+ width: parent.width //should be 144
53+ height: parent.height //should be 29
54+ border.color: "white"
55+ border.width: 1
56+ color: ( checked ) ? "white" : "#00000000"
57+ opacity: if (checked) return 0.8
58+ else if (parent.state == "selected") return 1
59+ else return 0.5
60+ radius: 5
61+ }
62+
63 TextCustom {
64 id: label
65-
66- anchors.left: box.right
67- anchors.leftMargin: 8
68- anchors.right: tickBox.right
69- anchors.top: parent.top
70- font.pixelSize: 16
71+ anchors.fill: container
72+ width: parent.width
73+ horizontalAlignment: Text.AlignHCenter
74+ verticalAlignment: Text.AlignVCenter
75+ font.pixelSize: 15
76+ color: ( checked ) ? "black" : "white"
77 text: tickBox.text
78 elide: Text.ElideRight
79- }
80-
81- Image {
82- id: box
83-
84- opacity: !canUncheck && checked ? 0 : 1
85- anchors.top: parent.top
86- anchors.left: parent.left
87- source: "artwork/tick_box.png"
88- width: sourceSize.width
89- height: sourceSize.height
90- }
91-
92- Image {
93- id: tick
94-
95- anchors.top: box.top
96- anchors.topMargin: 2
97- anchors.left: box.left
98- anchors.leftMargin: 3
99- opacity: checked ? 1.0 : ( parent.state == "selected" || parent.state == "hovered" ) ? 0.4 : 0.0
100- source: "artwork/tick.png"
101- width: sourceSize.width
102- height: sourceSize.height
103+ opacity: ( !canUncheck ) ? 0 : 1
104 }
105 }
106
107=== modified file 'places/dash.qml'
108--- places/dash.qml 2011-08-09 14:57:33 +0000
109+++ places/dash.qml 2011-08-09 17:46:09 +0000
110@@ -208,9 +208,9 @@
111 anchors.topMargin: search_entry.anchors.topMargin
112 height: parent.height
113 headerHeight: search_entry.height
114- width: 295
115+ width: 310
116 anchors.right: parent.right
117- anchors.rightMargin: 19
118+ anchors.rightMargin: 3
119 }
120
121 Loader {

Subscribers

People subscribed via source and target branches