Merge lp:~3v1n0/ubuntu-settings-components/slots-layouts into lp:ubuntu-settings-components

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 250
Merged at revision: 167
Proposed branch: lp:~3v1n0/ubuntu-settings-components/slots-layouts
Merge into: lp:ubuntu-settings-components
Diff against target: 3594 lines (+1298/-1098)
45 files modified
debian/changelog (+7/-0)
examples/MessageComponents.qml (+24/-0)
examples/OtherComponents.qml (+63/-6)
examples/SettingsComponents.qml (+9/-4)
plugins/Ubuntu/Settings/Components/ActionTextField.qml (+10/-13)
plugins/Ubuntu/Settings/Components/MessageHeader.qml (+61/-72)
plugins/Ubuntu/Settings/Components/QuickReply.qml (+0/-165)
plugins/Ubuntu/Settings/Components/qmldir (+0/-1)
plugins/Ubuntu/Settings/Menus/AccessPointMenu.qml (+30/-66)
plugins/Ubuntu/Settings/Menus/BaseLayoutMenu.qml (+52/-0)
plugins/Ubuntu/Settings/Menus/BaseMenu.qml (+61/-58)
plugins/Ubuntu/Settings/Menus/ButtonMenu.qml (+5/-5)
plugins/Ubuntu/Settings/Menus/CalendarMenu.qml (+28/-34)
plugins/Ubuntu/Settings/Menus/CheckableMenu.qml (+15/-62)
plugins/Ubuntu/Settings/Menus/EventMenu.qml (+9/-45)
plugins/Ubuntu/Settings/Menus/GroupedMessageMenu.qml (+4/-5)
plugins/Ubuntu/Settings/Menus/MediaPlayerMenu.qml (+37/-91)
plugins/Ubuntu/Settings/Menus/ModemInfoItem.qml (+82/-82)
plugins/Ubuntu/Settings/Menus/PlaybackButton.qml (+44/-0)
plugins/Ubuntu/Settings/Menus/PlaybackItemMenu.qml (+25/-65)
plugins/Ubuntu/Settings/Menus/ProgressBarMenu.qml (+12/-12)
plugins/Ubuntu/Settings/Menus/ProgressValueMenu.qml (+5/-4)
plugins/Ubuntu/Settings/Menus/SectionMenu.qml (+8/-12)
plugins/Ubuntu/Settings/Menus/SeparatorMenu.qml (+5/-4)
plugins/Ubuntu/Settings/Menus/SimpleMessageMenu.qml (+30/-36)
plugins/Ubuntu/Settings/Menus/SliderMenu.qml (+43/-54)
plugins/Ubuntu/Settings/Menus/SnapDecisionMenu.qml (+44/-41)
plugins/Ubuntu/Settings/Menus/StandardMenu.qml (+40/-0)
plugins/Ubuntu/Settings/Menus/SwitchMenu.qml (+12/-42)
plugins/Ubuntu/Settings/Menus/TextMessageMenu.qml (+8/-7)
plugins/Ubuntu/Settings/Menus/TimeZoneMenu.qml (+4/-8)
plugins/Ubuntu/Settings/Menus/TransferMenu.qml (+25/-31)
plugins/Ubuntu/Settings/Menus/UserSessionMenu.qml (+10/-15)
plugins/Ubuntu/Settings/Menus/qmldir (+2/-0)
tests/qmltests/CMakeLists.txt (+3/-0)
tests/qmltests/Components/tst_ActionTextField.qml (+103/-0)
tests/qmltests/Components/tst_ServerPropertySynchroniser.qml (+2/-2)
tests/qmltests/Menus/tst_BaseMenu.qml (+182/-0)
tests/qmltests/Menus/tst_CheckableMenu.qml (+35/-20)
tests/qmltests/Menus/tst_GroupedMessageMenu.qml (+5/-0)
tests/qmltests/Menus/tst_SimpleMessageMenu.qml (+5/-0)
tests/qmltests/Menus/tst_SnapDecisionMenu.qml (+9/-1)
tests/qmltests/Menus/tst_StandardMenu.qml (+81/-0)
tests/qmltests/Menus/tst_SwitchMenu.qml (+53/-35)
tests/qmltests/Menus/tst_TextMessageMenu.qml (+6/-0)
To merge this branch: bzr merge lp:~3v1n0/ubuntu-settings-components/slots-layouts
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Michael Zanetti (community) Approve
Lukáš Tinkl (community) Approve
Nick Dedekind (community) Needs Information
Michael Terry Approve
Andrea Bernabei Pending
Review via email: mp+305721@code.launchpad.net

Commit message

Menus: rewrite components using ListItemLayout's and SlotsLayout's

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

No

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Sure, running these with both the examples and untiy8

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

 * If you changed the UI, has there been a design review?

Using SDK compoments that have already been ACK'ed by design

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

I started poking at this, I know you're not marked for review yet. Mainly I just compared old and new examples/ and had a few comments:

- I assume the lighter text color and indented menu content is from the switched SDK element, not something explicitly done?

- ButtonMenu seems to have swapped its button location with "SlotsLayout.position: SlotsLayout.Leading" instead of trailing.

- I know it's a little more consistent with behavior elsewhere, but having to swipe-right-then-press-the-delete-button is a bit more annoying than merely swipe-right on the Messaging Menu when you have a couple messages to clear (and you don't want to clear ALL the messages with the "clear all" button). Is design aware of that potential change? Actually, how involved is design in this MP in general? I know most of it makes 100% sense (using proper new SDK elements is always good), but there will be some inevitable UI differences.

- Why is the width of 'qmlscene examples/SettingsComponents.qml' set correctly on trunk but not on this MP?

I love that every gosh dang menu item no longer has a divider by default.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Hi Martin, thanks for the initial review

> I started poking at this, I know you're not marked for review yet. Mainly I
> just compared old and new examples/ and had a few comments:

No, it's fine... I've still to refactor the MessageHeader, but a part from that all the components should now have almost the final shape.

> - I assume the lighter text color and indented menu content is from the
> switched SDK element, not something explicitly done?

Exactly... And that of course won't affect unity shell, since these elements are differently themed.

> - ButtonMenu seems to have swapped its button location with
> "SlotsLayout.position: SlotsLayout.Leading" instead of trailing.

Yeah, good catch... I probably pasted there something wrong.
I've fixed it now.

> - I know it's a little more consistent with behavior elsewhere, but having to
> swipe-right-then-press-the-delete-button is a bit more annoying than merely
> swipe-right on the Messaging Menu when you have a couple messages to clear
> (and you don't want to clear ALL the messages with the "clear all" button).
> Is design aware of that potential change? Actually, how involved is design in
> this MP in general? I know most of it makes 100% sense (using proper new SDK
> elements is always good), but there will be some inevitable UI differences.

Mh, I agree that's annoying for notifications... This is the design though.
I think we can discuss with them this further to have a special case in that scenario.

> - Why is the width of 'qmlscene examples/SettingsComponents.qml' set correctly
> on trunk but not on this MP?

Ups Sorry, because for testing reasons I was launching only the OtherComponents file so I set some sizes on it... Reverted :-)

> I love that every gosh dang menu item no longer has a divider by default.

Agree, probably this something that could change again, but in general there will be more groups.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

s/Martin/Michael/

I was about to write mterry, and I mixed the two in Martin it seems :-D.
Sorry :)

Revision history for this message
Michael Terry (mterry) wrote :

>> - Why is the width of 'qmlscene examples/SettingsComponents.qml' set correctly
>> on trunk but not on this MP?
>
> Ups Sorry, because for testing reasons I was launching only the OtherComponents
> file so I set some sizes on it... Reverted :-)

No no, I liked the size being set on OtherComponents. My question was about SettingsComponents. In trunk, SettingsComponents comes up and the list elements have the correct window width. But in this MP, SettingsComponents comes up and list elements have a width bigger than the window until you resize the window. Is that indicative of a bug?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> No no, I liked the size being set on OtherComponents. My question was about
> SettingsComponents. In trunk, SettingsComponents comes up and the list
> elements have the correct window width. But in this MP, SettingsComponents
> comes up and list elements have a width bigger than the window until you
> resize the window. Is that indicative of a bug?

I don't think it's a problem in the components themselves, but maybe more related to qmlscene (I was discussing about a similar thing with faenil too)... In fact if I launch that with qml it works as expected. I've added a workaround to make it work in both cases though.

Anyway, I've finished all the components now (I've completed this by mostly rewriting the Message menu items) so the MP is now fully open for business.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:216
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/67/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2898
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1590
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1590
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1590
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2926
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2784
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2784/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2784
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2784/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2784
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2784/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2784
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2784/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2784
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2784/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2784
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2784/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2784
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2784/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2784
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2784/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2784
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2784/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/67/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:217
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/68/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2899
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1591
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1591
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1591
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2927
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2785/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/68/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:219
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/69/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2900
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1592
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1592
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1592
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2928
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2786
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2786/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2786
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2786/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2786
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2786/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2786
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2786/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2786
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2786/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2786
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2786/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2786
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2786/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2786
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2786/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2786
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2786/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/69/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:220
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/70/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2901
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1593
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1593
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1593
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2929
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2787
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2787/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2787
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2787/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2787
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2787/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2787
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2787/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2787
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2787/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2787
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2787/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2787
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2787/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2787
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2787/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2787
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2787/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/70/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:222
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/71/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2902
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1594
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1594
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1594
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2930
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2788
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2788/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2788
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2788/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2788
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2788/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2788
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2788/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2788
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2788/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2788
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2788/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2788
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2788/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2788
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2788/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2788
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2788/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/71/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:223
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/72/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2903
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1595
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1595
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1595
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2931
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2789
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2789/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2789
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2789/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2789
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2789/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2789
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2789/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2789
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2789/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2789
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2789/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2789
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2789/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2789
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2789/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2789
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2789/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/72/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:224
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/73/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2904
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1596
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1596
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1596
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2932
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2790
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2790/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2790
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2790/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2790
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2790/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2790
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2790/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2790
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2790/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2790
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2790/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2790
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2790/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2790
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2790/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2790
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2790/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/73/rebuild

