Merge lp:~tpeeters/ubuntu-ui-toolkit/disabledActions into lp:ubuntu-ui-toolkit/staging

Proposed by Tim Peeters
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1915
Merged at revision: 1919
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/disabledActions
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 109 lines (+21/-8)
5 files modified
components.api (+1/-0)
src/Ubuntu/Components/Styles/1.3/PageHeaderStyle.qml (+6/-1)
src/Ubuntu/Components/Themes/Ambiance/1.3/OverflowPanel.qml (+10/-5)
src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml (+3/-2)
tests/unit_x11/tst_components/tst_pageheader.qml (+1/-0)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/disabledActions
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+290488@code.launchpad.net

Commit message

Set correct colors for disabled actions in the header.

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Looks good, thanks!

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components.api'
2--- components.api 2016-03-17 22:32:44 +0000
3+++ components.api 2016-03-30 15:16:09 +0000
4@@ -832,6 +832,7 @@
5 property color backgroundColor
6 property double contentHeight
7 property Component defaultActionDelegate
8+ property color disabledForegroundColor
9 property color dividerColor
10 property color foregroundColor
11 property Component titleComponent
12
13=== modified file 'src/Ubuntu/Components/Styles/1.3/PageHeaderStyle.qml'
14--- src/Ubuntu/Components/Styles/1.3/PageHeaderStyle.qml 2015-11-27 14:59:03 +0000
15+++ src/Ubuntu/Components/Styles/1.3/PageHeaderStyle.qml 2016-03-30 15:16:09 +0000
16@@ -1,5 +1,5 @@
17 /*
18- * Copyright 2015 Canonical Ltd.
19+ * Copyright 2016 Canonical Ltd.
20 *
21 * This program is free software; you can redistribute it and/or modify
22 * it under the terms of the GNU Lesser General Public License as published by
23@@ -30,6 +30,11 @@
24 property color foregroundColor
25
26 /*!
27+ The color of disabled action buttons in the header.
28+ */
29+ property color disabledForegroundColor
30+
31+ /*!
32 The color of the background of the header.
33 */
34 property color backgroundColor
35
36=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/OverflowPanel.qml'
37--- src/Ubuntu/Components/Themes/Ambiance/1.3/OverflowPanel.qml 2016-01-27 16:42:47 +0000
38+++ src/Ubuntu/Components/Themes/Ambiance/1.3/OverflowPanel.qml 2016-03-30 15:16:09 +0000
39@@ -42,9 +42,12 @@
40 /*!
41 The foreground color (icon and text) of actions in the panel.
42 */
43- property color foregroundColor: styledItem.enabled
44- ? theme.palette.normal.backgroundText
45- : theme.palette.disabled.backgroundText
46+ property color foregroundColor: theme.palette.normal.backgroundText
47+
48+ /*!
49+ The foreground color (icon and text) of disabled actions in the panel.
50+ */
51+ property color disabledForegroundColor: theme.palette.disabled.backgroundText
52
53 property bool square: true
54 callerMargin: -units.gu(1) + units.dp(4)
55@@ -83,7 +86,8 @@
56 id: actionIcon
57 visible: "" != action.iconSource
58 source: action.iconSource
59- color: overflow.foregroundColor
60+ color: enabled ? overflow.foregroundColor
61+ : overflow.disabledForegroundColor
62 anchors {
63 verticalCenter: parent.verticalCenter
64 verticalCenterOffset: units.dp(-1)
65@@ -107,7 +111,8 @@
66 textSize: actionIcon.visible ? Label.Small : Label.Medium
67 elide: Text.ElideRight
68 text: action.text
69- color: overflow.foregroundColor
70+ color: enabled ? overflow.foregroundColor
71+ : overflow.disabledForegroundColor
72 }
73
74 // The value of showDivider is automatically set by ActionSelectionPopover.
75
76=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml'
77--- src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml 2016-02-29 16:02:50 +0000
78+++ src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml 2016-03-30 15:16:09 +0000
79@@ -22,6 +22,7 @@
80 id: pageHeaderStyle
81
82 foregroundColor: theme.palette.normal.backgroundText
83+ disabledForegroundColor: theme.palette.disabled.backgroundText
84 backgroundColor: theme.palette.normal.background
85 dividerColor: theme.palette.normal.base
86 property int fontWeight: Font.Light
87@@ -44,8 +45,8 @@
88 height: parent ? parent.height : undefined
89 action: modelData
90 StyleHints {
91- // FIXME: introduce inactiveForegroundColor to PageHeaderStyle
92- foregroundColor: pageHeaderStyle.foregroundColor
93+ foregroundColor: enabled ? pageHeaderStyle.foregroundColor
94+ : pageHeaderStyle.disabledForegroundColor
95 }
96 }
97
98
99=== modified file 'tests/unit_x11/tst_components/tst_pageheader.qml'
100--- tests/unit_x11/tst_components/tst_pageheader.qml 2015-12-21 13:44:54 +0000
101+++ tests/unit_x11/tst_components/tst_pageheader.qml 2016-03-30 15:16:09 +0000
102@@ -89,6 +89,7 @@
103 iconName: "attachment"
104 text: "Attach"
105 objectName: "five"
106+ enabled: false
107 },
108 Action {
109 iconName: "contact"

Subscribers

People subscribed via source and target branches