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

Proposed by Tim Peeters
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1909
Merged at revision: 1904
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/dialog-theme
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 144 lines (+93/-0)
4 files modified
components.api (+6/-0)
documentation/ubuntu-theming.qdoc (+1/-0)
src/Ubuntu/Components/Popups/1.3/Dialog.qml (+62/-0)
src/Ubuntu/Components/Popups/1.3/Popover.qml (+24/-0)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/dialog-theme
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+289405@code.launchpad.net

Commit message

Add theme, style and styleName properties to Dialog and Popover.

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
1907. By Tim Peeters

update components.api

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
1908. By Tim Peeters

sync staging

1909. By Tim Peeters

update components.api

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 :

Thanks for the change!

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)
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-15 13:17:53 +0000
3+++ components.api 2016-03-17 22:32:59 +0000
4@@ -425,7 +425,10 @@
5 default property list<QtObject> contents
6 property double edgeMargins
7 property bool modal
8+ property Component style
9+ property string styleName
10 property string text
11+ property ThemeSettings theme
12 property string title
13 Ubuntu.Components.ListItems.Divider 1.0 0.1: QQuickImageBase
14 Ubuntu.Components.ListItems.Divider 1.3: QQuickImageBase
15@@ -987,6 +990,9 @@
16 function var show()
17 function var hide()
18 property Item pointerTarget
19+ property Component style
20+ property string styleName
21+ property ThemeSettings theme
22 Ubuntu.Components.Popups.PopupBase 1.0 0.1: OrientationHelper
23 property Item dismissArea
24 property PropertyAnimation fadingAnimation
25
26=== modified file 'documentation/ubuntu-theming.qdoc'
27--- documentation/ubuntu-theming.qdoc 2015-12-14 08:59:36 +0000
28+++ documentation/ubuntu-theming.qdoc 2016-03-17 22:32:59 +0000
29@@ -337,6 +337,7 @@
30 * \qml
31 * import QtQuick 2.4
32 * import Ubuntu.Components 1.3
33+ * import Ubuntu.Components.Popups 1.3
34 * MainView {
35 * width: units.gu(40)
36 * height: units.gu(71)
37
38=== modified file 'src/Ubuntu/Components/Popups/1.3/Dialog.qml'
39--- src/Ubuntu/Components/Popups/1.3/Dialog.qml 2016-02-03 01:27:02 +0000
40+++ src/Ubuntu/Components/Popups/1.3/Dialog.qml 2016-03-17 22:32:59 +0000
41@@ -137,6 +137,68 @@
42 */
43 property alias contentHeight: foreground.height
44
45+ /*!
46+ \qmlproperty ThemeSettings theme
47+ \since Ubuntu.Components 1.3
48+ Configure the theme of the Dialog foreground and all its subcomponents.
49+ Example:
50+ \qml
51+ import QtQuick 2.4
52+ import Ubuntu.Components 1.3
53+ import Ubuntu.Components.Popups 1.3
54+ MainView {
55+ width: units.gu(40)
56+ height: units.gu(71)
57+
58+ // make sure the main theme is Ambiance
59+ theme.name: "Ubuntu.Components.Themes.Ambiance"
60+
61+ Component {
62+ id: dialogComponent
63+ Dialog {
64+ id: dialog
65+ title: "Input dialog"
66+ // the dialog and its children will use SuruDark
67+ theme: ThemeSettings {
68+ name: "Ubuntu.Components.Themes.SuruDark"
69+ }
70+ TextField {
71+ placeholderText: "enter text"
72+ }
73+ Button {
74+ text: "Close"
75+ onClicked: PopupUtils.close(dialog)
76+ }
77+ }
78+ }
79+
80+ Button {
81+ text: "Open dialog"
82+ onClicked: PopupUtils.open(dialogComponent)
83+ }
84+ }
85+ \endqml
86+ \sa StyledItem::theme
87+ */
88+ property alias theme: foreground.theme
89+
90+ /*!
91+ \qmlproperty string styleName
92+ The style name of the foreground of the Dialog.
93+ \since Ubuntu.Components 1.3
94+ \sa StyledItem::styleName
95+ */
96+ property alias styleName: foreground.styleName
97+
98+ /*!
99+ \qmlproperty Component style
100+ The style of the foreground of the Dialog.
101+ This property takes precedence over \l styleName
102+ \since Ubuntu.Components 1.3
103+ \sa StyledItem::style
104+ */
105+ property alias style: foreground.style
106+
107 __foreground: foreground
108 __eventGrabber.enabled: modal
109 __dimBackground: modal
110
111=== modified file 'src/Ubuntu/Components/Popups/1.3/Popover.qml'
112--- src/Ubuntu/Components/Popups/1.3/Popover.qml 2015-12-22 14:42:59 +0000
113+++ src/Ubuntu/Components/Popups/1.3/Popover.qml 2016-03-17 22:32:59 +0000
114@@ -205,6 +205,30 @@
115
116 y: parent ? (parent.height - height) / 2 : 0
117
118+ /*!
119+ \qmlproperty ThemeSettings theme
120+ \since Ubuntu.Components 1.3
121+ Configure the theme of the Popover foreground and all its subcomponents.
122+ \sa StyledItem::theme, Dialog::theme
123+ */
124+ property alias theme: foreground.theme
125+
126+ /*!
127+ \qmlproperty string styleName
128+ The style name of the foreground of the Popover.
129+ \since Ubuntu.Components 1.3
130+ \sa StyledItem::styleName
131+ */
132+ property alias styleName: foreground.styleName
133+
134+ /*!
135+ \qmlproperty Component style
136+ The style of the foreground of the Popover.
137+ This property takes precedence over \l styleName
138+ \since Ubuntu.Components 1.3
139+ \sa StyledItem::style
140+ */
141+ property alias style: foreground.style
142 StyledItem {
143 id: foreground
144 objectName: "popover_foreground"

Subscribers

People subscribed via source and target branches