review: Approve (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:225
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/74/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2905
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1597
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1597
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1597
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2933
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2791
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2791/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2791
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2791/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2791
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2791/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2791
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2791/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2791
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2791/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2791
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2791/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2791
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2791/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2791
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2791/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2791
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2791/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/74/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:228
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/75/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2906
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1598
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1598
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1598
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2934
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2792
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2792/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2792
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2792/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2792
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2792/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2792
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2792/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2792
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2792/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2792
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2792/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2792
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2792/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2792
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2792/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2792
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2792/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/75/rebuild

review: Approve (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:230
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/76/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2907
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1599
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1599
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1599
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2935
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2793
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2793/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2793
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2793/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2793
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2793/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2793
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2793/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2793
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2793/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2793
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2793/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2793
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2793/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2793
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2793/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2793
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2793/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/76/rebuild

review: Approve (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:236
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/77/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2914
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1601
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1601
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1601
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2942
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2800
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2800/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2800
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2800/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2800
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2800/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2800
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2800/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2800
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2800/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2800
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2800/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2800
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2800/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2800
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2800/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2800
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2800/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/77/rebuild

review: Approve (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

So glancing over the code changes, they seem fine.

I loaded this up on a test phone. Love the new look in general, except for one big annoyance: the forced padding on the left.

Consider the Rotation menu. It has only one entry, but a bunch of padding on the left. Looks odd.

Then look at the Network menu. The cellular status label is left-aligned, but most of the other control widget labels have left-padding instead.

And on the Sound menu, "Volume" is left-aligned and looks fine. But "Silent Mode" isn't and looks odd right next to it.

Is there a fix to make those look more natural? The easiest would be to drop back to no-left padding like we had before, but maybe there are better solutions.

review: Needs Information
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> So glancing over the code changes, they seem fine.
>
> I loaded this up on a test phone. Love the new look in general, except for
> one big annoyance: the forced padding on the left.
>
> Consider the Rotation menu. It has only one entry, but a bunch of padding on
> the left. Looks odd.
>
> Then look at the Network menu. The cellular status label is left-aligned, but
> most of the other control widget labels have left-padding instead.
>
> And on the Sound menu, "Volume" is left-aligned and looks fine. But "Silent
> Mode" isn't and looks odd right next to it.
>
> Is there a fix to make those look more natural? The easiest would be to drop
> back to no-left padding like we had before, but maybe there are better
> solutions.

So... I forgot to hide the icon if the source wasn't set, so I've fixed that... Now it should look as it used to be.

Thanks for noticing it!

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:237
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/78/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2920
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1604
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1604
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1604
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2948
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2806
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2806/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2806
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2806/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2806
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2806/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2806
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2806/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2806
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2806/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2806
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2806/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2806
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2806/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2806
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2806/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2806
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2806/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/78/rebuild

review: Approve (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

Nice, much better.

Why is the text on "Charge level" in Battery darker than other text?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> Nice, much better.
>
> Why is the text on "Charge level" in Battery darker than other text?

Well, this is what we get from the model:

      label: Charge level
      sensitive: false
      isSeparator: false
      icon:
      type: com.canonical.indicator.progress
      ext:
      action: indicator.battery-level
      actionState: 100
      isCheck: false
      isRadio: false
      isToggled: false

Thus the "sensitive: false" thing causes the "enabled" property to be set to false. This is done in MenuItemFactory in unity8.

In that case, as you can see in BaseLayoutMenu the title's opacity is set to 0.5.
I think that's correct in normal state...

However I can easily fix this at U8 level by hacking it with: http://pastebin.ubuntu.com/23210930/ (I'm cleaning up some stuff in u8 anyway)

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:238
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/79/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2927
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1608
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1608
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1608
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2955
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2813
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2813/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2813
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2813/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2813
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2813/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2813
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2813/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2813
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2813/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2813
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2813/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2813
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2813/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2813
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2813/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2813
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2813/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/79/rebuild

review: Approve (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

Nice, thanks. Looks good to me now.

review: Approve
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

There are a bunch of print statements in the code. Presumably these were for debugging only?

review: Needs Information
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> There are a bunch of print statements in the code. Presumably these were for
> debugging only?

Yes, sure... They're just in the example client

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Activating access points doesn't work with this branch (neither in indicators, nor from System Settings)

review: Needs Fixing
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:250
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/82/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3049
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1695
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1695
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1695
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3077
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2934
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2934/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2934
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2934/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2934
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2934/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2934
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2934/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2934
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2934/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2934
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2934/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2934
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2934/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2934
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2934/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2934
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2934/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/82/rebuild

review: Approve (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

I think this is due to the fact the AccessPointMenu is a checkable menu, eventhough it doesn't contain a (visual) checkbox

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

I'm not sure I got what you mean, it seems fine here: http://i.imgur.com/xocL4LX.png

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

While tapping on it I'm properly getting the expected behavior http://i.imgur.com/rml7Boy.png

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Indeed, the problem seems to be somewhere lower in the stack

review: Approve
251. By Marco Trevisan (Treviño)

MessageHeader: align the app icon to the summary text if there's a time text

252. By Marco Trevisan (Treviño)

MessageHeader: no need to add binding for text

253. By Marco Trevisan (Treviño)

MessageHeader: refer to title, as summary might be empty

254. By Marco Trevisan (Treviño)

MessageHeader: use an AbstractButton for icon click

255. By Marco Trevisan (Treviño)

MessageHeader: define icon y position based on time... being the more relevant element for it

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:255
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/101/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3166
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1804
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1804
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1804
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3194
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3050
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3050/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3050
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3050/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/3050
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/3050/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3050
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3050/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3050
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3050/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/3050
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/3050/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3050
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3050/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3050
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3050/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/3050
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/3050/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/101/rebuild

review: Approve (continuous-integration)
256. By Marco Trevisan (Treviño)

BaseMenu, SimpleMessageMenu: enable clipping if there are trailing or leading actions

Revision history for this message
Michael Zanetti (mzanetti) wrote :

tested the latest commits. all good still

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:255
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/107/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3216
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1842
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1842
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/1842
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3244
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3099
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3099/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3099
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3099/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3099
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3099/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3099
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3099/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3099
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3099/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3099
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3099/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3099
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3099/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3099
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3099/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3099
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3099/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/107/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-09-27 07:27:21 +0000
3+++ debian/changelog 2016-10-24 11:26:32 +0000
4@@ -1,3 +1,10 @@
5+ubuntu-settings-components (0.10) UNRELEASED; urgency=medium
6+
7+ * Menus: rewrite components using ListItemLayout's and SlotsLayout's
8+ * Bump revision to 0.10, as per Components removal
9+
10+ -- Marco Trevisan (Treviño) <marco@ubuntu.com> Fri, 30 Sep 2016 17:03:17 +0200
11+
12 ubuntu-settings-components (0.9+16.10.20160927-0ubuntu1) yakkety; urgency=medium
13
14 [ Łukasz 'sil2100' Zemczak ]
15
16=== modified file 'examples/MessageComponents.qml'
17--- examples/MessageComponents.qml 2016-02-11 11:23:02 +0000
18+++ examples/MessageComponents.qml 2016-10-24 11:26:32 +0000
19@@ -46,6 +46,14 @@
20 avatar: "artwork/beach.jpg"
21 }
22 ListElement {
23+ type: "simple"
24+ title: "Simple Text Message with Unknown Time"
25+ body: "Going short, coming from the Void"
26+ time: ""
27+ icon: "image://theme/message"
28+ avatar: "artwork/farm.jpg"
29+ }
30+ ListElement {
31 type: "snap"
32 title: "Snap Decision"
33 body: "My mother says I'm handsome!"
34@@ -80,6 +88,10 @@
35 body: model.body
36 time: model.time
37 removable: true
38+
39+ onIconActivated: {
40+ print("Icon Activated")
41+ }
42 }
43 }
44
45@@ -94,6 +106,10 @@
46 removable: true
47 replyHintText: "Reply"
48
49+ onIconActivated: {
50+ print("Icon Activated")
51+ }
52+
53 onTriggered: {
54 selected = !selected;
55 }
56@@ -111,9 +127,17 @@
57 removable: true
58 replyHintText: "Reply"
59
60+ onIconActivated: {
61+ print("Icon Activated")
62+ }
63+
64 onTriggered: {
65 selected = !selected;
66 }
67+
68+ onReplied: {
69+ print("Got reply: '" + value + "'")
70+ }
71 }
72 }
73 }
74
75=== modified file 'examples/OtherComponents.qml'
76--- examples/OtherComponents.qml 2016-06-30 15:44:36 +0000
77+++ examples/OtherComponents.qml 2016-10-24 11:26:32 +0000
78@@ -24,6 +24,9 @@
79 Item {
80 property string title: "Settings Components"
81
82+ width: parent && parent.width ? parent.width : units.gu(42)
83+ height: parent && parent.width ? parent.height : units.gu(75)
84+
85 ListModel {
86 id: mediaPlayerModel
87 ListElement { song: "You're The First, The Last, My Everything"; artist: "Barry White"; album: "Hot Soul"; albumArt: "artwork/beach.jpg"}
88@@ -60,20 +63,49 @@
89
90 StandardMenu {
91 text: i18n.tr("Standard Menu\nLook at me, I'm a new line.")
92- }
93-
94- StandardMenu {
95- iconSource: "image://theme/calendar"
96+ onTriggered: console.log("Triggered")
97+ }
98+
99+ StandardMenu {
100+ id: dividerToggleMenu
101+ text: i18n.tr("Toggle divider menu.")
102+ showDivider: false
103+
104+ slots: [
105+ Button {
106+ text: dividerToggleMenu.showDivider ? i18n.tr("Hide") : i18n.tr("Show")
107+ onClicked: dividerToggleMenu.showDivider = !dividerToggleMenu.showDivider
108+ }
109+ ]
110+ }
111+
112+ StandardMenu {
113+ text: i18n.tr("Removable menu.")
114+ removable: true
115+ onItemRemoved: console.log("Item removed");
116+ }
117+
118+ StandardMenu {
119+ text: i18n.tr("Inverted colors Version")
120+ backColor: theme.palette.normal.baseText
121+ foregroundColor: theme.palette.normal.base
122+ highlightColor: theme.palette.highlighted.backgroundText
123+ }
124+
125+ StandardMenu {
126+ iconName: "calendar"
127 iconColor: "red"
128- text: i18n.tr("Standard Menu")
129+ text: i18n.tr("Standard Menu with Component")
130 component: Component {
131 Button {
132 text: "Press Me"
133+ onClicked: print("Button pressed!")
134 }
135 }
136- backColor: Qt.rgba(1,1,1,0.1)
137 }
138
139+ SeparatorMenu {}
140+
141 SliderMenu {
142 id: slider
143 text: i18n.tr("Slider")
144@@ -97,6 +129,8 @@
145 value: slider.value
146 }
147
148+ SeparatorMenu {}
149+
150 ButtonMenu {
151 text: i18n.tr("Button")
152 buttonText: i18n.tr("Hello world!")
153@@ -105,11 +139,15 @@
154 CheckableMenu {
155 text: i18n.tr("Checkable")
156 checked: true
157+ onCheckedChanged: print("Checked status is", checked);
158+ onTriggered: print("Triggered", value)
159 }
160
161 SwitchMenu {
162 text: i18n.tr("Switch")
163 checked: true
164+ onCheckedChanged: print("Checked status is", checked);
165+ onTriggered: print("Triggered", value)
166 }
167
168 SectionMenu {
169@@ -127,6 +165,7 @@
170 name: i18n.tr("Lola Chang")
171 iconSource: "image://theme/contact"
172 active: true
173+ onTriggered: active = !active
174 }
175
176 MediaPlayerMenu {
177@@ -180,10 +219,28 @@
178 }
179
180 ModemInfoItem {
181+ simIdentifierText: "SIM 1"
182 statusText: "EE 4G"
183 statusIcon: "gsm-3g-full"
184 roaming: true
185 locked: false
186+ onTriggered: roaming = !roaming
187+ }
188+
189+ ModemInfoItem {
190+ simIdentifierText: "SIM 2"
191+ statusText: "Ubuntu 5G"
192+ statusIcon: "gsm-3g-medium-secure"
193+ roaming: false
194+ locked: true
195+ onUnlock: locked = false
196+ onTriggered: {
197+ if (locked) {
198+ roaming = !roaming
199+ } else {
200+ locked = true
201+ }
202+ }
203 }
204
205 GroupedMessageMenu {
206
207=== modified file 'examples/SettingsComponents.qml'
208--- examples/SettingsComponents.qml 2016-02-11 11:23:02 +0000
209+++ examples/SettingsComponents.qml 2016-10-24 11:26:32 +0000
210@@ -26,8 +26,8 @@
211 // Note! applicationName needs to match the .desktop filename
212 applicationName: "SettingsComponents"
213
214- width: units.gu(42)
215- height: units.gu(75)
216+ width: units.gu(50)
217+ height: units.gu(100)
218
219 Component.onCompleted: {
220 theme.name = "Ubuntu.Components.Themes.SuruDark"
221@@ -41,13 +41,19 @@
222 }
223
224 Page {
225- title: listView.currentItem ? listView.currentItem.item.title : "Components"
226+ id: page
227+ header: PageHeader {
228+ id: header
229+ title: listView.currentItem ? listView.currentItem.item.title : "Components"
230+ }
231+
232 clip: true
233
234 ListView {
235 id: listView
236 model: pages
237 anchors.fill: parent
238+ anchors.topMargin: header.height
239
240 orientation: ListView.Horizontal
241 snapMode: ListView.SnapOneItem
242@@ -61,6 +67,5 @@
243 source: model.source
244 }
245 }
246-
247 }
248 }
249
250=== modified file 'plugins/Ubuntu/Settings/Components/ActionTextField.qml'
251--- plugins/Ubuntu/Settings/Components/ActionTextField.qml 2016-02-11 11:23:02 +0000
252+++ plugins/Ubuntu/Settings/Components/ActionTextField.qml 2016-10-24 11:26:32 +0000
253@@ -1,5 +1,5 @@
254 /*
255- * Copyright 2013 Canonical Ltd.
256+ * Copyright 2013-2016 Canonical Ltd.
257 *
258 * This program is free software; you can redistribute it and/or modify
259 * it under the terms of the GNU Lesser General Public License as published by
260@@ -16,11 +16,11 @@
261 * Authors:
262 * Renato Araujo Oliveira Filho <renato@canonical.com>
263 * Olivier Tilloy <olivier.tilloy@canonical.com>
264+ * Marco Trevisan <marco.trevisan@canonical.com>
265 */
266
267 import QtQuick 2.4
268 import Ubuntu.Components 1.3
269-import QtQuick.Layouts 1.1
270
271 Item {
272 id: textField
273@@ -31,21 +31,17 @@
274
275 signal activated(var value)
276
277- implicitHeight: layout.implicitHeight
278+ height: layout.height
279+ anchors { right: parent.right; left: parent.left }
280
281- Row {
282+ SlotsLayout {
283 id: layout
284- anchors {
285- left: parent.left
286- right: parent.right
287- }
288- spacing: units.gu(1)
289+ padding.top: 0
290
291- TextArea {
292+ mainSlot: TextArea {
293 id: replyField
294 objectName: "replyText"
295 autoSize: true
296- width: parent.width - layout.spacing - sendButton.width
297
298 onEnabledChanged: {
299 //Make sure that the component lost focus when enabled = false,
300@@ -59,14 +55,15 @@
301 Button {
302 id: sendButton
303 objectName: "sendButton"
304- Layout.preferredWidth: units.gu(9)
305- enabled: (replyField.text !== "" || replyField.inputMethodComposing) && textField.activateEnabled
306+ enabled: (replyField.text.length > 0 || replyField.inputMethodComposing) && textField.activateEnabled
307 color: enabled ? theme.palette.normal.positive : theme.palette.disabled.positive
308
309 onClicked: {
310 Qt.inputMethod.commit();
311 textField.activated(replyField.text);
312 }
313+
314+ SlotsLayout.position: SlotsLayout.Trailing
315 }
316 }
317 }
318
319=== modified file 'plugins/Ubuntu/Settings/Components/MessageHeader.qml'
320--- plugins/Ubuntu/Settings/Components/MessageHeader.qml 2016-02-11 11:23:02 +0000
321+++ plugins/Ubuntu/Settings/Components/MessageHeader.qml 2016-10-24 11:26:32 +0000
322@@ -1,5 +1,5 @@
323 /*
324- * Copyright 2013 Canonical Ltd.
325+ * Copyright 2013-2016 Canonical Ltd.
326 *
327 * This program is free software; you can redistribute it and/or modify
328 * it under the terms of the GNU Lesser General Public License as published by
329@@ -16,109 +16,84 @@
330 * Authors:
331 * Renato Araujo Oliveira Filho <renato@canonical.com>
332 * Olivier Tilloy <olivier.tilloy@canonical.com>
333+ * Marco Trevisan <marco.trevisan@canonical.com>
334 */
335
336 import QtQuick 2.4
337 import Ubuntu.Components 1.3
338-import QtQuick.Layouts 1.1
339
340 Item {
341 id: messageHeader
342
343 property alias avatar: avatarImage.source
344 property alias icon: iconImage.source
345- property alias title: titleText.text
346 property alias time: timeText.text
347- property alias body: bodyText.text
348+ property alias title: itemLayout.title
349+ property alias body: itemLayout.summary
350
351 signal iconClicked()
352
353- implicitHeight: layout.height
354+ implicitHeight: itemLayout.height
355+ anchors { right: parent.right; left: parent.left }
356
357 function shakeIcon() {
358 shake.restart();
359 }
360
361- RowLayout {
362- id: layout
363- anchors {
364- left: parent.left
365- right: parent.right
366- rightMargin: units.gu(4)
367- }
368- spacing: units.gu(2)
369-
370- UbuntuShapeForItem {
371- Layout.preferredWidth: units.gu(6)
372- Layout.preferredHeight: units.gu(6)
373-
374- image: avatarImage
375+ ListItemLayout {
376+ id: itemLayout
377+
378+ UbuntuShape {
379+ width: units.gu(6)
380+ height: width
381+
382+ SlotsLayout.position: SlotsLayout.Leading
383+
384+ source: ShaderEffectSource {
385+ sourceItem: avatarImage
386+ hideSource: true
387+ }
388 Icon {
389 id: avatarImage
390 objectName: "avatar"
391+ color: Qt.rgba(0.0, 0.0, 0.0, 0.0)
392
393- color: {
394- if (String(source).match(/^image:\/\/theme/)) {
395- return theme.palette.normal.backgroundText;
396- }
397- return Qt.rgba(0.0, 0.0, 0.0, 0.0);
398+ Binding on color {
399+ when: String(avatarImage.source).match(/^image:\/\/theme/)
400+ value: theme.palette.normal.backgroundText
401 }
402 }
403 }
404
405- ColumnLayout {
406- Label {
407- id: titleText
408- objectName: "title"
409-
410- maximumLineCount: 1
411- elide: Text.ElideRight
412- font.weight: Font.DemiBold
413- fontSize: "medium"
414-
415- Layout.fillWidth: true
416- // calculate width with regard to the time's incursion into this layout's space.
417- Layout.maximumWidth: layout.width - timeLayout.width - units.gu(4)
418- }
419- spacing: units.gu(0.5)
420-
421- Label {
422- id: bodyText
423- objectName: "body"
424-
425- maximumLineCount: 3
426- wrapMode: Text.WordWrap
427- elide: Text.ElideRight
428- fontSize: "small"
429-
430- Layout.fillWidth: true
431- }
432- }
433- }
434-
435- ColumnLayout {
436- id: timeLayout
437- anchors.right: parent.right
438-
439- Label {
440- id: timeText
441- objectName: "time"
442- anchors.right: parent.right
443-
444- fontSize: "x-small"
445- maximumLineCount: 1
446- }
447- spacing: units.gu(0.5)
448+ title.objectName: "title"
449+ title.font.weight: Font.DemiBold
450+ title.anchors.rightMargin: timeText.width > iconImage.width ? timeText.width - iconImage.width : 0
451+
452+ summary.objectName: "body"
453+ summary.maximumLineCount: 3
454+ summary.wrapMode: Text.WordWrap
455+ summary.elide: Text.ElideRight
456
457 Icon {
458 id: iconImage
459 objectName: "icon"
460- Layout.preferredHeight: units.gu(3)
461- Layout.preferredWidth: units.gu(3)
462- Layout.alignment: Qt.AlignRight
463 color: theme.palette.normal.backgroundText
464-
465- MouseArea {
466+ width: units.gu(3)
467+ height: width
468+ SlotsLayout.position: SlotsLayout.Trailing
469+ SlotsLayout.overrideVerticalPositioning: true
470+
471+ Binding on y {
472+ when: timeText.text.length
473+ value: timeText.y + timeText.height + units.gu(0.1)
474+ }
475+
476+ Binding on anchors.verticalCenter {
477+ when: !timeText.text.length
478+ value: itemLayout.verticalCenter
479+ }
480+
481+ AbstractButton {
482 anchors.fill: parent
483 onClicked: messageHeader.iconClicked()
484 }
485@@ -130,4 +105,18 @@
486 }
487 }
488 }
489+
490+ Label {
491+ id: timeText
492+ objectName: "time"
493+ anchors {
494+ top: parent.top
495+ right: parent.right
496+ topMargin: itemLayout.padding.top
497+ rightMargin: itemLayout.padding.trailing
498+ }
499+
500+ fontSize: "x-small"
501+ maximumLineCount: 1
502+ }
503 }
504
505=== removed file 'plugins/Ubuntu/Settings/Components/QuickReply.qml'
506--- plugins/Ubuntu/Settings/Components/QuickReply.qml 2016-02-11 11:23:02 +0000
507+++ plugins/Ubuntu/Settings/Components/QuickReply.qml 1970-01-01 00:00:00 +0000
508@@ -1,165 +0,0 @@
509-/*
510- * Copyright 2013 Canonical Ltd.
511- *
512- * This program is free software; you can redistribute it and/or modify
513- * it under the terms of the GNU Lesser General Public License as published by
514- * the Free Software Foundation; version 3.
515- *
516- * This program is distributed in the hope that it will be useful,
517- * but WITHOUT ANY WARRANTY; without even the implied warranty of
518- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
519- * GNU Lesser General Public License for more details.
520- *
521- * You should have received a copy of the GNU Lesser General Public License
522- * along with this program. If not, see <http://www.gnu.org/licenses/>.
523- *
524- * Authors:
525- * Renato Araujo Oliveira Filho <renato@canonical.com>
526- * Olivier Tilloy <olivier.tilloy@canonical.com>
527- */
528-
529-import QtQuick 2.4
530-import Ubuntu.Components 1.3
531-import Ubuntu.Components.ListItems 1.3 as ListItem
532-
533-Item {
534- id: quickReply
535- property alias buttonText: actionTextField.buttonText
536- property real expandedHeight: childrenRect.height
537- property alias messages : messagelistRepeater.model
538- property alias replyEnabled: actionTextField.activateEnabled
539- property real messageMargins: units.gu(2)
540-
541- signal replied(var value)
542-
543- Item {
544- id: header
545- anchors.top: parent.top
546- anchors.left: parent.left
547- anchors.right: parent.right
548- height: units.gu(4)
549-
550- Row {
551- anchors {
552- fill: parent
553- topMargin: units.gu(1)
554- bottomMargin: units.gu(1)
555- leftMargin: messageMargins
556- rightMargin: messageMargins
557- }
558- spacing: units.gu(1)
559-
560- Image {
561- width: units.gu(2)
562- height: width
563- fillMode: Image.PreserveAspectFit
564- source: "image://theme/message"
565- }
566-
567- Label {
568- height: parent.height
569- verticalAlignment: Text.AlignVCenter
570- fontSize: "small"
571- text: i18n.dtr("ubuntu-settings-components", "Quick reply with:")
572- }
573- }
574-
575- ListItem.ThinDivider {
576- anchors.bottom: parent.bottom
577- }
578- }
579-
580- Column {
581- id: messagelist
582- anchors {
583- left: parent.left
584- right: parent.right
585- top: header.bottom
586- }
587- height: childrenRect.height
588-
589- Repeater {
590- id: messagelistRepeater
591-
592- height: childrenRect.height
593-
594- Item {
595- objectName: "replyMessage" + index
596- width: messagelist.width
597- height: units.gu(5)
598-
599- Label {
600- id: __label
601-
602- anchors {
603- fill: parent
604- leftMargin: messageMargins
605- rightMargin: messageMargins
606- }
607- verticalAlignment: Text.AlignVCenter
608- fontSize: "medium"
609- text: modelData
610- }
611-
612- ListItem.ThinDivider {
613- anchors.top: parent.top
614- }
615- ListItem.ThinDivider {
616- anchors.bottom: parent.bottom
617- }
618-
619- MouseArea {
620- id: __mouseArea
621-
622- anchors.fill: parent
623- onClicked: {
624- actionTextField.text = modelData;
625- }
626- }
627-
628- Rectangle {
629- id: __mask
630-
631- anchors.fill: parent
632- color: "black"
633- opacity: __mouseArea.pressed ? 0.3 : 0.0
634- Behavior on opacity {
635- NumberAnimation {
636- duration: 200
637- easing.type: Easing.OutQuad
638- }
639- }
640- }
641- }
642-
643- }
644- }
645-
646- Item {
647- anchors.top: messagelist.bottom
648- anchors.left: parent.left
649- anchors.right: parent.right
650- height: units.gu(6)
651-
652- ActionTextField {
653- id: actionTextField
654-
655- anchors.fill: parent
656- anchors {
657- topMargin: units.gu(1)
658- bottomMargin: units.gu(1)
659- leftMargin: messageMargins
660- rightMargin: messageMargins
661- }
662- activateEnabled: replyEnabled
663-
664- onActivated: {
665- quickReply.replied(value)
666- }
667- }
668-
669- ListItem.ThinDivider {
670- anchors.top: parent.top
671- }
672- }
673-}
674
675=== modified file 'plugins/Ubuntu/Settings/Components/qmldir'
676--- plugins/Ubuntu/Settings/Components/qmldir 2016-06-30 15:44:36 +0000
677+++ plugins/Ubuntu/Settings/Components/qmldir 2016-10-24 11:26:32 +0000
678@@ -5,5 +5,4 @@
679 ActionTextField 0.1 ActionTextField.qml
680 Calendar 0.1 Calendar.qml
681 MessageHeader 0.1 MessageHeader.qml
682-QuickReply 0.1 QuickReply.qml
683 UbuntuShapeForItem 0.1 UbuntuShapeForItem.qml
684
685=== modified file 'plugins/Ubuntu/Settings/Menus/AccessPointMenu.qml'
686--- plugins/Ubuntu/Settings/Menus/AccessPointMenu.qml 2016-02-11 11:23:02 +0000
687+++ plugins/Ubuntu/Settings/Menus/AccessPointMenu.qml 2016-10-24 11:26:32 +0000
688@@ -1,5 +1,5 @@
689 /*
690- * Copyright 2013 Canonical Ltd.
691+ * Copyright 2013-2016 Canonical Ltd.
692 *
693 * This program is free software; you can redistribute it and/or modify
694 * it under the terms of the GNU Lesser General Public License as published by
695@@ -15,81 +15,45 @@
696 *
697 * Authors:
698 * Renato Araujo Oliveira Filho <renato@canonical.com>
699+ * Marco Trevisan <marco.trevisan@canonical.com>
700 */
701
702 import QtQuick 2.4
703 import Ubuntu.Components 1.3
704-import Ubuntu.Components.ListItems 1.3 as ListItem
705-
706-ListItem.Empty {
707- id: menu
708- __height: units.gu(5.5)
709-
710+
711+StandardMenu {
712+ id: ap
713 property bool active: false
714- property bool secure: false
715 property bool adHoc: false
716 property int signalStrength: 0
717- property alias text: label.text
718-
719- Icon {
720- id: iconSignal
721- objectName: "iconSignal"
722-
723- color: active ? theme.palette.normal.positive : theme.palette.normal.backgroundText
724-
725- width: height
726- height: Math.min(units.gu(3), parent.height - units.gu(1))
727- anchors {
728- left: parent.left
729- leftMargin: menu.__contentsMargins
730- verticalCenter: parent.verticalCenter
731- }
732-
733- name: {
734- var imageName = "nm-signal-100"
735-
736- if (adHoc) {
737- imageName = "nm-adhoc";
738- } else if (signalStrength <= 0) {
739- imageName = "nm-signal-00";
740- } else if (signalStrength <= 25) {
741- imageName = "nm-signal-25";
742- } else if (signalStrength <= 50) {
743- imageName = "nm-signal-50";
744- } else if (signalStrength <= 75) {
745- imageName = "nm-signal-75";
746- }
747- return imageName;
748- }
749- }
750-
751- Label {
752- id: label
753- anchors {
754- left: iconSignal.right
755- leftMargin: units.gu(1)
756- verticalCenter: parent.verticalCenter
757- right: iconSecure.visible ? iconSecure.left : parent.right
758- rightMargin: menu.__contentsMargins
759- }
760- elide: Text.ElideRight
761- color: active ? theme.palette.normal.positive : theme.palette.normal.backgroundText
762- }
763-
764- Icon {
765+ property alias secure: iconSecure.visible
766+
767+ icon.objectName: "iconSignal"
768+ iconSize: Math.min(units.gu(3), parent.height - units.gu(1))
769+ iconColor: ap.active ? theme.palette.normal.positive : theme.palette.normal.backgroundText
770+ iconName: {
771+ if (adHoc) {
772+ return "nm-adhoc";
773+ } else if (signalStrength <= 0) {
774+ return "nm-signal-00";
775+ } else if (signalStrength <= 25) {
776+ return "nm-signal-25";
777+ } else if (signalStrength <= 50) {
778+ return "nm-signal-50";
779+ } else if (signalStrength <= 75) {
780+ return "nm-signal-75";
781+ }
782+
783+ return "nm-signal-100";
784+ }
785+
786+ slots: Icon {
787 id: iconSecure
788 objectName: "iconSecure"
789- visible: secure
790+ visible: false
791 name: "network-secure"
792-
793- color: active ? theme.palette.normal.positive : theme.palette.normal.backgroundText
794-
795+ color: ap.active ? theme.palette.normal.positive : theme.palette.normal.backgroundText
796 width: height
797- height: Math.min(units.gu(3), parent.height - units.gu(1))
798- anchors {
799- right: parent.right
800- rightMargin: menu.__contentsMargins
801- verticalCenter: parent.verticalCenter
802- }
803+ height: Math.min(units.gu(3), ap.parent.height - units.gu(1))
804 }
805 }
806
807=== added file 'plugins/Ubuntu/Settings/Menus/BaseLayoutMenu.qml'
808--- plugins/Ubuntu/Settings/Menus/BaseLayoutMenu.qml 1970-01-01 00:00:00 +0000
809+++ plugins/Ubuntu/Settings/Menus/BaseLayoutMenu.qml 2016-10-24 11:26:32 +0000
810@@ -0,0 +1,52 @@
811+/*
812+ * Copyright 2016 Canonical Ltd.
813+ *
814+ * This program is free software; you can redistribute it and/or modify
815+ * it under the terms of the GNU Lesser General Public License as published by
816+ * the Free Software Foundation; version 3.
817+ *
818+ * This program is distributed in the hope that it will be useful,
819+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
820+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
821+ * GNU Lesser General Public License for more details.
822+ *
823+ * You should have received a copy of the GNU Lesser General Public License
824+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
825+ *
826+ * Author: Marco Trevisan <marco.trevisan@canonical.com>
827+ */
828+
829+import QtQuick 2.4
830+import Ubuntu.Components 1.3
831+
832+BaseMenu {
833+ id: menu
834+
835+ property string text
836+ property alias layout: layoutItem
837+ property alias title: layoutItem.title
838+ property alias subtitle: layoutItem.subtitle
839+ property alias summary: layoutItem.summary
840+ property alias slots: layoutItem.children
841+
842+ // These fields are for retro-compatibility with ListItem.Empty based MenuItems
843+ property alias trailingComponent: trailingComponentLoader.sourceComponent
844+ property alias trailingComponentItem: trailingComponentLoader.item
845+ property alias component: menu.trailingComponent
846+
847+ implicitHeight: layoutItem.height + (divider.visible ? divider.height : 0)
848+
849+ ListItemLayout {
850+ id: layoutItem
851+ objectName: "menuLayoutItem"
852+ title.text: menu.text
853+ title.color: menu.foregroundColor
854+
855+ Loader {
856+ id: trailingComponentLoader
857+ asynchronous: false
858+ visible: status == Loader.Ready
859+ SlotsLayout.position: SlotsLayout.Trailing
860+ }
861+ }
862+}
863
864=== renamed file 'plugins/Ubuntu/Settings/Menus/StandardMenu.qml' => 'plugins/Ubuntu/Settings/Menus/BaseMenu.qml'
865--- plugins/Ubuntu/Settings/Menus/StandardMenu.qml 2016-02-11 11:23:02 +0000
866+++ plugins/Ubuntu/Settings/Menus/BaseMenu.qml 2016-10-24 11:26:32 +0000
867@@ -1,5 +1,5 @@
868 /*
869- * Copyright 2014 Canonical Ltd.
870+ * Copyright 2013-2016 Canonical Ltd.
871 *
872 * This program is free software; you can redistribute it and/or modify
873 * it under the terms of the GNU Lesser General Public License as published by
874@@ -12,68 +12,71 @@
875 *
876 * You should have received a copy of the GNU Lesser General Public License
877 * along with this program. If not, see <http://www.gnu.org/licenses/>.
878+ *
879+ * Author: Marco Trevisan <marco.trevisan@canonical.com>
880 */
881
882 import QtQuick 2.4
883 import Ubuntu.Components 1.3
884-import Ubuntu.Components.ListItems 1.3 as ListItems
885-import QtQuick.Layouts 1.1
886
887-ListItems.Empty {
888+ListItem {
889 id: menu
890
891- property alias iconSource: iconVisual.source
892- property alias text: label.text
893- property alias iconColor: iconVisual.color
894- property alias component: componentLoader.sourceComponent
895- property alias foregroundColor: label.color
896- property alias backColor: overlay.color
897-
898- Rectangle {
899- id: overlay
900- color: "transparent"
901- visible: color !== "transparent"
902- anchors {
903- left: parent.left
904- right: parent.right
905- top: parent.top
906- }
907- height: menu.height - menu.divider.height
908- }
909-
910- RowLayout {
911- anchors {
912- fill: parent
913- leftMargin: menu.__contentsMargins
914- rightMargin: menu.__contentsMargins
915- }
916- spacing: menu.__contentsMargins
917-
918- Icon {
919- id: iconVisual
920- visible: source != ""
921- color: theme.palette.normal.backgroundText
922-
923- readonly property real size: Math.min(units.gu(3), parent.height - menu.__contentsMargins)
924-
925- Layout.preferredHeight: size
926- Layout.preferredWidth: size
927- Layout.alignment: Qt.AlignVCenter
928- }
929-
930- Label {
931- id: label
932- Layout.fillWidth: true
933- Layout.alignment: Qt.AlignVCenter
934-
935- elide: Text.ElideRight
936- maximumLineCount: 1
937- }
938-
939- Loader {
940- id: componentLoader
941- asynchronous: false
942- visible: status == Loader.Ready
943- }
944- }
945+ property bool highlightWhenPressed: true
946+ property color foregroundColor: theme.palette.normal.baseText
947+ property alias backColor: menu.color
948+
949+ // Can't create an alias for divider.visible here, see QTBUG-50407
950+ // Thus this hack is needed not to override the default divider.visible value
951+ property bool showDivider: false
952+ divider.visible: false
953+ Component.onCompleted: {
954+ if (showDivider != divider.visible)
955+ showDivider = divider.visible;
956+
957+ divider.visible = Qt.binding(function() { return showDivider })
958+ showDivider = Qt.binding(function() { return divider.visible })
959+ }
960+
961+ highlightColor: highlightWhenPressed ? theme.palette.highlighted.background : backColor
962+
963+ // This is for retro-compatibility with ListItem.Empty, adding support to override the callback
964+ signal triggered(var value)
965+ function onClickedCallback() { triggered(null) }
966+ onClicked: onClickedCallback()
967+
968+ property bool removable: false
969+ property bool confirmRemoval: true
970+ onConfirmRemovalChanged: console.error(menu+": confirmRemoval property is deprecated")
971+ signal itemRemoved()
972+
973+ ListItemActions {
974+ id: removeAction
975+ actions: [
976+ Action {
977+ objectName: "removeAction"
978+ iconName: "delete"
979+ onTriggered: removeItemAnimation.start();
980+ }
981+ ]
982+
983+ SequentialAnimation {
984+ id: removeItemAnimation
985+
986+ running: false
987+ UbuntuNumberAnimation {
988+ target: menu
989+ property: "height"
990+ to: 0
991+ }
992+ ScriptAction {
993+ script: {
994+ itemRemoved()
995+ }
996+ }
997+ }
998+ }
999+
1000+ leadingActions: removable ? removeAction : null
1001+ clip: leadingActions || trailingActions
1002 }
1003
1004=== modified file 'plugins/Ubuntu/Settings/Menus/ButtonMenu.qml'
1005--- plugins/Ubuntu/Settings/Menus/ButtonMenu.qml 2016-02-11 11:23:02 +0000
1006+++ plugins/Ubuntu/Settings/Menus/ButtonMenu.qml 2016-10-24 11:26:32 +0000
1007@@ -1,5 +1,5 @@
1008 /*
1009- * Copyright 2013 Canonical Ltd.
1010+ * Copyright 2013-2016 Canonical Ltd.
1011 *
1012 * This program is free software; you can redistribute it and/or modify
1013 * it under the terms of the GNU Lesser General Public License as published by
1014@@ -14,6 +14,7 @@
1015 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1016 *
1017 * Authored by Andrea Cimitan <andrea.cimitan@canonical.com>
1018+ * Marco Trevisan <marco.trevisan@canonical.com>
1019 */
1020
1021 import QtQuick 2.4
1022@@ -21,16 +22,15 @@
1023
1024 StandardMenu {
1025 id: menu
1026- property string buttonText
1027+ property alias buttonText: button.text
1028
1029- component: Component {
1030+ slots: [
1031 Button {
1032 id: button
1033 objectName: "button"
1034- text: menu.buttonText
1035 width: Math.max(units.gu(5), implicitWidth)
1036
1037 onClicked: menu.clicked()
1038 }
1039- }
1040+ ]
1041 }
1042
1043=== modified file 'plugins/Ubuntu/Settings/Menus/CalendarMenu.qml'
1044--- plugins/Ubuntu/Settings/Menus/CalendarMenu.qml 2016-02-11 11:23:02 +0000
1045+++ plugins/Ubuntu/Settings/Menus/CalendarMenu.qml 2016-10-24 11:26:32 +0000
1046@@ -18,10 +18,9 @@
1047
1048 import QtQuick 2.4
1049 import Ubuntu.Components 1.3
1050-import Ubuntu.Components.ListItems 1.3 as ListItem
1051 import Ubuntu.Settings.Components 0.1
1052
1053-ListItem.Empty {
1054+BaseMenu {
1055 id: menu
1056
1057 property alias collapsed: calendar.collapsed
1058@@ -31,40 +30,35 @@
1059 property alias minimumDate: calendar.minimumDate
1060 property alias selectedDate: calendar.selectedDate
1061
1062- __height: column.height
1063-
1064- Column {
1065- id: column
1066-
1067- height: childrenRect.height + units.gu(1.5)
1068- anchors {
1069- top: parent.top
1070- left: parent.left
1071- right: parent.right
1072- topMargin: units.gu(1)
1073- leftMargin: menu.__contentsMargins
1074- rightMargin: menu.__contentsMargins
1075- }
1076- spacing: units.gu(1)
1077-
1078- Label {
1079- id: label
1080- anchors {
1081- left: parent.left
1082- right: parent.right
1083+ implicitHeight: slotsLayout.height + (divider.visible ? divider.height : 0)
1084+
1085+ SlotsLayout {
1086+ id: slotsLayout
1087+ objectName: "calenderMenuSlotsLayout"
1088+
1089+ mainSlot: Column {
1090+ id: column
1091+ spacing: units.gu(1)
1092+
1093+ Label {
1094+ id: label
1095+ anchors {
1096+ left: parent.left
1097+ right: parent.right
1098+ }
1099+ fontSize: "large"
1100+ text: i18n.ctr("%1=month name, %2=4-digit year", "%1 %2")
1101+ .arg(Qt.locale().standaloneMonthName(calendar.currentDate.getMonth(), Locale.LongFormat))
1102+ .arg(calendar.currentDate.getFullYear())
1103 }
1104- fontSize: "large"
1105- text: i18n.ctr("%1=month name, %2=4-digit year", "%1 %2")
1106- .arg(Qt.locale().standaloneMonthName(calendar.currentDate.getMonth(), Locale.LongFormat))
1107- .arg(calendar.currentDate.getFullYear())
1108- }
1109
1110- Calendar {
1111- id: calendar
1112- objectName: "calendar"
1113- anchors {
1114- left: parent.left
1115- right: parent.right
1116+ Calendar {
1117+ id: calendar
1118+ objectName: "calendar"
1119+ anchors {
1120+ left: parent.left
1121+ right: parent.right
1122+ }
1123 }
1124 }
1125 }
1126
1127=== modified file 'plugins/Ubuntu/Settings/Menus/CheckableMenu.qml'
1128--- plugins/Ubuntu/Settings/Menus/CheckableMenu.qml 2016-02-11 11:23:02 +0000
1129+++ plugins/Ubuntu/Settings/Menus/CheckableMenu.qml 2016-10-24 11:26:32 +0000
1130@@ -1,5 +1,5 @@
1131 /*
1132- * Copyright 2013 Canonical Ltd.
1133+ * Copyright 2013-2016 Canonical Ltd.
1134 *
1135 * This program is free software; you can redistribute it and/or modify
1136 * it under the terms of the GNU Lesser General Public License as published by
1137@@ -15,74 +15,27 @@
1138 *
1139 * Authors:
1140 * Nick Dedekind <nick.dedekind@canonical.com>
1141+ * Marco Trevisan <marco.trevisan@canonical.com>
1142 */
1143
1144 import QtQuick 2.4
1145-import Ubuntu.Components 1.3 as Components
1146-import Ubuntu.Components.ListItems 1.3 as ListItem
1147+import Ubuntu.Components 1.3
1148
1149-ListItem.Empty {
1150+BaseLayoutMenu {
1151 id: menu
1152
1153- property alias text: label.text
1154- property bool checked: false
1155-
1156- onClicked: menu.checked = !menu.checked
1157-
1158- Components.CheckBox {
1159+ property alias checked: checkbox.checked
1160+
1161+ function onClickedCallback() {
1162+ checked = !checked
1163+ menu.triggered(checked)
1164+ }
1165+
1166+ slots: CheckBox {
1167 id: checkbox
1168 objectName: "checkbox"
1169- property bool enableCheckConnection: true
1170-
1171- anchors {
1172- left: parent.left
1173- leftMargin: menu.__contentsMargins
1174- verticalCenter: parent.verticalCenter
1175- }
1176-
1177- Component.onCompleted: {
1178- checked = menu.checked;
1179- }
1180-
1181- // FIXME : create a bi-directional feedback component
1182- onCheckedChanged: {
1183- if (!enableCheckConnection) {
1184- return;
1185- }
1186- var oldEnable = enableCheckConnection;
1187- enableCheckConnection = false;
1188-
1189- menu.checked = checked;
1190- menu.triggered(menu.checked);
1191-
1192- enableCheckConnection = oldEnable;
1193- }
1194-
1195- Connections {
1196- target: menu
1197- onCheckedChanged: {
1198- if (!checkbox.enableCheckConnection) {
1199- return;
1200- }
1201- var oldEnable = checkbox.enableCheckConnection;
1202- checkbox.enableCheckConnection = false;
1203-
1204- checkbox.checked = menu.checked;
1205-
1206- checkbox.enableCheckConnection = oldEnable;
1207- }
1208- }
1209- }
1210-
1211- Components.Label {
1212- id: label
1213- anchors {
1214- left: checkbox.right
1215- leftMargin: menu.__contentsMargins
1216- right: parent.right
1217- rightMargin: menu.__contentsMargins
1218- verticalCenter: parent.verticalCenter
1219- }
1220- elide: Text.ElideRight
1221+ onClicked: menu.triggered(checked)
1222+ SlotsLayout.padding.trailing: units.gu(2.0)
1223+ SlotsLayout.position: SlotsLayout.Leading
1224 }
1225 }
1226
1227=== modified file 'plugins/Ubuntu/Settings/Menus/EventMenu.qml'
1228--- plugins/Ubuntu/Settings/Menus/EventMenu.qml 2016-02-11 11:23:02 +0000
1229+++ plugins/Ubuntu/Settings/Menus/EventMenu.qml 2016-10-24 11:26:32 +0000
1230@@ -1,5 +1,5 @@
1231 /*
1232- * Copyright 2013 Canonical Ltd.
1233+ * Copyright 2013-2016 Canonical Ltd.
1234 *
1235 * This program is free software; you can redistribute it and/or modify
1236 * it under the terms of the GNU Lesser General Public License as published by
1237@@ -14,58 +14,22 @@
1238 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1239 *
1240 * Authored by Andrea Cimitan <andrea.cimitan@canonical.com>
1241+ * Marco Trevisan <marco.trevisan@canonical.com>
1242 */
1243
1244 import QtQuick 2.4
1245 import Ubuntu.Components 1.3
1246-import Ubuntu.Components.ListItems 1.3 as ListItems
1247
1248-ListItems.Empty {
1249+StandardMenu {
1250 id: menu
1251
1252- property alias iconSource: iconVisual.source
1253- property alias text: label.text
1254 property alias time: dateLabel.text
1255- property alias eventColor: iconVisual.color
1256-
1257- Icon {
1258- id: iconVisual
1259- source: "image://theme/calendar"
1260- visible: source != ""
1261- color: theme.palette.normal.backgroundText
1262-
1263- height: Math.min(units.gu(3), parent.height - units.gu(1))
1264- width: height
1265-
1266- anchors {
1267- left: parent.left
1268- leftMargin: menu.__contentsMargins
1269- verticalCenter: parent.verticalCenter
1270- }
1271- }
1272-
1273- Label {
1274- id: label
1275- anchors {
1276- verticalCenter: parent.verticalCenter
1277- left: iconVisual.visible ? iconVisual.right : parent.left
1278- leftMargin: menu.__contentsMargins
1279- right: dateLabel.left
1280- rightMargin: menu.__contentsMargins
1281- }
1282- elide: Text.ElideRight
1283- maximumLineCount: 1
1284- opacity: enabled ? 1.0 : 0.5
1285- }
1286-
1287- Label {
1288+ property alias eventColor: menu.iconColor
1289+
1290+ title.opacity: enabled ? 1 : 0.5
1291+
1292+ iconName: "calendar"
1293+ slots: Label {
1294 id: dateLabel
1295-
1296- anchors {
1297- verticalCenter: parent.verticalCenter
1298- right: parent.right
1299- rightMargin: menu.__contentsMargins
1300- }
1301- opacity: enabled ? 1.0 : 0.5
1302 }
1303 }
1304
1305=== modified file 'plugins/Ubuntu/Settings/Menus/GroupedMessageMenu.qml'
1306--- plugins/Ubuntu/Settings/Menus/GroupedMessageMenu.qml 2016-02-11 11:23:02 +0000
1307+++ plugins/Ubuntu/Settings/Menus/GroupedMessageMenu.qml 2016-10-24 11:26:32 +0000
1308@@ -20,18 +20,17 @@
1309
1310 import QtQuick 2.4
1311 import Ubuntu.Components 1.3
1312-import Ubuntu.Components.ListItems 1.3 as ListItem
1313
1314 StandardMenu {
1315 id: menu
1316
1317- property string count: "0"
1318+ property alias count: label.text
1319
1320 signal dismissed()
1321
1322 iconSource: Qt.resolvedUrl("image://theme/message")
1323
1324- component: Component {
1325+ slots: [
1326 UbuntuShape {
1327 implicitHeight: label.implicitHeight + units.gu(2)
1328 implicitWidth: label.implicitWidth + units.gu(2)
1329@@ -50,12 +49,12 @@
1330 horizontalAlignment: Text.AlignRight
1331 font.weight: Font.DemiBold
1332 fontSize: "medium"
1333- text: menu.count
1334+ text: "0"
1335
1336 color: theme.palette.normal.foregroundText
1337 }
1338 }
1339- }
1340+ ]
1341
1342 onItemRemoved: {
1343 menu.dismissed();
1344
1345=== modified file 'plugins/Ubuntu/Settings/Menus/MediaPlayerMenu.qml'
1346--- plugins/Ubuntu/Settings/Menus/MediaPlayerMenu.qml 2016-06-15 14:36:33 +0000
1347+++ plugins/Ubuntu/Settings/Menus/MediaPlayerMenu.qml 2016-10-24 11:26:32 +0000
1348@@ -1,5 +1,5 @@
1349 /*
1350- * Copyright 2013 Canonical Ltd.
1351+ * Copyright 2013-2016 Canonical Ltd.
1352 *
1353 * This program is free software; you can redistribute it and/or modify
1354 * it under the terms of the GNU Lesser General Public License as published by
1355@@ -14,111 +14,57 @@
1356 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1357 *
1358 * Authored by Andrea Cimitan <andrea.cimitan@canonical.com>
1359+ * Marco Trevisan <marco.trevisan@canonical.com>
1360 */
1361
1362 import QtQuick 2.4
1363 import Ubuntu.Components 1.3
1364-import Ubuntu.Components.ListItems 1.3 as ListItem
1365-import QtQuick.Layouts 1.1
1366 import Ubuntu.Thumbnailer 0.1
1367
1368-ListItem.Empty {
1369+BaseLayoutMenu {
1370 id: menu
1371
1372 property bool showTrack: false
1373- property alias playerName: playerNameLabel.text
1374+ property alias playerName: menu.text
1375 property alias playerIcon: playerIcon.source
1376
1377 property alias albumArt: albumArtImage.source
1378- property alias song: songLabel.text
1379- property alias artist: artistLabel.text
1380- property alias album: albumLabel.text
1381+ property string song
1382+ property string artist
1383+ property string album
1384
1385- __height: column.height + units.gu(2)
1386+ highlightWhenPressed: false
1387+ implicitHeight: (albumLayout.visible ? albumLayout.height : layout.height) + (divider.visible ? divider.height : 0)
1388 Behavior on implicitHeight { UbuntuNumberAnimation {} }
1389
1390- Column {
1391- id: column
1392- anchors {
1393- left: parent.left
1394- right: parent.right
1395- leftMargin: menu.__contentsMargins
1396- rightMargin: menu.__contentsMargins
1397- verticalCenter: parent.verticalCenter
1398- }
1399-
1400- RowLayout {
1401- objectName: "player"
1402- id: playerRow
1403- spacing: menu.__contentsMargins
1404- visible: !showTrack
1405- anchors { left: parent.left; right: parent.right }
1406-
1407- Image {
1408- id: playerIcon
1409- Layout.preferredHeight: units.gu(5)
1410- Layout.preferredWidth: units.gu(5)
1411- }
1412-
1413- Label {
1414- id: playerNameLabel
1415- Layout.fillWidth: true
1416- Layout.alignment: Qt.AlignVCenter
1417- elide: Text.ElideRight
1418- maximumLineCount: 1
1419- }
1420- }
1421-
1422- RowLayout {
1423- objectName: "albumArt"
1424- id: trackRow
1425- spacing: units.gu(2)
1426- visible: showTrack
1427- anchors { left: parent.left; right: parent.right }
1428-
1429- UbuntuShape {
1430- Layout.preferredHeight: units.gu(8)
1431- Layout.preferredWidth: units.gu(8)
1432-
1433- image: Image {
1434- id: albumArtImage
1435- width: units.gu(8)
1436- height: width
1437- fillMode: Image.PreserveAspectFit
1438- sourceSize: Qt.size(width, height)
1439- anchors.centerIn: parent
1440- }
1441- }
1442-
1443- Column {
1444- Layout.alignment: Qt.AlignVCenter
1445- Layout.fillWidth: true
1446- spacing: units.gu(0.5)
1447-
1448- Label {
1449- id: songLabel
1450- elide: Text.ElideRight
1451- maximumLineCount: 1
1452- visible: text !== ""
1453- anchors { left: parent.left; right: parent.right }
1454- }
1455-
1456- Label {
1457- id: artistLabel
1458- elide: Text.ElideRight
1459- maximumLineCount: 1
1460- visible: text !== ""
1461- anchors { left: parent.left; right: parent.right }
1462- }
1463-
1464- Label {
1465- id: albumLabel
1466- elide: Text.ElideRight
1467- maximumLineCount: 1
1468- fontSize: "small"
1469- visible: text !== ""
1470- anchors { left: parent.left; right: parent.right }
1471- }
1472+ layout.visible: !albumLayout.visible
1473+ layout.objectName: "player"
1474+
1475+ slots: Image {
1476+ id: playerIcon
1477+ height: units.gu(5)
1478+ width: height
1479+ SlotsLayout.position: SlotsLayout.Leading
1480+ }
1481+
1482+ ListItemLayout {
1483+ id: albumLayout
1484+ objectName: "albumArt"
1485+ visible: showTrack
1486+ title.text: menu.song
1487+ subtitle.text: menu.artist
1488+ summary.text: menu.album
1489+
1490+ UbuntuShape {
1491+ width: units.gu(8)
1492+ height: width
1493+ SlotsLayout.position: SlotsLayout.Leading
1494+
1495+ image: Image {
1496+ id: albumArtImage
1497+ fillMode: Image.PreserveAspectFit
1498+ sourceSize: Qt.size(width, height)
1499+ anchors.fill: parent
1500 }
1501 }
1502 }
1503
1504=== modified file 'plugins/Ubuntu/Settings/Menus/ModemInfoItem.qml'
1505--- plugins/Ubuntu/Settings/Menus/ModemInfoItem.qml 2016-06-27 09:20:00 +0000
1506+++ plugins/Ubuntu/Settings/Menus/ModemInfoItem.qml 2016-10-24 11:26:32 +0000
1507@@ -12,18 +12,16 @@
1508 *
1509 * You should have received a copy of the GNU Lesser General Public License
1510 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1511+ *
1512+ * Author: Marco Trevisan <marco.trevisan@canonical.com>
1513 */
1514
1515 import QtQuick 2.4
1516 import QtQuick.Layouts 1.1
1517 import Ubuntu.Components 1.3
1518-import Ubuntu.Components.ListItems 1.3 as ListItem
1519
1520-ListItem.Empty {
1521+BaseMenu {
1522 id: menu
1523- implicitHeight: mainColumn.implicitHeight
1524- + mainColumn.anchors.topMargin
1525- + mainColumn.anchors.bottomMargin
1526
1527 property alias statusIcon: statusIcon.name
1528 property alias statusText: labelStatus.text
1529@@ -33,92 +31,94 @@
1530 property bool roaming: false
1531 signal unlock
1532
1533- ColumnLayout {
1534- id: mainColumn
1535- anchors.fill: parent
1536- anchors.margins: menu.__contentsMargins
1537- spacing: units.gu(0.5)
1538-
1539- Label {
1540- id: labelSimIdentifier
1541- elide: Text.ElideRight
1542- visible: text !== ""
1543- font.bold: true
1544- opacity: menu.locked ? 0.6 : 1.0
1545- }
1546-
1547- Row {
1548- id: statusRow
1549- spacing: units.gu(1)
1550-
1551- height: labelStatus.height
1552- width: parent.width
1553+ implicitHeight: slotsLayout.height + (divider.visible ? divider.height : 0)
1554+
1555+ SlotsLayout {
1556+ id: slotsLayout
1557+ objectName: "menuItemInfoSlotsLayout"
1558+
1559+ mainSlot: ColumnLayout {
1560+ spacing: units.gu(0.5)
1561
1562 Label {
1563- id: labelStatus
1564+ id: labelSimIdentifier
1565 elide: Text.ElideRight
1566- opacity: 0.6
1567- }
1568-
1569- Row {
1570- spacing: units.gu(0.5)
1571- height: parent.height
1572- Icon {
1573- id: statusIcon
1574- color: theme.palette.normal.backgroundText
1575-
1576- height: labelStatus.height
1577- width: height
1578-
1579- visible: name !== ""
1580- }
1581-
1582- Icon {
1583- id: iconConnectivity
1584- color: theme.palette.normal.backgroundText
1585-
1586- width: statusIcon.width // fix lp:1585645 by breaking the binding loop
1587- height: width
1588-
1589- visible: name !== ""
1590- }
1591- }
1592-
1593- Row {
1594- spacing: units.gu(0.5)
1595- height: parent.height
1596+ visible: text !== ""
1597+ font.bold: true
1598+ opacity: menu.locked ? 0.6 : 1.0
1599+ }
1600+
1601+ Row {
1602+ id: statusRow
1603+ spacing: units.gu(1)
1604+ height: labelStatus.height
1605
1606 Label {
1607- id: labelRoaming
1608- visible: menu.roaming
1609+ id: labelStatus
1610 elide: Text.ElideRight
1611- fontSize: "x-small"
1612- text: i18n.dtr("ubuntu-settings-components", "Roaming")
1613 opacity: 0.6
1614 }
1615
1616- Icon {
1617- id: iconRoaming
1618- color: theme.palette.normal.backgroundText
1619- visible: menu.roaming
1620-
1621- height: labelStatus.height
1622- width: height
1623-
1624- name: "network-cellular-roaming"
1625- }
1626- }
1627- }
1628-
1629- Button {
1630- id: buttonUnlock
1631- objectName: "buttonUnlockSim"
1632- visible: menu.locked
1633-
1634- text: i18n.dtr("ubuntu-settings-components", "Unlock SIM")
1635- Layout.preferredWidth: implicitWidth + units.gu(5)
1636-
1637- onTriggered: menu.unlock()
1638+ Row {
1639+ spacing: units.gu(0.5)
1640+ height: parent.height
1641+ Icon {
1642+ id: statusIcon
1643+ color: theme.palette.normal.backgroundText
1644+
1645+ height: labelStatus.height
1646+ width: height
1647+
1648+ visible: name !== ""
1649+ }
1650+
1651+ Icon {
1652+ id: iconConnectivity
1653+ color: theme.palette.normal.backgroundText
1654+
1655+ width: statusIcon.width // fix lp:1585645 by breaking the binding loop
1656+ height: width
1657+
1658+ visible: name !== ""
1659+ }
1660+ }
1661+
1662+ Row {
1663+ spacing: units.gu(0.5)
1664+ height: parent.height
1665+
1666+ Label {
1667+ id: labelRoaming
1668+ visible: menu.roaming
1669+ elide: Text.ElideRight
1670+ fontSize: "x-small"
1671+ text: i18n.dtr("ubuntu-settings-components", "Roaming")
1672+ opacity: 0.6
1673+ }
1674+
1675+ Icon {
1676+ id: iconRoaming
1677+ color: theme.palette.normal.backgroundText
1678+ visible: menu.roaming
1679+
1680+ height: labelStatus.height
1681+ width: height
1682+
1683+ name: "network-cellular-roaming"
1684+ }
1685+ }
1686+ }
1687+
1688+ Button {
1689+ id: buttonUnlock
1690+ objectName: "buttonUnlockSim"
1691+ visible: menu.locked
1692+
1693+ text: i18n.dtr("ubuntu-settings-components", "Unlock SIM")
1694+ Layout.preferredWidth: implicitWidth + units.gu(5)
1695+
1696+ onTriggered: menu.unlock()
1697+ }
1698 }
1699 }
1700 }
1701
1702=== added file 'plugins/Ubuntu/Settings/Menus/PlaybackButton.qml'
1703--- plugins/Ubuntu/Settings/Menus/PlaybackButton.qml 1970-01-01 00:00:00 +0000
1704+++ plugins/Ubuntu/Settings/Menus/PlaybackButton.qml 2016-10-24 11:26:32 +0000
1705@@ -0,0 +1,44 @@
1706+/*
1707+ * Copyright 2016 Canonical Ltd.
1708+ *
1709+ * This program is free software; you can redistribute it and/or modify
1710+ * it under the terms of the GNU Lesser General Public License as published by
1711+ * the Free Software Foundation; version 3.
1712+ *
1713+ * This program is distributed in the hope that it will be useful,
1714+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1715+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1716+ * GNU Lesser General Public License for more details.
1717+ *
1718+ * You should have received a copy of the GNU Lesser General Public License
1719+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1720+ *
1721+ * Author: Marco Trevisan <marco.trevisan@canonical.com>
1722+ */
1723+
1724+import QtQuick 2.4
1725+import Ubuntu.Components 1.3
1726+
1727+AbstractButton {
1728+ id: button
1729+ objectName: "playbackButton"
1730+
1731+ property real size: units.gu(5)
1732+ property alias iconName: icon.name
1733+
1734+ width: size
1735+ height: width
1736+
1737+ Icon {
1738+ id: icon
1739+ anchors.fill: parent
1740+
1741+ name: button.name
1742+ enabled: button.enabled
1743+ color: {
1744+ if (!enabled)
1745+ return theme.palette.disabled.backgroundText;
1746+ return button.pressed ? theme.palette.highlighted.backgroundText : theme.palette.normal.backgroundText;
1747+ }
1748+ }
1749+}
1750
1751=== modified file 'plugins/Ubuntu/Settings/Menus/PlaybackItemMenu.qml'
1752--- plugins/Ubuntu/Settings/Menus/PlaybackItemMenu.qml 2016-02-11 11:23:02 +0000
1753+++ plugins/Ubuntu/Settings/Menus/PlaybackItemMenu.qml 2016-10-24 11:26:32 +0000
1754@@ -1,5 +1,5 @@
1755 /*
1756- * Copyright 2013 Canonical Ltd.
1757+ * Copyright 2013-2016 Canonical Ltd.
1758 *
1759 * This program is free software; you can redistribute it and/or modify
1760 * it under the terms of the GNU Lesser General Public License as published by
1761@@ -14,18 +14,16 @@
1762 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1763 *
1764 * Authored by Nick Dedekind <nick.dedekind@gmail.com>
1765+ * Marco Trevisan <marco.trevisan@canonical.com>
1766 */
1767
1768 import QtQuick 2.4
1769 import Ubuntu.Components 1.3
1770-import Ubuntu.Components.ListItems 1.3 as ListItem
1771-import QtQuick.Layouts 1.1
1772
1773-ListItem.Empty {
1774+BaseMenu {
1775 id: menu
1776
1777 property bool playing: false
1778-
1779 property bool canPlay: false
1780 property bool canGoNext: false
1781 property bool canGoPrevious: false
1782@@ -35,72 +33,34 @@
1783 signal previous()
1784
1785 highlightWhenPressed: false
1786- implicitHeight: layout.implicitHeight + units.gu(2)
1787+ implicitHeight: layout.height + (divider.visible ? divider.height : 0)
1788
1789- RowLayout {
1790+ SlotsLayout {
1791 id: layout
1792- anchors.centerIn: parent
1793- spacing: units.gu(3)
1794-
1795- Icon {
1796- objectName: "previousButton"
1797-
1798- Layout.preferredWidth: units.gu(5)
1799- Layout.preferredHeight: units.gu(5)
1800-
1801- source: "image://theme/media-skip-backward"
1802- color: {
1803- if (!enabled)
1804- return theme.palette.disabled.backgroundText;
1805- return prevMA.pressed ? theme.palette.highlighted.backgroundText : theme.palette.normal.backgroundText;
1806- }
1807- enabled: canGoPrevious
1808-
1809- MouseArea {
1810- id: prevMA
1811- anchors.fill: parent
1812+ objectName: "playbackMenuLayout"
1813+
1814+ Row {
1815+ anchors.centerIn: parent
1816+ spacing: units.gu(3)
1817+
1818+ PlaybackButton {
1819+ objectName: "previousButton"
1820+ iconName: "media-skip-backward"
1821+ enabled: canGoPrevious
1822 onClicked: menu.previous()
1823 }
1824- }
1825-
1826- Icon {
1827- objectName: "playButton"
1828-
1829- Layout.preferredWidth: units.gu(5)
1830- Layout.preferredHeight: units.gu(5)
1831-
1832- source: playing ? "image://theme/media-playback-pause" : "image://theme/media-playback-start"
1833- color: {
1834- if (!enabled)
1835- return theme.palette.disabled.backgroundText;
1836- return playMA.pressed ? theme.palette.highlighted.backgroundText : theme.palette.normal.backgroundText;
1837- }
1838- enabled: canPlay
1839-
1840- MouseArea {
1841- id: playMA
1842- anchors.fill: parent
1843+
1844+ PlaybackButton {
1845+ objectName: "playButton"
1846+ iconName: playing ? "media-playback-pause" : "media-playback-start"
1847+ enabled: canPlay
1848 onClicked: menu.play(!playing)
1849 }
1850- }
1851-
1852- Icon {
1853- objectName: "nextButton"
1854-
1855- Layout.preferredWidth: units.gu(5)
1856- Layout.preferredHeight: units.gu(5)
1857-
1858- source: "image://theme/media-skip-forward"
1859- color: {
1860- if (!enabled)
1861- return theme.palette.disabled.backgroundText;
1862- return nextMA.pressed ? theme.palette.highlighted.backgroundText : theme.palette.normal.backgroundText;
1863- }
1864- enabled: canGoNext
1865-
1866- MouseArea {
1867- id: nextMA
1868- anchors.fill: parent
1869+
1870+ PlaybackButton {
1871+ objectName: "nextButton"
1872+ iconName: "media-skip-forward"
1873+ enabled: canGoNext
1874 onClicked: menu.next()
1875 }
1876 }
1877
1878=== modified file 'plugins/Ubuntu/Settings/Menus/ProgressBarMenu.qml'
1879--- plugins/Ubuntu/Settings/Menus/ProgressBarMenu.qml 2016-02-11 11:23:02 +0000
1880+++ plugins/Ubuntu/Settings/Menus/ProgressBarMenu.qml 2016-10-24 11:26:32 +0000
1881@@ -1,5 +1,5 @@
1882 /*
1883- * Copyright 2013 Canonical Ltd.
1884+ * Copyright 2013-2016 Canonical Ltd.
1885 *
1886 * This program is free software; you can redistribute it and/or modify
1887 * it under the terms of the GNU Lesser General Public License as published by
1888@@ -14,28 +14,28 @@
1889 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1890 *
1891 * Authored by Andrea Cimitan <andrea.cimitan@canonical.com>
1892+ * Marco Trevisan <marco.trevisan@canonical.com>
1893 */
1894
1895 import QtQuick 2.4
1896 import Ubuntu.Components 1.3
1897-import Ubuntu.Components.ListItems 1.3 as ListItem
1898
1899 StandardMenu {
1900 id: menu
1901- property bool indeterminate: false
1902- property real minimumValue: 0.0
1903- property real maximumValue: 1.0
1904- property real value: 0.0
1905+ property alias indeterminate: progressBar.indeterminate
1906+ property alias minimumValue: progressBar.minimumValue
1907+ property alias maximumValue: progressBar.maximumValue
1908+ property alias value: progressBar.value
1909
1910- component: Component {
1911+ slots: [
1912 ProgressBar {
1913 id: progressBar
1914 width: units.gu(20)
1915
1916- indeterminate: menu.indeterminate
1917- minimumValue: menu.minimumValue
1918- maximumValue: menu.maximumValue
1919- value: menu.value
1920+ indeterminate: false
1921+ minimumValue: 0.0
1922+ maximumValue: 1.0
1923+ value: 0.0
1924 }
1925- }
1926+ ]
1927 }
1928
1929=== modified file 'plugins/Ubuntu/Settings/Menus/ProgressValueMenu.qml'
1930--- plugins/Ubuntu/Settings/Menus/ProgressValueMenu.qml 2016-03-11 13:20:13 +0000
1931+++ plugins/Ubuntu/Settings/Menus/ProgressValueMenu.qml 2016-10-24 11:26:32 +0000
1932@@ -1,5 +1,5 @@
1933 /*
1934- * Copyright 2013 Canonical Ltd.
1935+ * Copyright 2013-2016 Canonical Ltd.
1936 *
1937 * This program is free software; you can redistribute it and/or modify
1938 * it under the terms of the GNU Lesser General Public License as published by
1939@@ -15,6 +15,7 @@
1940 *
1941 * Authors:
1942 * Nick Dedekind <nick.dedekind@canonical.com>
1943+ * Marco Trevisan <marco.trevisan@canonical.com>
1944 */
1945
1946 import QtQuick 2.4
1947@@ -23,9 +24,9 @@
1948 StandardMenu {
1949 id: menuItem
1950
1951- property int value : 0.0
1952+ property int value : 0
1953
1954- component: Component {
1955+ slots: [
1956 Label {
1957 id: progress
1958 objectName: "progress"
1959@@ -34,5 +35,5 @@
1960 fontSize: "medium"
1961 color: menuItem.foregroundColor
1962 }
1963- }
1964+ ]
1965 }
1966
1967=== modified file 'plugins/Ubuntu/Settings/Menus/SectionMenu.qml'
1968--- plugins/Ubuntu/Settings/Menus/SectionMenu.qml 2016-02-11 11:23:02 +0000
1969+++ plugins/Ubuntu/Settings/Menus/SectionMenu.qml 2016-10-24 11:26:32 +0000
1970@@ -1,5 +1,5 @@
1971 /*
1972- * Copyright 2013 Canonical Ltd.
1973+ * Copyright 2013-2016 Canonical Ltd.
1974 *
1975 * This program is free software; you can redistribute it and/or modify
1976 * it under the terms of the GNU Lesser General Public License as published by
1977@@ -15,27 +15,23 @@
1978 *
1979 * Authors:
1980 * Renato Araujo Oliveira Filho <renato@canonical.com>
1981+ * Marco Trevisan <marco.trevisan@canonical.com>
1982 */
1983
1984 import QtQuick 2.4
1985 import Ubuntu.Components 1.3
1986-import Ubuntu.Components.ListItems 1.3 as ListItem
1987
1988-ListItem.Header {
1989+StandardMenu {
1990 id: menuItem
1991 property alias busy: indicator.running
1992- __foregroundColor: theme.palette.normal.backgroundText
1993-
1994- ActivityIndicator {
1995+
1996+ divider.visible: true
1997+ foregroundColor: theme.palette.normal.backgroundText
1998+
1999+ slots: ActivityIndicator {
2000 id: indicator
2001 objectName: "indicator"
2002
2003- anchors {
2004- margins: units.gu(0.5)
2005- right: parent.right
2006- }
2007- height: parent.height - (anchors.margins * 2)
2008 width: height
2009- anchors.verticalCenter: parent.verticalCenter
2010 }
2011 }
2012
2013=== modified file 'plugins/Ubuntu/Settings/Menus/SeparatorMenu.qml'
2014--- plugins/Ubuntu/Settings/Menus/SeparatorMenu.qml 2016-02-11 11:23:02 +0000
2015+++ plugins/Ubuntu/Settings/Menus/SeparatorMenu.qml 2016-10-24 11:26:32 +0000
2016@@ -16,9 +16,10 @@
2017 */
2018
2019 import QtQuick 2.4
2020-import Ubuntu.Components.ListItems 1.3 as ListItem
2021+import Ubuntu.Components 1.3
2022+import Ubuntu.Components.ListItems 1.3 as ListItems
2023
2024-ListItem.Empty {
2025- __height: units.gu(1)
2026- highlightWhenPressed: false
2027+// XXX: this uses the deprecated ListItems components, to be redesigned.
2028+ListItems.ThinDivider {
2029+ height: units.dp(1)
2030 }
2031
2032=== modified file 'plugins/Ubuntu/Settings/Menus/SimpleMessageMenu.qml'
2033--- plugins/Ubuntu/Settings/Menus/SimpleMessageMenu.qml 2016-02-11 11:23:02 +0000
2034+++ plugins/Ubuntu/Settings/Menus/SimpleMessageMenu.qml 2016-10-24 11:26:32 +0000
2035@@ -1,5 +1,5 @@
2036 /*
2037- * Copyright 2013 Canonical Ltd.
2038+ * Copyright 2013-2016 Canonical Ltd.
2039 *
2040 * This program is free software; you can redistribute it and/or modify
2041 * it under the terms of the GNU Lesser General Public License as published by
2042@@ -16,20 +16,19 @@
2043 * Authors:
2044 * Renato Araujo Oliveira Filho <renato@canonical.com>
2045 * Olivier Tilloy <olivier.tilloy@canonical.com>
2046+ * Marco Trevisan <marco.trevisan@canonical.com>
2047 */
2048
2049 import QtQuick 2.4
2050 import Ubuntu.Components 1.3
2051-import Ubuntu.Components.ListItems 1.3 as ListItem
2052 import Ubuntu.Settings.Components 0.1 as USC
2053-import QtQuick.Layouts 1.1
2054
2055-ListItem.Empty {
2056+BaseMenu {
2057 id: menu
2058
2059- property alias title: messageHeader.title
2060+ property string title
2061+ property string body
2062 property alias time: messageHeader.time
2063- property alias body: messageHeader.body
2064
2065 property url avatar
2066 property url icon
2067@@ -37,47 +36,43 @@
2068 signal iconActivated
2069 signal dismissed
2070
2071- property alias footer: footerLoader.sourceComponent
2072+ property alias footer: footerContainer.children
2073 property real _animationDuration: UbuntuAnimation.FastDuration
2074
2075- __height: layout.implicitHeight + units.gu(3)
2076- clip: heightAnimation.running
2077+ height: layout.height + (divider.visible ? divider.height : 0)
2078+ clip: leadingActions || trailingActions || heightAnimation.running
2079
2080- ColumnLayout {
2081+ Column {
2082 id: layout
2083-
2084- anchors {
2085- left: parent.left
2086- right: parent.right
2087- leftMargin: units.gu(2)
2088- rightMargin: units.gu(2)
2089- top: parent.top
2090- topMargin: units.gu(1.5)
2091- }
2092- spacing: units.gu(1.5)
2093+ anchors { right: parent.right; left: parent.left }
2094
2095 USC.MessageHeader {
2096 id: messageHeader
2097- Layout.fillWidth: true
2098- Layout.alignment: Qt.AlignTop
2099
2100 avatar: menu.avatar != "" ? menu.avatar : "image://theme/contact"
2101 icon: menu.icon != "" ? menu.icon : "image://theme/message"
2102-
2103 state: menu.state
2104+ title.text: menu.title
2105+ body.text: menu.body
2106
2107 onIconClicked: {
2108 menu.iconActivated();
2109 }
2110 }
2111
2112- Loader {
2113- id: footerLoader
2114+ Item {
2115+ id: footerContainer
2116+ anchors { right: parent.right; left: parent.left }
2117+ width: childrenRect.width
2118+ height: childrenRect.height
2119 visible: menu.state === "expanded"
2120- opacity: 0.0
2121- asynchronous: false
2122- Layout.fillWidth: true
2123- Layout.fillHeight: true
2124+ opacity: 0
2125+
2126+ Behavior on opacity {
2127+ NumberAnimation {
2128+ duration: _animationDuration
2129+ }
2130+ }
2131 }
2132 }
2133
2134@@ -89,21 +84,20 @@
2135 }
2136 }
2137
2138- onTriggered: if (!footer || !selected) messageHeader.shakeIcon();
2139+ onTriggered: if (!selected) messageHeader.shakeIcon();
2140
2141 states: State {
2142 name: "expanded"
2143- when: selected && footerLoader.status == Loader.Ready
2144+ when: selected
2145
2146 PropertyChanges {
2147- target: footerLoader
2148+ target: footerContainer
2149 opacity: 1.0
2150 }
2151- }
2152
2153- transitions: Transition {
2154- ParallelAnimation {
2155- PropertyAnimation { target: footerLoader; property: "opacity"; duration: _animationDuration }
2156+ PropertyChanges {
2157+ target: menu
2158+ color: highlightColor
2159 }
2160 }
2161
2162
2163=== modified file 'plugins/Ubuntu/Settings/Menus/SliderMenu.qml'
2164--- plugins/Ubuntu/Settings/Menus/SliderMenu.qml 2016-02-11 11:23:02 +0000
2165+++ plugins/Ubuntu/Settings/Menus/SliderMenu.qml 2016-10-24 11:26:32 +0000
2166@@ -1,5 +1,5 @@
2167 /*
2168- * Copyright 2013 Canonical Ltd.
2169+ * Copyright 2013-2016 Canonical Ltd.
2170 *
2171 * This program is free software; you can redistribute it and/or modify
2172 * it under the terms of the GNU Lesser General Public License as published by
2173@@ -14,23 +14,27 @@
2174 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2175 *
2176 * Authored by Andrea Cimitan <andrea.cimitan@canonical.com>
2177+ * Marco Trevisan <marco.trevisan@canonical.com>
2178 */
2179
2180 import QtQuick 2.4
2181 import Ubuntu.Components 1.3
2182-import Ubuntu.Components.ListItems 1.3 as ListItem
2183
2184-ListItem.Empty {
2185+BaseMenu {
2186 id: menu
2187
2188 property alias minimumValue: slider.minimumValue
2189 property alias maximumValue: slider.maximumValue
2190 property alias live: slider.live
2191+ property alias text: label.text
2192 property double value: 0.0
2193
2194 property alias minIcon: leftButton.source
2195 property alias maxIcon: rightButton.source
2196
2197+ // These fields are for retro-compatibility with ListItem.Empty
2198+ property string iconSource
2199+
2200 signal updated(real value)
2201
2202 property QtObject d: QtObject {
2203@@ -93,64 +97,29 @@
2204 }
2205 }
2206
2207- implicitHeight: column.height + units.gu(1.5)
2208+ implicitHeight: slotsLayout.height + (divider.visible ? divider.height : 0)
2209+ highlightWhenPressed: false
2210
2211 Column {
2212 id: column
2213- anchors {
2214- verticalCenter: parent.verticalCenter
2215- left: parent.left
2216- right: parent.right
2217- leftMargin: menu.__contentsMargins
2218- rightMargin: menu.__contentsMargins
2219- }
2220- height: childrenRect.height
2221- spacing: units.gu(0.5)
2222+ anchors.fill: parent
2223+ anchors.topMargin: units.gu(0.5)
2224+ spacing: -units.gu(1.5)
2225
2226 Label {
2227 id: label
2228- text: menu.text
2229- anchors {
2230- left: parent.left
2231- right: parent.right
2232- }
2233 visible: text != ""
2234+ x: Qt.application.layoutDirection == Qt.LeftToRight ?
2235+ leftButton.x : rightButton.x + rightButton.width - width
2236 }
2237
2238- Item {
2239- id: row
2240- anchors {
2241- left: parent.left
2242- right: parent.right
2243- }
2244- height: slider.height
2245-
2246- Icon {
2247- id: leftButton
2248- objectName: "leftButton"
2249- visible: source != ""
2250- anchors.left: row.left
2251- anchors.verticalCenter: row.verticalCenter
2252- height: slider.height - units.gu(2)
2253- width: height
2254- color: theme.palette.normal.backgroundText
2255-
2256- MouseArea {
2257- anchors.fill: parent
2258- onClicked: slider.value = slider.minimumValue
2259- }
2260-
2261- }
2262-
2263- Slider {
2264+ SlotsLayout {
2265+ id: slotsLayout
2266+ objectName: "sliderMenuSlotsLayout"
2267+
2268+ mainSlot: Slider {
2269 id: slider
2270 objectName: "slider"
2271- anchors {
2272- left: leftButton.visible ? leftButton.right : row.left
2273- right: rightButton.visible ? rightButton.left : row.right
2274- leftMargin: leftButton.visible ? units.gu(0.5) : 0
2275- rightMargin: rightButton.visible ? units.gu(0.5) : 0
2276- }
2277 live: true
2278
2279 Component.onCompleted: {
2280@@ -182,19 +151,39 @@
2281 }
2282
2283 Icon {
2284+ id: leftButton
2285+ objectName: "leftButton"
2286+ visible: source !== ""
2287+ height: slider.height - units.gu(2)
2288+ width: height
2289+ color: theme.palette.normal.backgroundText
2290+
2291+ AbstractButton {
2292+ anchors.fill: parent
2293+ onClicked: slider.value = slider.minimumValue
2294+ }
2295+
2296+ SlotsLayout.position: SlotsLayout.Leading
2297+ SlotsLayout.overrideVerticalPositioning: true
2298+ anchors.verticalCenter: slider.verticalCenter
2299+ }
2300+
2301+ Icon {
2302 id: rightButton
2303 objectName: "rightButton"
2304- visible: source != ""
2305- anchors.right: row.right
2306- anchors.verticalCenter: row.verticalCenter
2307+ visible: source !== ""
2308 height: slider.height - units.gu(2)
2309 width: height
2310 color: theme.palette.normal.backgroundText
2311
2312- MouseArea {
2313+ AbstractButton {
2314 anchors.fill: parent
2315 onClicked: slider.value = slider.maximumValue
2316 }
2317+
2318+ SlotsLayout.position: SlotsLayout.Trailing
2319+ SlotsLayout.overrideVerticalPositioning: true
2320+ anchors.verticalCenter: slider.verticalCenter
2321 }
2322 }
2323 }
2324
2325=== modified file 'plugins/Ubuntu/Settings/Menus/SnapDecisionMenu.qml'
2326--- plugins/Ubuntu/Settings/Menus/SnapDecisionMenu.qml 2016-02-11 11:23:02 +0000
2327+++ plugins/Ubuntu/Settings/Menus/SnapDecisionMenu.qml 2016-10-24 11:26:32 +0000
2328@@ -1,5 +1,5 @@
2329 /*
2330- * Copyright 2013 Canonical Ltd.
2331+ * Copyright 2013-2016 Canonical Ltd.
2332 *
2333 * This program is free software; you can redistribute it and/or modify
2334 * it under the terms of the GNU Lesser General Public License as published by
2335@@ -16,23 +16,23 @@
2336 * Authors:
2337 * Renato Araujo Oliveira Filho <renato@canonical.com>
2338 * Olivier Tilloy <olivier.tilloy@canonical.com>
2339+ * Marco Trevisan <marco.trevisan@canonical.com>
2340 */
2341
2342 import QtQuick 2.4
2343 import Ubuntu.Components 1.3
2344 import Ubuntu.Settings.Components 0.1 as USC
2345-import QtQuick.Layouts 1.1
2346
2347 SimpleMessageMenu {
2348 id: menu
2349
2350- property bool actionEnabled: true
2351- property string actionButtonText: i18n.dtr("ubuntu-settings-components", "Call back")
2352+ property alias actionEnabled: actionButton.enabled
2353+ property alias actionButtonText: actionButton.text
2354
2355- property bool replyEnabled: true
2356- property string replyButtonText: i18n.dtr("ubuntu-settings-components", "Send")
2357- property string replyHintText
2358- property bool replyExpanded: false
2359+ property alias replyEnabled: reply.activateEnabled
2360+ property alias replyButtonText: reply.buttonText
2361+ property alias replyHintText: reply.textHint
2362+ property alias replyExpanded: reply.visible
2363
2364 signal actionActivated
2365 signal replied(string value)
2366@@ -40,39 +40,46 @@
2367 footer: Item {
2368 id: buttons
2369
2370- implicitHeight: layout.implicitHeight
2371+ implicitHeight: layout.height
2372+ anchors { right: parent.right; left: parent.left }
2373
2374- ColumnLayout {
2375+ Column {
2376 id: layout
2377 anchors {
2378 left: parent.left
2379 right: parent.right
2380 }
2381- spacing: units.gu(1)
2382-
2383- RowLayout {
2384- spacing: units.gu(2)
2385-
2386- Button {
2387- objectName: "messageButton"
2388- text: i18n.dtr("ubuntu-settings-components", "Message")
2389- Layout.fillWidth: true
2390-
2391- onClicked: {
2392- menu.replyExpanded = !menu.replyExpanded;
2393+
2394+ SlotsLayout {
2395+ id: slotsLayout
2396+ padding.top: 0
2397+
2398+ mainSlot: Row {
2399+ id: row
2400+ spacing: units.gu(2)
2401+
2402+ Button { id:foobutt
2403+ objectName: "messageButton"
2404+ text: i18n.dtr("ubuntu-settings-components", "Message")
2405+
2406+ onClicked: {
2407+ menu.replyExpanded = !menu.replyExpanded;
2408+ }
2409+
2410+ width: actionButton.width
2411 }
2412- }
2413-
2414- Button {
2415- id: actionButton
2416- objectName: "actionButton"
2417- enabled: menu.actionEnabled
2418- text: actionButtonText
2419- color: enabled ? theme.palette.normal.positive : theme.palette.disabled.positive
2420- Layout.fillWidth: true
2421-
2422- onClicked: {
2423- menu.actionActivated();
2424+
2425+ Button {
2426+ id: actionButton
2427+ objectName: "actionButton"
2428+ text: i18n.dtr("ubuntu-settings-components", "Call back")
2429+ color: enabled ? theme.palette.normal.positive : theme.palette.disabled.positive
2430+
2431+ onClicked: {
2432+ menu.actionActivated();
2433+ }
2434+
2435+ width: (parent.width - row.spacing) / 2
2436 }
2437 }
2438 }
2439@@ -80,13 +87,9 @@
2440 USC.ActionTextField {
2441 id: reply
2442
2443- Layout.fillWidth: true
2444- Layout.fillHeight: true
2445- visible: menu.replyExpanded
2446-
2447- activateEnabled: menu.replyEnabled
2448- buttonText: menu.replyButtonText
2449- textHint: menu.replyHintText
2450+ visible: false
2451+ activateEnabled: true
2452+ buttonText: i18n.dtr("ubuntu-settings-components", "Send")
2453
2454 onActivated: {
2455 menu.replied(value);
2456
2457=== added file 'plugins/Ubuntu/Settings/Menus/StandardMenu.qml'
2458--- plugins/Ubuntu/Settings/Menus/StandardMenu.qml 1970-01-01 00:00:00 +0000
2459+++ plugins/Ubuntu/Settings/Menus/StandardMenu.qml 2016-10-24 11:26:32 +0000
2460@@ -0,0 +1,40 @@
2461+/*
2462+ * Copyright 2016 Canonical Ltd.
2463+ *
2464+ * This program is free software; you can redistribute it and/or modify
2465+ * it under the terms of the GNU Lesser General Public License as published by
2466+ * the Free Software Foundation; version 3.
2467+ *
2468+ * This program is distributed in the hope that it will be useful,
2469+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2470+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2471+ * GNU Lesser General Public License for more details.
2472+ *
2473+ * You should have received a copy of the GNU Lesser General Public License
2474+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2475+ *
2476+ * Author: Marco Trevisan <marco.trevisan@canonical.com>
2477+ */
2478+
2479+import QtQuick 2.4
2480+import Ubuntu.Components 1.3
2481+
2482+BaseLayoutMenu {
2483+ id: menu
2484+
2485+ property alias iconSource: icon.source
2486+ property alias iconName: icon.name
2487+ property alias iconSize: icon.height
2488+ property alias iconColor: icon.color
2489+ property alias icon: icon
2490+
2491+ slots: Icon {
2492+ id: icon
2493+ objectName: "standardMenuIcon"
2494+ color: theme.palette.normal.backgroundText
2495+ visible: source != ""
2496+ height: units.gu(3)
2497+ width: height
2498+ SlotsLayout.position: SlotsLayout.Leading
2499+ }
2500+}
2501
2502=== modified file 'plugins/Ubuntu/Settings/Menus/SwitchMenu.qml'
2503--- plugins/Ubuntu/Settings/Menus/SwitchMenu.qml 2016-02-11 11:23:02 +0000
2504+++ plugins/Ubuntu/Settings/Menus/SwitchMenu.qml 2016-10-24 11:26:32 +0000
2505@@ -1,5 +1,4 @@
2506-/*
2507- * Copyright 2013 Canonical Ltd.
2508+/* Copyright 2013-2016 Canonical Ltd.
2509 *
2510 * This program is free software; you can redistribute it and/or modify
2511 * it under the terms of the GNU Lesser General Public License as published by
2512@@ -15,6 +14,7 @@
2513 *
2514 * Authors:
2515 * Nick Dedekind <nick.dedekind@canonical.com>
2516+ * Marco Trevisan <marco.trevisan@canonical.com>
2517 */
2518
2519 import QtQuick 2.4
2520@@ -23,48 +23,18 @@
2521 StandardMenu {
2522 id: menu
2523
2524- property bool checked: false
2525-
2526- onClicked: menu.checked = !menu.checked
2527-
2528- component: Component {
2529+ property alias checked: switcher.checked
2530+
2531+ function onClickedCallback() {
2532+ checked = !checked
2533+ menu.triggered(checked)
2534+ }
2535+
2536+ slots: [
2537 Switch {
2538 id: switcher
2539 objectName: "switcher"
2540- property bool enableCheckConnection: true
2541-
2542- Component.onCompleted: {
2543- checked = menu.checked;
2544- }
2545-
2546- // FIXME : create a bi-directional feedback component
2547- onCheckedChanged: {
2548- if (!enableCheckConnection) {
2549- return;
2550- }
2551- var oldEnable = enableCheckConnection;
2552- enableCheckConnection = false;
2553-
2554- menu.checked = checked;
2555- menu.triggered(menu.checked);
2556-
2557- enableCheckConnection = oldEnable;
2558- }
2559-
2560- Connections {
2561- target: menu
2562- onCheckedChanged: {
2563- if (!switcher.enableCheckConnection) {
2564- return;
2565- }
2566- var oldEnable = switcher.enableCheckConnection;
2567- switcher.enableCheckConnection = false;
2568-
2569- switcher.checked = menu.checked;
2570-
2571- switcher.enableCheckConnection = oldEnable;
2572- }
2573- }
2574+ onClicked: menu.triggered(checked)
2575 }
2576- }
2577+ ]
2578 }
2579
2580=== modified file 'plugins/Ubuntu/Settings/Menus/TextMessageMenu.qml'
2581--- plugins/Ubuntu/Settings/Menus/TextMessageMenu.qml 2016-02-11 11:23:02 +0000
2582+++ plugins/Ubuntu/Settings/Menus/TextMessageMenu.qml 2016-10-24 11:26:32 +0000
2583@@ -1,5 +1,5 @@
2584 /*
2585- * Copyright 2013 Canonical Ltd.
2586+ * Copyright 2013-2016 Canonical Ltd.
2587 *
2588 * This program is free software; you can redistribute it and/or modify
2589 * it under the terms of the GNU Lesser General Public License as published by
2590@@ -16,6 +16,7 @@
2591 * Authors:
2592 * Renato Araujo Oliveira Filho <renato@canonical.com>
2593 * Olivier Tilloy <olivier.tilloy@canonical.com>
2594+ * Marco Trevisan <marco.trevisan@canonical.com>
2595 */
2596
2597 import QtQuick 2.4
2598@@ -25,16 +26,16 @@
2599 SimpleMessageMenu {
2600 id: menu
2601
2602- property bool replyEnabled: true
2603- property string replyButtonText: i18n.dtr("ubuntu-settings-components", "Send")
2604- property string replyHintText
2605+ property alias replyEnabled: actionTextField.activateEnabled
2606+ property alias replyButtonText: actionTextField.buttonText
2607+ property alias replyHintText: actionTextField.textHint
2608
2609 signal replied(string value)
2610
2611 footer: USC.ActionTextField {
2612- activateEnabled: menu.replyEnabled
2613- buttonText: menu.replyButtonText
2614- textHint: menu.replyHintText
2615+ id: actionTextField
2616+ activateEnabled: true
2617+ buttonText: i18n.dtr("ubuntu-settings-components", "Send")
2618
2619 onActivated: {
2620 menu.replied(value);
2621
2622=== modified file 'plugins/Ubuntu/Settings/Menus/TimeZoneMenu.qml'
2623--- plugins/Ubuntu/Settings/Menus/TimeZoneMenu.qml 2016-02-11 11:23:02 +0000
2624+++ plugins/Ubuntu/Settings/Menus/TimeZoneMenu.qml 2016-10-24 11:26:32 +0000
2625@@ -18,19 +18,15 @@
2626
2627 import QtQuick 2.4
2628 import Ubuntu.Components 1.3
2629-import Ubuntu.Components.ListItems 1.3 as ListItem
2630
2631 StandardMenu {
2632 id: timeZoneMenu
2633
2634 property alias city: timeZoneMenu.text
2635- property string time
2636+ property alias time: timeLabel.text
2637
2638- component: Component {
2639- Label {
2640- id: timeLabel
2641- objectName: "timeLabel"
2642- text: time
2643- }
2644+ slots: Label {
2645+ id: timeLabel
2646+ objectName: "timeLabel"
2647 }
2648 }
2649
2650=== modified file 'plugins/Ubuntu/Settings/Menus/TransferMenu.qml'
2651--- plugins/Ubuntu/Settings/Menus/TransferMenu.qml 2016-02-11 11:23:02 +0000
2652+++ plugins/Ubuntu/Settings/Menus/TransferMenu.qml 2016-10-24 11:26:32 +0000
2653@@ -1,5 +1,5 @@
2654 /*
2655- * Copyright 2014 Canonical Ltd.
2656+ * Copyright 2014-2016 Canonical Ltd.
2657 *
2658 * This program is free software; you can redistribute it and/or modify
2659 * it under the terms of the GNU Lesser General Public License as published by
2660@@ -12,43 +12,40 @@
2661 *
2662 * You should have received a copy of the GNU Lesser General Public License
2663 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2664+ *
2665+ * Author: Marco Trevisan <marco.trevisan@canonical.com>
2666 */
2667
2668 import QtQuick 2.4
2669 import QtQuick.Layouts 1.1
2670 import Ubuntu.Components 1.3
2671-import Ubuntu.Components.ListItems 1.3 as ListItem
2672 import Ubuntu.Settings.Components 0.1
2673
2674-ListItem.Empty {
2675+BaseMenu {
2676 id: menu
2677
2678 property alias iconSource: icon.source
2679 property alias text: label.text
2680 property alias stateText: stateLabel.text
2681 property alias progress: progressBar.value
2682+ property alias maximum: progressBar.maximumValue
2683 property bool active: false
2684
2685- property alias maximum: progressBar.maximumValue
2686-
2687- __height: row.height + units.gu(2)
2688-
2689- RowLayout {
2690- id: row
2691- anchors {
2692- left: parent.left
2693- right: parent.right
2694- verticalCenter: parent.verticalCenter
2695- leftMargin: menu.__contentsMargins
2696- rightMargin: menu.__contentsMargins
2697- }
2698- spacing: units.gu(2)
2699-
2700- UbuntuShapeForItem {
2701- Layout.preferredWidth: units.gu(6)
2702- Layout.preferredHeight: units.gu(6)
2703-
2704- image: icon
2705+ implicitHeight: slotsLayout.height + (divider.visible ? divider.height : 0)
2706+
2707+ SlotsLayout {
2708+ id: slotsLayout
2709+ objectName: "transferMenuSlotsLayout"
2710+
2711+ UbuntuShape {
2712+ SlotsLayout.position: SlotsLayout.Leading
2713+ width: units.gu(6)
2714+ height: width
2715+
2716+ source: ShaderEffectSource {
2717+ sourceItem: icon
2718+ hideSource: true
2719+ }
2720 Icon {
2721 id: icon
2722 objectName: "icon"
2723@@ -62,14 +59,13 @@
2724 }
2725 }
2726
2727- ColumnLayout {
2728+ mainSlot: Column {
2729 spacing: units.gu(0.5)
2730
2731 Label {
2732 id: label
2733 objectName: "text"
2734- Layout.fillWidth: true
2735-
2736+ anchors { left: parent.left; right: parent.right }
2737 elide: Text.ElideRight
2738 maximumLineCount: 1
2739 font.weight: Font.DemiBold
2740@@ -78,20 +74,18 @@
2741 ProgressBar {
2742 id: progressBar
2743 objectName: "progress"
2744+ anchors { left: parent.left; right: parent.right }
2745 visible: menu.active
2746 value: 0.0
2747 showProgressPercentage: false
2748-
2749- Layout.preferredHeight: units.gu(1)
2750- Layout.fillWidth: true
2751+ height: units.gu(1)
2752 }
2753
2754 Label {
2755 id: stateLabel
2756 objectName: "stateText"
2757- Layout.fillWidth: true
2758+ anchors { left: parent.left; right: parent.right }
2759 visible: menu.active
2760-
2761 fontSize: "x-small"
2762 elide: Text.ElideRight
2763 maximumLineCount: 1
2764
2765=== modified file 'plugins/Ubuntu/Settings/Menus/UserSessionMenu.qml'
2766--- plugins/Ubuntu/Settings/Menus/UserSessionMenu.qml 2016-02-11 11:23:02 +0000
2767+++ plugins/Ubuntu/Settings/Menus/UserSessionMenu.qml 2016-10-24 11:26:32 +0000
2768@@ -1,5 +1,5 @@
2769 /*
2770- * Copyright 2013 Canonical Ltd.
2771+ * Copyright 2013-2016 Canonical Ltd.
2772 *
2773 * This program is free software; you can redistribute it and/or modify
2774 * it under the terms of the GNU Lesser General Public License as published by
2775@@ -14,41 +14,36 @@
2776 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2777 *
2778 * Authored by Andrea Cimitan <andrea.cimitan@canonical.com>
2779+ * Marco Trevisan <marco.trevisan@canonical.com>
2780 */
2781
2782 import QtQuick 2.4
2783 import Ubuntu.Components 1.3
2784-import Ubuntu.Components.ListItems 1.3 as ListItem
2785
2786 StandardMenu {
2787 id: userSessionMenu
2788
2789 property alias name: userSessionMenu.text
2790- property bool active: false
2791+ property alias active: activeIcon.visible
2792
2793- component: Component {
2794+ slots: [
2795 Rectangle {
2796 id: activeIcon
2797 objectName: "activeIcon"
2798- implicitWidth: checkMark.width + units.gu(1.5)
2799- implicitHeight: checkMark.height + units.gu(1.5)
2800+ implicitWidth: checkMark.width + units.gu(1)
2801+ implicitHeight: checkMark.height + units.gu(1)
2802 radius: width / 2
2803 antialiasing: true
2804 color: theme.palette.normal.backgroundText
2805- visible: userSessionMenu.active
2806+ visible: false
2807
2808- Image {
2809+ Icon {
2810 id: checkMark
2811- source: "image://theme/tick"
2812+ name: "tick"
2813 height: units.gu(2)
2814 width: height
2815 anchors.centerIn: parent
2816-
2817- sourceSize {
2818- height: height
2819- width: width
2820- }
2821 }
2822 }
2823- }
2824+ ]
2825 }
2826
2827=== modified file 'plugins/Ubuntu/Settings/Menus/qmldir'
2828--- plugins/Ubuntu/Settings/Menus/qmldir 2016-01-27 13:13:15 +0000
2829+++ plugins/Ubuntu/Settings/Menus/qmldir 2016-10-24 11:26:32 +0000
2830@@ -3,6 +3,8 @@
2831 typeinfo Menus.qmltypes
2832
2833 AccessPointMenu 0.1 AccessPointMenu.qml
2834+BaseMenu 0.1 BaseMenu.qml
2835+BaseLayoutMenu 0.1 BaseLayoutMenu.qml
2836 ButtonMenu 0.1 ButtonMenu.qml
2837 CalendarMenu 0.1 CalendarMenu.qml
2838 CheckableMenu 0.1 CheckableMenu.qml
2839
2840=== modified file 'tests/qmltests/CMakeLists.txt'
2841--- tests/qmltests/CMakeLists.txt 2016-08-17 15:05:26 +0000
2842+++ tests/qmltests/CMakeLists.txt 2016-10-24 11:26:32 +0000
2843@@ -1,9 +1,11 @@
2844 add_subdirectory(mocks)
2845
2846+add_usc_qmltest(Components ActionTextField)
2847 add_usc_qmltest(Components Calendar)
2848 add_usc_qmltest(Components ServerPropertySynchroniser)
2849
2850 add_usc_qmltest(Menus AccessPointMenu)
2851+add_usc_qmltest(Menus BaseMenu)
2852 add_usc_qmltest(Menus ButtonMenu)
2853 add_usc_qmltest(Menus CalendarMenu)
2854 add_usc_qmltest(Menus CheckableMenu)
2855@@ -17,6 +19,7 @@
2856 add_usc_qmltest(Menus SimpleMessageMenu)
2857 add_usc_qmltest(Menus SliderMenu)
2858 add_usc_qmltest(Menus SnapDecisionMenu)
2859+add_usc_qmltest(Menus StandardMenu)
2860 add_usc_qmltest(Menus SwitchMenu)
2861 add_usc_qmltest(Menus UserSessionMenu)
2862 add_usc_qmltest(Menus TextMessageMenu)
2863
2864=== added file 'tests/qmltests/Components/tst_ActionTextField.qml'
2865--- tests/qmltests/Components/tst_ActionTextField.qml 1970-01-01 00:00:00 +0000
2866+++ tests/qmltests/Components/tst_ActionTextField.qml 2016-10-24 11:26:32 +0000
2867@@ -0,0 +1,103 @@
2868+/*
2869+ * Copyright 2016 Canonical Ltd.
2870+ *
2871+ * This program is free software; you can redistribute it and/or modify
2872+ * it under the terms of the GNU Lesser General Public License as published by
2873+ * the Free Software Foundation; version 3.
2874+ *
2875+ * This program is distributed in the hope that it will be useful,
2876+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2877+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2878+ * GNU Lesser General Public License for more details.
2879+ *
2880+ * You should have received a copy of the GNU Lesser General Public License
2881+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2882+ *
2883+ * Authored by Marco Trevisan <marco.trevisan@canonical.com>
2884+ */
2885+
2886+import QtQuick 2.4
2887+import QtTest 1.0
2888+import Ubuntu.Test 0.1
2889+import Ubuntu.Settings.Components 0.1
2890+
2891+Item {
2892+ width: units.gu(42)
2893+ height: units.gu(75)
2894+
2895+ Flickable {
2896+ anchors.fill: parent
2897+
2898+ ActionTextField {
2899+ id: actionField
2900+ text: "Message"
2901+ buttonText: "Send!"
2902+ }
2903+ }
2904+
2905+ SignalSpy {
2906+ id: activatedSignalSpy
2907+ target: actionField
2908+ signalName: "activated"
2909+ }
2910+
2911+ UbuntuTestCase {
2912+ name: "ActionTextField"
2913+ when: windowShown
2914+
2915+ property QtObject replyText
2916+ property QtObject sendButton
2917+
2918+ function init() {
2919+ replyText = findChild(actionField, "replyText");
2920+ verify(replyText !== undefined)
2921+
2922+ sendButton = findChild(actionField, "sendButton");
2923+ verify(sendButton !== undefined)
2924+ }
2925+
2926+ function cleanup() {
2927+ activatedSignalSpy.clear()
2928+ }
2929+
2930+ function test_replyText() {
2931+ actionField.text = "FoooBar"
2932+ compare(replyText.text, "FoooBar")
2933+ }
2934+
2935+ function test_replyTextLosesFocusOnDisabled() {
2936+ mouseClick(replyText, replyText.width/2, replyText.height/2)
2937+ compare(replyText.focus, true)
2938+
2939+ replyText.enabled = false
2940+ compare(replyText.focus, false)
2941+ }
2942+
2943+ function test_buttonText() {
2944+ actionField.buttonText = "BarBar"
2945+ compare(sendButton.text, "BarBar")
2946+ }
2947+
2948+ function test_buttonState() {
2949+ actionField.activateEnabled = false
2950+ actionField.text = "Send me"
2951+ compare(sendButton.enabled, false)
2952+
2953+ actionField.activateEnabled = true
2954+ compare(sendButton.enabled, true)
2955+
2956+ actionField.text = ""
2957+ compare(sendButton.enabled, false)
2958+
2959+ actionField.text = "Enable again"
2960+ compare(sendButton.enabled, true)
2961+ }
2962+
2963+ function test_buttonClickActivatesTextArea() {
2964+ actionField.activateEnabled = true
2965+ mouseClick(sendButton, sendButton.width/2, sendButton.height/2)
2966+ compare(activatedSignalSpy.count, 1)
2967+ compare(activatedSignalSpy.signalArguments[0][0], replyText.text)
2968+ }
2969+ }
2970+}
2971
2972=== modified file 'tests/qmltests/Components/tst_ServerPropertySynchroniser.qml'
2973--- tests/qmltests/Components/tst_ServerPropertySynchroniser.qml 2016-03-10 15:10:15 +0000
2974+++ tests/qmltests/Components/tst_ServerPropertySynchroniser.qml 2016-10-24 11:26:32 +0000
2975@@ -194,7 +194,7 @@
2976 height: childrenRect.height
2977 anchors.left: parent.left
2978 anchors.right: parent.right
2979-
2980+//FIXME
2981 USM.AccessPointMenu {
2982 id: apMenu
2983 width: units.gu(30)
2984@@ -388,7 +388,7 @@
2985 }
2986
2987 function test_user_trigger() {
2988- apMenu.trigger();
2989+ apMenu.triggered(null);
2990
2991 compare(apSyncActivatedSpy.count, 1, "Triggering should have caused signal to be emitted");
2992 tryCompare(apBackend, "active", true);
2993
2994=== added file 'tests/qmltests/Menus/tst_BaseMenu.qml'
2995--- tests/qmltests/Menus/tst_BaseMenu.qml 1970-01-01 00:00:00 +0000
2996+++ tests/qmltests/Menus/tst_BaseMenu.qml 2016-10-24 11:26:32 +0000
2997@@ -0,0 +1,182 @@
2998+/*
2999+ * Copyright 2016 Canonical Ltd.
3000+ *
3001+ * This program is free software; you can redistribute it and/or modify
3002+ * it under the terms of the GNU Lesser General Public License as published by
3003+ * the Free Software Foundation; version 3.
3004+ *
3005+ * This program is distributed in the hope that it will be useful,
3006+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3007+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3008+ * GNU Lesser General Public License for more details.
3009+ *
3010+ * You should have received a copy of the GNU Lesser General Public License
3011+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3012+ *
3013+ * Authored by Marco Trevisan <marco.trevisan@canonical.com>
3014+ */
3015+
3016+import QtQuick 2.4
3017+import QtTest 1.0
3018+import Ubuntu.Test 0.1
3019+import Ubuntu.Settings.Menus 0.1
3020+
3021+Item {
3022+ width: units.gu(42)
3023+ height: units.gu(75)
3024+
3025+ Column {
3026+ anchors.fill: parent
3027+
3028+ BaseMenu {
3029+ id: baseMenu
3030+ }
3031+
3032+ BaseMenu {
3033+ id: dividerMenu
3034+ divider.visible: true
3035+ }
3036+
3037+ BaseMenu {
3038+ id: legacyDividerMenu
3039+ showDivider: true
3040+ }
3041+
3042+ BaseMenu {
3043+ id: clickOverride
3044+ property bool clicked: false
3045+ function onClickedCallback() { clicked = true }
3046+ }
3047+
3048+ BaseMenu {
3049+ id: removableMenu
3050+ removable: true
3051+ }
3052+ }
3053+
3054+ SignalSpy {
3055+ id: signalSpy
3056+ }
3057+
3058+ UbuntuTestCase {
3059+ name: "BaseMenu"
3060+ when: windowShown
3061+
3062+ function cleanup() {
3063+ signalSpy.clear()
3064+ }
3065+
3066+ function test_dontHighlightWhenPressed() {
3067+ baseMenu.highlightWhenPressed = false;
3068+ mousePress(baseMenu, baseMenu.width/2, baseMenu.height/2)
3069+ compare(Qt.colorEqual(baseMenu.highlightColor, baseMenu.backColor), true)
3070+ mouseRelease(baseMenu)
3071+ }
3072+
3073+ function test_doHighlightWhenPressed() {
3074+ baseMenu.highlightWhenPressed = true;
3075+ mousePress(baseMenu, baseMenu.width/2, baseMenu.height/2)
3076+ compare(Qt.colorEqual(baseMenu.highlightColor, theme.palette.highlighted.background), true)
3077+ mouseRelease(baseMenu)
3078+ }
3079+
3080+ function test_showDivider() {
3081+ compare(baseMenu.showDivider, false)
3082+ compare(baseMenu.divider.visible, false)
3083+
3084+ baseMenu.showDivider = true
3085+ compare(baseMenu.showDivider, true)
3086+ compare(baseMenu.divider.visible, true)
3087+
3088+ baseMenu.showDivider = false
3089+ compare(baseMenu.divider.visible, false)
3090+ compare(baseMenu.showDivider, false)
3091+ }
3092+
3093+ function test_hideDivider() {
3094+ compare(dividerMenu.showDivider, true)
3095+ compare(dividerMenu.divider.visible, true)
3096+
3097+ dividerMenu.showDivider = false
3098+ compare(dividerMenu.showDivider, false)
3099+ compare(dividerMenu.divider.visible, false)
3100+
3101+ dividerMenu.showDivider = true
3102+ compare(dividerMenu.divider.visible, true)
3103+ compare(dividerMenu.showDivider, true)
3104+ }
3105+
3106+ function test_hideDividerLegacy() {
3107+ legacyDividerMenu.showDivider = false
3108+ compare(legacyDividerMenu.showDivider, false)
3109+ compare(legacyDividerMenu.divider.visible, false)
3110+
3111+ legacyDividerMenu.showDivider = true
3112+ compare(legacyDividerMenu.divider.visible, true)
3113+ compare(legacyDividerMenu.showDivider, true)
3114+ }
3115+
3116+ function test_clickEvent() {
3117+ signalSpy.target = baseMenu
3118+ signalSpy.signalName = "onClicked"
3119+ mouseClick(baseMenu, baseMenu.width/2, baseMenu.height/2)
3120+ compare(signalSpy.count, 1)
3121+ }
3122+
3123+ function test_disabledClickEvent() {
3124+ signalSpy.target = baseMenu
3125+ signalSpy.signalName = "onClicked"
3126+ baseMenu.enabled = false
3127+ mouseClick(baseMenu, baseMenu.width/2, baseMenu.height/2)
3128+ compare(signalSpy.count, 0)
3129+ baseMenu.enabled = true
3130+ }
3131+
3132+ function test_triggeredEvent() {
3133+ signalSpy.target = baseMenu
3134+ signalSpy.signalName = "onTriggered"
3135+ mouseClick(baseMenu, baseMenu.width/2, baseMenu.height/2)
3136+ compare(signalSpy.count, 1)
3137+ compare(signalSpy.signalArguments[0][0], null)
3138+ }
3139+
3140+ function test_clickedSignalOverriding() {
3141+ signalSpy.target = clickOverride
3142+ signalSpy.signalName = "onTriggered"
3143+ clickOverride.clicked = false
3144+ mouseClick(clickOverride, clickOverride.width/2, baseMenu.height/2)
3145+ compare(clickOverride.clicked, true)
3146+ compare(signalSpy.count, 0)
3147+ }
3148+
3149+ function test_notRemovable() {
3150+ compare(baseMenu.removable, false)
3151+ compare(baseMenu.leadingActions, null)
3152+ verify(findChild(baseMenu, "removeAction") === undefined)
3153+ }
3154+
3155+ function test_removable() {
3156+ compare(removableMenu.removable, true)
3157+ compare(removableMenu.leadingActions !== null, true)
3158+ verify(findChild(baseMenu, "removeAction") === undefined)
3159+ }
3160+
3161+ function test_removal() {
3162+ // test_removable()
3163+ signalSpy.target = removableMenu
3164+ signalSpy.signalName = "itemRemoved"
3165+ mouseFlick(removableMenu,
3166+ removableMenu.width / 2,
3167+ removableMenu.height / 2,
3168+ removableMenu.width,
3169+ removableMenu.height / 2,
3170+ true, true, units.gu(1), 10);
3171+
3172+ var removeAction = findChild(removableMenu, "removeAction");
3173+ verify(removeAction !== undefined);
3174+ tryCompare(removeAction, "visible", true)
3175+ mouseClick(removeAction, removeAction.width/2, removeAction.height/2)
3176+ tryCompare(signalSpy, "count", 1)
3177+ }
3178+ }
3179+}
3180
3181=== modified file 'tests/qmltests/Menus/tst_CheckableMenu.qml'
3182--- tests/qmltests/Menus/tst_CheckableMenu.qml 2016-02-11 11:23:02 +0000
3183+++ tests/qmltests/Menus/tst_CheckableMenu.qml 2016-10-24 11:26:32 +0000
3184@@ -25,30 +25,19 @@
3185 width: units.gu(42)
3186 height: units.gu(75)
3187
3188- Flickable {
3189- id: flickable
3190-
3191+ ListView {
3192 anchors.fill: parent
3193- contentWidth: column.width
3194- contentHeight: column.height
3195-
3196- Item {
3197- id: column
3198-
3199- width: flickable.width
3200- height: childrenRect.height
3201-
3202- CheckableMenu {
3203- id: checkMenu
3204- text: i18n.tr("Check")
3205- }
3206+
3207+ CheckableMenu {
3208+ id: checkMenu
3209+ text: i18n.tr("Check")
3210 }
3211 }
3212
3213 SignalSpy {
3214 id: signalSpyTriggered
3215+ target: checkMenu
3216 signalName: "triggered"
3217- target: checkMenu
3218 }
3219
3220 UbuntuTestCase {
3221@@ -57,7 +46,10 @@
3222
3223 function init() {
3224 checkMenu.checked = false;
3225- signalSpyTriggered.clear();
3226+ }
3227+
3228+ function cleanup() {
3229+ signalSpyTriggered.clear()
3230 }
3231
3232 function test_checkChanged() {
3233@@ -72,14 +64,37 @@
3234 function test_clickCheckBox() {
3235 var checkbox = findChild(checkMenu, "checkbox");
3236 verify(checkbox !== undefined);
3237+ mouseClick(checkMenu, checkbox.width / 2, checkbox.height / 2);
3238+ compare(signalSpyTriggered.count, 1, "signal checked not triggered on checkbox click");
3239+ compare(signalSpyTriggered.signalArguments[0][0], true, "triggered signal argument non valid checkMenu click");
3240+ compare(checkMenu.checked, true)
3241+ }
3242
3243+ function test_clickCheckedCheckBox() {
3244+ test_clickCheckBox()
3245+ cleanup()
3246+ var checkbox = findChild(checkMenu, "checkbox");
3247+ verify(checkbox !== undefined);
3248 mouseClick(checkMenu, checkbox.width / 2, checkbox.height / 2);
3249- compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on checkbox click");
3250+ compare(signalSpyTriggered.count, 1, "signal checked not triggered on checkbox click");
3251+ compare(signalSpyTriggered.signalArguments[0][0], false, "triggered signal argument non valid checkMenu click");
3252+ compare(checkMenu.checked, false)
3253 }
3254
3255 function test_clickCheckMenu() {
3256 mouseClick(checkMenu, checkMenu.width / 2, checkMenu.height / 2);
3257- compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on checkMenu click");
3258+ compare(signalSpyTriggered.count, 1, "signal checked not triggered on checkMenu click");
3259+ compare(signalSpyTriggered.signalArguments[0][0], true, "triggered signal argument non valid checkMenu click");
3260+ compare(checkMenu.checked, true)
3261+ }
3262+
3263+ function test_clickCheckedCheckMenu() {
3264+ test_clickCheckMenu()
3265+ cleanup()
3266+ mouseClick(checkMenu, checkMenu.width / 2, checkMenu.height / 2);
3267+ compare(signalSpyTriggered.count, 1, "signal checked not triggered on checkMenu click");
3268+ compare(signalSpyTriggered.signalArguments[0][0], false, "triggered signal argument non valid checkMenu click");
3269+ compare(checkMenu.checked, false)
3270 }
3271 }
3272 }
3273
3274=== modified file 'tests/qmltests/Menus/tst_GroupedMessageMenu.qml'
3275--- tests/qmltests/Menus/tst_GroupedMessageMenu.qml 2016-08-17 15:03:37 +0000
3276+++ tests/qmltests/Menus/tst_GroupedMessageMenu.qml 2016-10-24 11:26:32 +0000
3277@@ -84,7 +84,12 @@
3278 }
3279
3280 function test_dismiss() {
3281+ verify(findChild(messageMenu2, "removeAction") === undefined);
3282 mouseFlick(messageMenu2, messageMenu2.width / 2, messageMenu2.height / 2, messageMenu2.width, messageMenu2.height / 2, true, true, units.gu(1), 10);
3283+ var removeAction = findChild(messageMenu2, "removeAction");
3284+ verify(removeAction !== undefined);
3285+ tryCompare(removeAction, "visible", true)
3286+ mouseClick(removeAction, removeAction.width/2, removeAction.height/2)
3287 tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true);
3288 }
3289 }
3290
3291=== modified file 'tests/qmltests/Menus/tst_SimpleMessageMenu.qml'
3292--- tests/qmltests/Menus/tst_SimpleMessageMenu.qml 2016-02-11 11:23:02 +0000
3293+++ tests/qmltests/Menus/tst_SimpleMessageMenu.qml 2016-10-24 11:26:32 +0000
3294@@ -166,12 +166,17 @@
3295 }
3296
3297 function test_dismiss() {
3298+ verify(findChild(messageMenuRemovable, "removeAction") === undefined);
3299 mouseFlick(messageMenuRemovable,
3300 messageMenuRemovable.width / 2,
3301 messageMenuRemovable.height / 2,
3302 messageMenuRemovable.width,
3303 messageMenuRemovable.height / 2,
3304 true, true, units.gu(1), 10);
3305+ var removeAction = findChild(messageMenuRemovable, "removeAction");
3306+ verify(removeAction !== undefined);
3307+ tryCompare(removeAction, "visible", true)
3308+ mouseClick(removeAction, removeAction.width/2, removeAction.height/2)
3309 tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true);
3310 }
3311 }
3312
3313=== modified file 'tests/qmltests/Menus/tst_SnapDecisionMenu.qml'
3314--- tests/qmltests/Menus/tst_SnapDecisionMenu.qml 2016-02-11 11:23:02 +0000
3315+++ tests/qmltests/Menus/tst_SnapDecisionMenu.qml 2016-10-24 11:26:32 +0000
3316@@ -215,12 +215,17 @@
3317 }
3318
3319 function test_dismiss() {
3320+ verify(findChild(messageMenuRemovable, "removeAction") === undefined);
3321 mouseFlick(messageMenuRemovable,
3322 messageMenuRemovable.width / 2,
3323 messageMenuRemovable.height / 2,
3324 messageMenuRemovable.width,
3325 messageMenuRemovable.height / 2,
3326 true, true, units.gu(1), 10);
3327+ var removeAction = findChild(messageMenuRemovable, "removeAction");
3328+ verify(removeAction !== undefined);
3329+ tryCompare(removeAction, "visible", true)
3330+ mouseClick(removeAction, removeAction.width/2, removeAction.height/2)
3331 tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true);
3332 }
3333
3334@@ -299,12 +304,14 @@
3335
3336 var messageButton = findChild(messageMenuSelected, "messageButton");
3337 verify(messageButton !== undefined, "Message button not found");
3338+ waitForRendering(messageButton)
3339 mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2);
3340
3341 var sendButton = findChild(messageMenuSelected, "sendButton");
3342 verify(sendButton !== undefined, "Send button not found");
3343+ waitForRendering(sendButton)
3344
3345- mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2);
3346+ mouseClick(sendButton, messageButton.width / 2, messageButton.height / 2);
3347 compare(signalSpyReply.count > 0, true);
3348 compare(textMessageReply, "reply1", "Text message did not reply with correct text.");
3349 }
3350@@ -326,6 +333,7 @@
3351
3352 var messageButton = findChild(messageMenuSelected, "messageButton");
3353 verify(messageButton !== undefined, "Message button not found");
3354+ waitForRendering(messageButton)
3355 mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2);
3356
3357 mouseClick(replyText, replyText.width / 2, replyText.height / 2);
3358
3359=== added file 'tests/qmltests/Menus/tst_StandardMenu.qml'
3360--- tests/qmltests/Menus/tst_StandardMenu.qml 1970-01-01 00:00:00 +0000
3361+++ tests/qmltests/Menus/tst_StandardMenu.qml 2016-10-24 11:26:32 +0000
3362@@ -0,0 +1,81 @@
3363+/*
3364+ * Copyright 2016 Canonical Ltd.
3365+ *
3366+ * This program is free software; you can redistribute it and/or modify
3367+ * it under the terms of the GNU Lesser General Public License as published by
3368+ * the Free Software Foundation; version 3.
3369+ *
3370+ * This program is distributed in the hope that it will be useful,
3371+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3372+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3373+ * GNU Lesser General Public License for more details.
3374+ *
3375+ * You should have received a copy of the GNU Lesser General Public License
3376+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3377+ *
3378+ * Authored by Marco Trevisan <marco.trevisan@canonical.com>
3379+ */
3380+
3381+import QtQuick 2.4
3382+import QtTest 1.0
3383+import Ubuntu.Test 0.1
3384+import Ubuntu.Settings.Menus 0.1
3385+
3386+Item {
3387+ width: units.gu(42)
3388+ height: units.gu(75)
3389+
3390+ Column {
3391+ anchors.fill: parent
3392+
3393+ StandardMenu {
3394+ id: standardMenu
3395+ text: "Label"
3396+ }
3397+
3398+ StandardMenu {
3399+ id: iconMenu
3400+ text: "Icon Menu"
3401+ iconName: "view-fullscreen"
3402+ }
3403+
3404+ StandardMenu {
3405+ id: emptyMenu
3406+ }
3407+ }
3408+
3409+ UbuntuTestCase {
3410+ name: "StandardMenu"
3411+ when: windowShown
3412+
3413+ function test_iconInvisible() {
3414+ var menuIcon = findChild(standardMenu, "standardMenuIcon")
3415+ verify(menuIcon !== undefined)
3416+ compare(menuIcon.visible, false)
3417+ }
3418+
3419+ function test_iconVisible() {
3420+ var menuIcon = findChild(iconMenu, "standardMenuIcon")
3421+ verify(menuIcon !== undefined)
3422+ compare(menuIcon.visible, true)
3423+ }
3424+
3425+ function test_iconVisibilityChanges() {
3426+ var menuIcon = findChild(emptyMenu, "standardMenuIcon")
3427+ verify(menuIcon !== undefined)
3428+ compare(menuIcon.visible, false)
3429+
3430+ emptyMenu.iconName = "close"
3431+ compare(menuIcon.visible, true)
3432+
3433+ emptyMenu.iconName = ""
3434+ compare(menuIcon.visible, false)
3435+
3436+ emptyMenu.iconSource = "image://theme/tick"
3437+ compare(menuIcon.visible, true)
3438+
3439+ emptyMenu.iconSource = ""
3440+ compare(menuIcon.visible, false)
3441+ }
3442+ }
3443+}
3444
3445=== modified file 'tests/qmltests/Menus/tst_SwitchMenu.qml'
3446--- tests/qmltests/Menus/tst_SwitchMenu.qml 2016-02-11 11:23:02 +0000
3447+++ tests/qmltests/Menus/tst_SwitchMenu.qml 2016-10-24 11:26:32 +0000
3448@@ -26,35 +26,25 @@
3449 height: units.gu(75)
3450
3451 Flickable {
3452- id: flickable
3453-
3454 anchors.fill: parent
3455- contentWidth: column.width
3456- contentHeight: column.height
3457-
3458- Item {
3459- id: column
3460-
3461- width: flickable.width
3462- height: childrenRect.height
3463-
3464- SwitchMenu {
3465- id: switchMenu
3466- text: i18n.tr("Switch")
3467- }
3468- SwitchMenu {
3469- id: switchMenu2
3470- text: i18n.tr("Switch")
3471- checked: true
3472- anchors.top: switchMenu.bottom
3473- }
3474+
3475+ SwitchMenu {
3476+ id: switchMenu
3477+ text: i18n.tr("Switch")
3478+ }
3479+
3480+ SwitchMenu {
3481+ id: switchMenu2
3482+ text: i18n.tr("Switch")
3483+ checked: true
3484+ anchors.top: switchMenu.bottom
3485 }
3486 }
3487
3488 SignalSpy {
3489 id: signalSpyTriggered
3490+ target: switchMenu
3491 signalName: "triggered"
3492- target: switchMenu
3493 }
3494
3495 UbuntuTestCase {
3496@@ -63,27 +53,55 @@
3497
3498 function init() {
3499 switchMenu.checked = false;
3500- signalSpyTriggered.clear();
3501- }
3502-
3503- function test_checkChanged() {
3504+ }
3505+
3506+ function cleanup() {
3507+ signalSpyTriggered.clear()
3508+ }
3509+
3510+ function test_switchChanged() {
3511 var switcher = findChild(switchMenu, "switcher");
3512 verify(switcher !== undefined);
3513
3514- compare(switcher.checked, false, "Checkbox should initially be unchecked");
3515+ compare(switcher.checked, false, "switcher should initially be unchecked");
3516 switchMenu.checked = true;
3517- compare(switcher.checked, true, "Checkbox should be checked");
3518- }
3519-
3520- function test_clickSwitchBox() {
3521- var switcher = findChild(switchMenu, "switcher");
3522- mouseClick(switchMenu, switcher.width / 2, switcher.height / 2);
3523- compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on switcher click");
3524+ compare(switcher.checked, true, "switcher should be checked");
3525+ }
3526+
3527+ function test_clickSwitcher() {
3528+ var switcher = findChild(switchMenu, "switcher");
3529+ verify(switcher !== undefined);
3530+ mouseClick(switchMenu, switcher.width / 2, switcher.height / 2);
3531+ compare(signalSpyTriggered.count, 1, "signal checked not triggered on switcher click");
3532+ compare(signalSpyTriggered.signalArguments[0][0], true, "triggered signal argument non valid SwitchMenu click");
3533+ compare(switchMenu.checked, true)
3534+ }
3535+
3536+ function test_clickCheckedSwitcher() {
3537+ test_clickSwitcher()
3538+ cleanup()
3539+ var switcher = findChild(switchMenu, "switcher");
3540+ verify(switcher !== undefined);
3541+ mouseClick(switchMenu, switcher.width / 2, switcher.height / 2);
3542+ compare(signalSpyTriggered.count, 1, "signal checked not triggered on switcher click");
3543+ compare(signalSpyTriggered.signalArguments[0][0], false, "triggered signal argument non valid SwitchMenu click");
3544+ compare(switchMenu.checked, false)
3545 }
3546
3547 function test_clickSwitchMenu() {
3548 mouseClick(switchMenu, switchMenu.width / 2, switchMenu.height / 2);
3549- compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on switchMenu click");
3550+ compare(signalSpyTriggered.count, 1, "signal checked not triggered on SwitchMenu click");
3551+ compare(signalSpyTriggered.signalArguments[0][0], true, "triggered signal argument non valid SwitchMenu click");
3552+ compare(switchMenu.checked, true)
3553+ }
3554+
3555+ function test_clickCheckedSwitchMenu() {
3556+ test_clickSwitchMenu()
3557+ cleanup()
3558+ mouseClick(switchMenu, switchMenu.width / 2, switchMenu.height / 2);
3559+ compare(signalSpyTriggered.count, 1, "signal checked not triggered on SwitchMenu click");
3560+ compare(signalSpyTriggered.signalArguments[0][0], false, "triggered signal argument non valid SwitchMenu click");
3561+ compare(switchMenu.checked, false)
3562 }
3563 }
3564 }
3565
3566=== modified file 'tests/qmltests/Menus/tst_TextMessageMenu.qml'
3567--- tests/qmltests/Menus/tst_TextMessageMenu.qml 2016-02-11 11:23:02 +0000
3568+++ tests/qmltests/Menus/tst_TextMessageMenu.qml 2016-10-24 11:26:32 +0000
3569@@ -204,12 +204,17 @@
3570 }
3571
3572 function test_dismiss() {
3573+ verify(findChild(messageMenuRemovable, "removeAction") === undefined);
3574 mouseFlick(messageMenuRemovable,
3575 messageMenuRemovable.width / 2,
3576 messageMenuRemovable.height / 2,
3577 messageMenuRemovable.width,
3578 messageMenuRemovable.height / 2,
3579 true, true, units.gu(1), 10);
3580+ var removeAction = findChild(messageMenuRemovable, "removeAction");
3581+ verify(removeAction !== undefined);
3582+ tryCompare(removeAction, "visible", true)
3583+ mouseClick(removeAction, removeAction.width/2, removeAction.height/2)
3584 tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true);
3585 }
3586
3587@@ -262,6 +267,7 @@
3588
3589 var sendButton = findChild(messageMenuSelected, "sendButton");
3590 verify(sendButton !== undefined, "Send button not found");
3591+ waitForRendering(sendButton)
3592
3593 mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2);
3594 compare(signalSpyReply.count > 0, true);

Subscribers

People subscribed via source and target branches