Merge lp:~stolowski/unity-scopes-api/fix-expandable-widget-doc into lp:unity-scopes-api/devel

Proposed by Paweł Stołowski on 2016-06-14
Status: Merged
Approved by: Albert Astals Cid on 2016-06-15
Approved revision: 678
Merged at revision: 678
Proposed branch: lp:~stolowski/unity-scopes-api/fix-expandable-widget-doc
Merge into: lp:unity-scopes-api/devel
Diff against target: 36 lines (+9/-2)
1 file modified
src/scopes/PreviewWidget.cpp (+9/-2)
To merge this branch: bzr merge lp:~stolowski/unity-scopes-api/fix-expandable-widget-doc
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2016-06-15
Albert Astals Cid (community) 2016-06-14 Approve on 2016-06-15
unity-api-1-bot continuous-integration Needs Fixing on 2016-06-14
Unity Team 2016-06-14 Pending
Review via email: mp+297357@code.launchpad.net

Commit Message

Updated the docs for expandable preview widget.

Description of the Change

Updated the docs for expandable preview widget per Albert's suggestion to the bug report.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/scopes/PreviewWidget.cpp'
2--- src/scopes/PreviewWidget.cpp 2016-01-18 19:50:19 +0000
3+++ src/scopes/PreviewWidget.cpp 2016-06-14 15:57:13 +0000
4@@ -431,15 +431,18 @@
5 \subsection expandable expandable widget
6
7 The expandable widget is used to group several widgets into an expandable pane.
8+The expandable widget can be collapsed or uncollapsed. When it's uncollapsed then
9+all the contained widgets are shown. When collapsed, only the first few widgets determined
10+by collapsed-widgets attribute are shown.
11
12 List of attributes:
13 \arg \c title A string specifying the title
14-\arg \c collapsed-widgets Optional number of collapsed widgets (0 makes all of them visible)
15+\arg \c collapsed-widgets A number of widgets to show when the expandable widget is collapsed (optional).
16
17 \code
18 PreviewWidget expandable("exp", "expandable");
19 expandable.add_attribute_value("title", Variant("This is an expandable widget"));
20- expandable.add_attribute_value("collapsed-widgets", Variant(0));
21+ expandable.add_attribute_value("collapsed-widgets", Variant(2));
22
23 PreviewWidget w1("w1", "text");
24 w1.add_attribute_value("title", Variant("Subwidget 1"));
25@@ -447,8 +450,12 @@
26 PreviewWidget w2("w2", "text");
27 w2.add_attribute_value("title", Variant("Subwidget 2"));
28 w2.add_attribute_value("text", Variant("A text"));
29+ PreviewWidget w3("w3", "text");
30+ w3.add_attribute_value("title", Variant("Subwidget 3"));
31+ w3.add_attribute_value("text", Variant("A text"));
32 expandable.add_widget(w1);
33 expandable.add_widget(w2);
34+ expandable.add_widget(w3);
35 ...
36 \endcode
37

Subscribers

People subscribed via source and target branches

to all changes: