Merge lp:~unity-team/unity8/launcher-sizing into lp:unity8

Proposed by Michał Sawicz
Status: Superseded
Proposed branch: lp:~unity-team/unity8/launcher-sizing
Merge into: lp:unity8
Prerequisite: lp:~unity-team/unity8/launcher-updates
Diff against target: 1164 lines (+406/-110)
12 files modified
data/com.canonical.Unity8.gschema.xml (+11/-0)
qml/Launcher/Launcher.qml (+33/-11)
qml/Launcher/LauncherDelegate.qml (+8/-12)
qml/Launcher/LauncherPanel.qml (+34/-34)
qml/Shell.qml (+18/-1)
qml/Stages/AbstractStage.qml (+2/-0)
qml/Stages/DesktopStage.qml (+14/-11)
qml/Stages/WindowResizeArea.qml (+3/-2)
tests/mocks/GSettings.1.0/fake_gsettings.cpp (+64/-0)
tests/mocks/GSettings.1.0/fake_gsettings.h (+18/-0)
tests/qmltests/Launcher/tst_Launcher.qml (+110/-26)
tests/qmltests/tst_Shell.qml (+91/-13)
To merge this branch: bzr merge lp:~unity-team/unity8/launcher-sizing
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Approve
Albert Astals Cid (community) Abstain
PS Jenkins bot (community) continuous-integration Needs Fixing
Unity8 CI Bot continuous-integration Needs Fixing
Michael Terry Pending
Michał Sawicz Pending
Daniel d'Andrada Pending
Review via email: mp+286396@code.launchpad.net

This proposal supersedes a proposal from 2015-12-10.

This proposal has been superseded by a proposal from 2016-02-25.

Commit message

Make launcher scalable, allow it locking

Description of the change

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

 - see prereq

 * Did you perform an exploratory manual test run of your code change and any related functionality?
yes
 * Did you make sure that your branch does not contain spurious tags?
y
 * 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?
y

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2065
http://jenkins.qa.ubuntu.com/job/unity8-ci/6911/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5697
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/326/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1622
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/325
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1517
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1517
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/324
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/323
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4423
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5710
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5710/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25935
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/125/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/325
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/325/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25937

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6911/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Some tests failing:

qmltestrunner.Shell::test_focusAppFromLauncherExitsSpread
qmltestrunner.Shell::test_progressiveAutoScrolling
qmltestrunner.Shell::test_superTabToCycleLauncher

review: Needs Fixing
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

One minor comment inline, fix the gsettings description

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Text conflict in tests/qmltests/tst_Shell.qml
1 conflicts encountered.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2071
http://jenkins.qa.ubuntu.com/job/unity8-ci/6952/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5789
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/367/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1663
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/366
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1558
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1558
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/365
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/364
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4477
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5802
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5802/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26068
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/136/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/366
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/366/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26069

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6952/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2073
http://jenkins.qa.ubuntu.com/job/unity8-ci/6958/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5800
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/373/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1669
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/372
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1564
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1564
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/371
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/370
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4486
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5813
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5813/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26085
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/141/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/372
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/372/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26084

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6958/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

I know this may be bending too far backwards, but have you considered re-using the unity7 gsettings locations for the launcher?

The org.compiz.unityshell schema, installed by the unity-schemas package, has a launcher-hide-mode key and a icon-size key. The former should work just fine for our needs. But the icon-size is specified in pixels. So if we used that key, maybe we'd do some clever (or dumb!) converting.

I know it's cleaner to use our own schema. But compatibility between the two DEs (both of which we make!) would be nice. But I'm not going to push very hard for it. :)

===

In Launcher.qml, when lockedVisible changes, this code immediately calls hide(). Do you want to trigger the dismiss timer instead? That way panel.preventHiding gets respected. And just calling hide() assumes that lockedVisible is tied to autohideEnabled. Which it is... But feels weird to have those be overlapping states and have Shell.qml be the one combining them.

How would you feel about renaming lockedVisible to something like visibleByDefault and just having it be set to "scenario == desktop"? And then having Launcher combine that state and autohideEnabled to do the right thing.

The current way is fine too. But maybe just use the dismiss trigger instead of hide() at least.

===

I also tested this on my phone and couldn't pull the launcher out. It just didn't come out when I swiped from the left... I probably did something wrong... Maybe I should do a fresh build, I just moved qml files into place (no c++ changes here or in pre-req, right?) since the debs from jenkins are 404 now. Have you tested this MP recently?

review: Needs Information
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Oh, duh. The gsettings schema. Need to make a deb I guess.

Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

OK... Now I see that autohideLauncher is in fact a separate property from Launcher.autohideEnabled. That confusion on my part drove me talking about the overlapping states above. I guess ignore that piece then.

Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Maybe move the launcherSettings object into the main Shell object instead of the Launcher, since it is not a launcher-specific object?

The old GSettings object seems to have moved into a Unity8Settings override-able object on the OrientedShell... I guess someone figured that was easier to mock than our existing GSettings mocks? But that means it's not accessible from the base Shell now, hence why you needed to add your own GSettings object.

:(

===

Neither the pips nor the badge text changes size with the launcher icons. Is that intentional?

===

I'm getting "Damper::maxDelta must be a positive number. Aborted" when running xvfbtestLauncher/Shell. But I also get that on the Dash tests. I don't think that's related. Outside of xvfb works fine.

Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

re re-using the unity7 schema: I did try to keep compatibility in the launcher for a long time. However, given the drastic changes of how we work with app ids now, at some point I could not reuse the favorites key in there any more. Also this branch's requirements were quite different at some point, in a sense that we'd need to store different size configs for different usage modes, this might come back as a design request at any point. Last but not least, the px vs GU issue is another one why I think reusing is not the best idea. Even if I'd convert it, the setting is stored in pixels and will break if the use switches to a screen with different PX/GU.

===

re: hide() vs dismissTimer. using dismissTimer would cause the launcher to wait for some seconds before hiding when the user changes the setting in systemsettings, which I think would be a bit weird (unity7 hides it immediately on setting change too). You do have a point that if the user would have the mouse hovered on the launcher while changing the setting it would hide despite the user "interacting" with it. However, is it really a use case that the user interacts with the mouse on the launcher and uses, touch or cmdline to make the launcher hide at the same time? Hence my decision to go for hide() immediately, so the user gets immediate feedback when clicking on the (yet to be added in settings) checkbox.

===

re requiring a .deb for testing. I usually copy the schema to the device and call "sudo glib-compile-schemas /usr/share/glib-2.0/schemas" myself.

===

re moving GSettings around, yes, Daniel keeps on moving those things so he can mock them in QML instead of using the GSettingsController to control the mock... I think we should remove the Unity8Settings again, given that the only thing that we actually mock with that are already supported by our GSettingsControllerQML stuff. Also the workaround in Unity8Settings is not required any more as the fix for that landed by now. Given that touches quite some places tho, I'd vote for doing that in a different branch.

Anyhow, I've moved the GSettings object out of the launcher now and called it settings.

===

re pip and count emblems not scaling, yes, intentional. You couldn't read them any more at the smalles level and they'd be super huge on the biggest. I talked with design about that. we agreed to not scale them.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2075
http://jenkins.qa.ubuntu.com/job/unity8-ci/6979/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5863
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/394/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1689
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/392
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1584
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1584
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/391
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/390
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4522
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5874
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5874/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26228
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/155/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/392
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/392/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26227

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6979/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Alright then, sounds sensible. :)

I like the code changes, but looks like we have new failures in testShell at least? I get 15 new failures locally.

Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

fixed the tests.

Please note that I had to merge lp:~dandrader/unity8/fixDragHandleTest in order to make xvfbtestShell work at all. As I already have a prereq, that diff will show up here too. It should vanish after the next landing.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2078
http://jenkins.qa.ubuntu.com/job/unity8-ci/7033/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5973
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/448/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1738
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/441
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1633
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1633
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/440
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/439
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4617
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5984
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5984/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26502
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/198/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/446
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/446/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26503

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7033/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

I also see a failure in tst_Launcher::test_clickFlick in jenkins, but I don't see it locally. Does that pass/fail for you?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2079
http://jenkins.qa.ubuntu.com/job/unity8-ci/7036/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5976
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/451/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1741
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/444
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1636
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1636
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/443
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/442
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4620
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5987
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5987/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26516
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/201/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/449
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/449/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26518

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7036/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Hrm. Jenkins failure went away... And I can't see it locally, so fine. :) Approved, thanks!

review: Approve
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Text conflict in qml/Launcher/Launcher.qml
Text conflict in qml/Launcher/LauncherPanel.qml
2 conflicts encountered.

Was already top approved.

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

> Text conflict in qml/Launcher/Launcher.qml
> Text conflict in qml/Launcher/LauncherPanel.qml
> 2 conflicts encountered.
>
> Was already top approved.

merged

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2080
http://jenkins.qa.ubuntu.com/job/unity8-ci/7059/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6013
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/474/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1764
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/467
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1659
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1659
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/466
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/465
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4645
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6024
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6024/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26616
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/219/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/472
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/472/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26617

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7059/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:2080
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/22/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/22/rebuild

review: Approve (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Looks good again, and CI bot says good!

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Something went wrong

file:///home/tsdgeos_work/phablet/unity8/launcher-sizing/tests/qmltests/Launcher/tst_Launcher.qml:313:18: Duplicate method name
             function assertFocusOnIndex(index) {

review: Needs Fixing
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Found a small bug:

1. Alt+F1 to open the keyboard navigation
2. Press Down to highlight an item
3. Press Right to open the quicklist
4. Launch the app
5. The (keyboard) focus ring doesn't go away

review: Needs Fixing
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Hmm yes and no, it becomes obvious here now that the launcher stays locked visible in the desktop mode; tbh I don't recall seeing this when testing just the launcher-updates branch before

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

When switching between windows with Alt+Tab (while the launcher is locked visible), the launcher flashes/flickers

review: Needs Fixing
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:2081
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/66/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/66/rebuild

review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

> Found a small bug:
>
> 1. Alt+F1 to open the keyboard navigation
> 2. Press Down to highlight an item
> 3. Press Right to open the quicklist
> 4. Launch the app
> 5. The (keyboard) focus ring doesn't go away
> review: Needs Fixing
> Reply
> Michael Terry (mterry) wrote 1 minute ago: #

> That's probably a bug in the pre-req: https://code.launchpad.net/~mzanetti/unity8/launcher-updates
> /+merge/278567

Indeed, fixed in the prereq and merged this

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2081
http://jenkins.qa.ubuntu.com/job/unity8-ci/7065/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6023
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/480/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1770
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/473
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1665
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1665
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/472
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/471
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4650
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6034
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6034/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26647
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/224/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/478
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/478/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26649

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7065/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) : Posted in a previous version of this proposal
review: Abstain (the broken merge is gone)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:2082
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/72/
Executed test runs:

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

review: Approve (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2083
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/74/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

When having a fullscreen app (like camera or a webbrowser windows), the launcher should imho hide regardless of the visible-locked preference, just like the top panel does.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2083
http://jenkins.qa.ubuntu.com/job/unity8-ci/7070/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6030/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/485/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1775
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/478
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1670/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1670
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/477
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/476
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4657/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6041
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6041/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26662
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/229/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/483
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/483/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26663

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7070/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:2084
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/77/
Executed test runs:

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

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2084
http://jenkins.qa.ubuntu.com/job/unity8-ci/7073/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6035
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/488/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1778
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/481
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1673
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1673
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/480
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/479
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4662
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6046
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6046/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26675
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/232/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/486
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/486/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26674

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7073/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:2085
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/79/
Executed test runs:

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

review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

> When having a fullscreen app (like camera or a webbrowser windows), the
> launcher should imho hide regardless of the visible-locked preference, just
> like the top panel does.

done

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2085
http://jenkins.qa.ubuntu.com/job/unity8-ci/7075/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6038
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/490/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1780
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/483
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1675
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1675
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/482
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/481
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4665
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6049
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6049/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26686
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/234/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/488
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/488/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26688

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7075/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2086
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/89/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/89/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

The flickering and fullscreen is fixed, great

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Please remove the spurious bzr tags, otherwise no more objections

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

> Please remove the spurious bzr tags, otherwise no more objections

done. must've been merged in after the initial proposal

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

LGTM, works fine now, minus some some havoc in LauncherModel (unrelated to this branch), gonna file a bug about it

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

Yes!

* Did CI run pass? If not, please explain why.

Yes (all the relevant tests passing locally)

* Did you make sure that the branch does not contain spurious tags?

Yes

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2086
http://jenkins.qa.ubuntu.com/job/unity8-ci/7077/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6041
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/492/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1782
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/485
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1677
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1677
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/484
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/483
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4668
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6052
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6052/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26705
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/236/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/490
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/490/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26704

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7077/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2086
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/89/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/89/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2086
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/89/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/89/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2086
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/89/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/89/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Note: this was already top approved, re-approve after merge

Text conflict in qml/Components/PhysicalKeysMapper.qml
Text conflict in qml/Launcher/Launcher.qml
Text conflict in tests/qmltests/tst_Shell.qml
3 conflicts encountered.

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Merges now, re-top-approving

review: Abstain
Revision history for this message
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal

I don't think "always-launcher" is as easy as resizing the desktop stage, it results in fullscreen^W apps moving about:

http://imgur.com/a/5wxlt

Non-fullscreen apps should probably get margins instead of the whole stage being moved about.

I'd vote for leaving the always-launcher feature out from this MP.

review: Needs Fixing
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2089
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/288/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/288/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

- panel.dismissTimer.restart()
+ dismissTimer.restart()

Is that right?

review: Needs Information
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

qml/Launcher/Launcher.qml:98: ReferenceError: dismissTimer is not defined

Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

Why to we need this new intermediate (id: stageContainer) Item in DesktopStage.qml?

review: Needs Information
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

> Why to we need this new intermediate (id: stageContainer) Item in
> DesktopStage.qml?

because the area for the apps needs to be smaller when the launcher is always visible. that said, this might not be good enough yet.

Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

> - panel.dismissTimer.restart()
> + dismissTimer.restart()
>
> Is that right?

> qml/Launcher/Launcher.qml:98: ReferenceError: dismissTimer is not defined

bad merge, thanks. fixed

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

On 10/02/2016 14:31, Michael Zanetti wrote:
>> Why to we need this new intermediate (id: stageContainer) Item in
>> DesktopStage.qml?
> because the area for the apps needs to be smaller when the launcher is always visible. that said, this might not be good enough yet.

But the leftMargin is not being applied to it, but to appContainer instead.

Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

> On 10/02/2016 14:31, Michael Zanetti wrote:
> >> Why to we need this new intermediate (id: stageContainer) Item in
> >> DesktopStage.qml?
> > because the area for the apps needs to be smaller when the launcher is
> always visible. that said, this might not be good enough yet.
>
>
> But the leftMargin is not being applied to it, but to appContainer instead.

Right. So the inner container is for the margins. As the wallpaper can't have the same margins (it shines through the launcher), it can't be inside that container. The outer is used for snapshotting the whole thing in order to apply blur for the spread background. I guess we could make the background also act as the outer container and with that get rid of one item. Anyways, as I said, this doesn't seem to be good enough for switching between fullscreen and non-fullscreen apps yet. have to rework it a bit.

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Yes, works good now, even with the spread and fullscreen apps

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

Yes!

* Did CI run pass? If not, please explain why.

Yes (all the relevant tests passing locally)

* Did you make sure that the branch does not contain spurious tags?

Yes

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) :
review: Abstain
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Re-approving after prereq merge

review: Approve

Unmerged revisions

2092. By Lukáš Tinkl

merge prereq

2091. By Michał Sawicz

Merge lp:~unity-team/unity8/launcher-updates

2090. By Michael Zanetti

merge prereq

2089. By Michael Zanetti

don't resize the whole stage, instead add margins to non fullscreen things

2088. By Michael Zanetti

merge trunk

2087. By Michael Zanetti

merge prereq

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/com.canonical.Unity8.gschema.xml'
--- data/com.canonical.Unity8.gschema.xml 2015-11-24 17:44:18 +0000
+++ data/com.canonical.Unity8.gschema.xml 2016-02-19 15:10:34 +0000
@@ -27,6 +27,17 @@
27 <summary>Maximum push needed to overcome edge barrier</summary>27 <summary>Maximum push needed to overcome edge barrier</summary>
28 <description>How much you have to push (in grid units) the mouse against an edge barrier when sensibility is 1.</description>28 <description>How much you have to push (in grid units) the mouse against an edge barrier when sensibility is 1.</description>
29 </key>29 </key>
30 <key type="b" name="autohide-launcher">
31 <default>false</default>
32 <summary>Autohide the launcher</summary>
33 <description>This will only be applied in windowed mode. In staged mode, the launcher will always hide.</description>
34 </key>
35 <key type="u" name="launcher-width">
36 <default>8</default>
37 <range min="6" max="12"/>
38 <summary>Width of the launcher in grid units.</summary>
39 <description>Changes the width of the launcher in all usage modes.</description>
40 </key>
30 </schema>41 </schema>
3142
32 <schema path="/com/canonical/unity8/greeter/" id="com.canonical.Unity8.Greeter" gettext-domain="unity8">43 <schema path="/com/canonical/unity8/greeter/" id="com.canonical.Unity8.Greeter" gettext-domain="unity8">
3344
=== modified file 'qml/Launcher/Launcher.qml'
--- qml/Launcher/Launcher.qml 2016-02-19 15:10:33 +0000
+++ qml/Launcher/Launcher.qml 2016-02-19 15:10:34 +0000
@@ -25,11 +25,12 @@
25 id: root25 id: root
2626
27 property bool autohideEnabled: false27 property bool autohideEnabled: false
28 property bool lockedVisible: false
28 property bool available: true // can be used to disable all interactions29 property bool available: true // can be used to disable all interactions
29 property alias inverted: panel.inverted30 property alias inverted: panel.inverted
30 property bool shadeBackground: true // can be used to disable background shade when launcher is visible31 property bool shadeBackground: true // can be used to disable background shade when launcher is visible
3132
32 property int panelWidth: units.gu(8)33 property int panelWidth: units.gu(10)
33 property int dragAreaWidth: units.gu(1)34 property int dragAreaWidth: units.gu(1)
34 property int minimizeDistance: units.gu(26)35 property int minimizeDistance: units.gu(26)
35 property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?36 property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?
@@ -92,12 +93,24 @@
92 }93 }
93 }94 }
9495
96 onLockedVisibleChanged: {
97 if (lockedVisible && state == "") {
98 panel.dismissTimer.stop();
99 fadeOutAnimation.stop();
100 switchToNextState("visible")
101 } else if (!lockedVisible && state == "visible") {
102 hide();
103 }
104 }
105
95 function hide() {106 function hide() {
96 switchToNextState("")107 switchToNextState("")
97 }108 }
98109
99 function fadeOut() {110 function fadeOut() {
100 fadeOutAnimation.start();111 if (!root.lockedVisible) {
112 fadeOutAnimation.start();
113 }
101 }114 }
102115
103 function switchToNextState(state) {116 function switchToNextState(state) {
@@ -172,7 +185,7 @@
172 } else if (panel.highlightIndex >= 0) {185 } else if (panel.highlightIndex >= 0) {
173 launcherApplicationSelected(LauncherModel.get(panel.highlightIndex).appId);186 launcherApplicationSelected(LauncherModel.get(panel.highlightIndex).appId);
174 }187 }
175 root.state = ""188 root.hide();
176 event.accepted = true;189 event.accepted = true;
177 root.focus = false;190 root.focus = false;
178 }191 }
@@ -211,6 +224,13 @@
211 interval: 1224 interval: 1
212 property string nextState: ""225 property string nextState: ""
213 onTriggered: {226 onTriggered: {
227 if (root.lockedVisible && nextState == "") {
228 // Due to binding updates when switching between modes
229 // it could happen that our request to show will be overwritten
230 // with a hide request. Rewrite it when we know hiding is not allowed.
231 nextState = "visible"
232 }
233
214 // switching to an intermediate state here to make sure all the234 // switching to an intermediate state here to make sure all the
215 // values are restored, even if we were already in the target state235 // values are restored, even if we were already in the target state
216 root.state = "tmp"236 root.state = "tmp"
@@ -256,7 +276,7 @@
256276
257 MouseArea {277 MouseArea {
258 id: launcherDragArea278 id: launcherDragArea
259 enabled: root.available && (root.state == "visible" || root.state == "visibleTemporary")279 enabled: root.available && (root.state == "visible" || root.state == "visibleTemporary") && !root.lockedVisible
260 anchors.fill: panel280 anchors.fill: panel
261 anchors.rightMargin: -units.gu(2)281 anchors.rightMargin: -units.gu(2)
262 drag {282 drag {
@@ -277,9 +297,10 @@
277 InverseMouseArea {297 InverseMouseArea {
278 id: closeMouseArea298 id: closeMouseArea
279 anchors.fill: panel299 anchors.fill: panel
280 enabled: root.shadeBackground && root.state == "visible"300 enabled: root.shadeBackground && root.state == "visible" && (!root.lockedVisible || panel.highlightIndex >= -1)
281 visible: enabled301 visible: enabled
282 onPressed: {302 onPressed: {
303 panel.highlightIndex = -2
283 root.hide();304 root.hide();
284 }305 }
285 }306 }
@@ -288,7 +309,7 @@
288 id: backgroundShade309 id: backgroundShade
289 anchors.fill: parent310 anchors.fill: parent
290 color: "black"311 color: "black"
291 opacity: root.shadeBackground && root.state == "visible" ? 0.6 : 0312 opacity: root.shadeBackground && root.state == "visible" && !root.lockedVisible ? 0.6 : 0
292313
293 Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.BriskDuration } }314 Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.BriskDuration } }
294 }315 }
@@ -332,9 +353,9 @@
332 Connections {353 Connections {
333 target: panel.dismissTimer354 target: panel.dismissTimer
334 onTriggered: {355 onTriggered: {
335 if (root.autohideEnabled) {356 if (root.autohideEnabled && !root.lockedVisible) {
336 if (!panel.preventHiding) {357 if (!panel.preventHiding) {
337 root.state = ""358 root.hide();
338 } else {359 } else {
339 panel.dismissTimer.restart()360 panel.dismissTimer.restart()
340 }361 }
@@ -345,11 +366,11 @@
345 property bool animate: true366 property bool animate: true
346367
347 onApplicationSelected: {368 onApplicationSelected: {
348 root.state = ""369 root.hide();
349 launcherApplicationSelected(appId)370 launcherApplicationSelected(appId)
350 }371 }
351 onShowDashHome: {372 onShowDashHome: {
352 root.state = ""373 root.hide();
353 root.showDashHome();374 root.showDashHome();
354 }375 }
355376
@@ -360,7 +381,8 @@
360 }381 }
361382
362 onKbdNavigationCancelled: {383 onKbdNavigationCancelled: {
363 root.state = "";384 panel.highlightIndex = -2;
385 root.hide();
364 root.focus = false;386 root.focus = false;
365 }387 }
366388
367389
=== modified file 'qml/Launcher/LauncherDelegate.qml'
--- qml/Launcher/LauncherDelegate.qml 2016-02-19 15:10:33 +0000
+++ qml/Launcher/LauncherDelegate.qml 2016-02-19 15:10:34 +0000
@@ -124,7 +124,7 @@
124124
125 Item {125 Item {
126 id: iconItem126 id: iconItem
127 width: parent.itemWidth + units.gu(1)127 width: root.width
128 height: parent.itemHeight + units.gu(1)128 height: parent.itemHeight + units.gu(1)
129 anchors.centerIn: parent129 anchors.centerIn: parent
130130
@@ -142,7 +142,7 @@
142 ProportionalShape {142 ProportionalShape {
143 id: iconShape143 id: iconShape
144 anchors.centerIn: parent144 anchors.centerIn: parent
145 width: parent.width - units.gu(2)145 width: root.itemWidth
146 aspect: UbuntuShape.DropShadow146 aspect: UbuntuShape.DropShadow
147 source: Image {147 source: Image {
148 id: iconImage148 id: iconImage
@@ -158,7 +158,8 @@
158 anchors {158 anchors {
159 right: parent.right159 right: parent.right
160 bottom: parent.bottom160 bottom: parent.bottom
161 margins: units.dp(3)161 rightMargin: (iconItem.width - root.itemWidth) / 2 - units.dp(2)
162 margins: units.dp(5)
162 }163 }
163 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))164 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
164 height: units.gu(2)165 height: units.gu(2)
@@ -186,16 +187,11 @@
186 id: progressOverlay187 id: progressOverlay
187 objectName: "progressOverlay"188 objectName: "progressOverlay"
188189
189 anchors {190 anchors.centerIn: parent
190 left: iconItem.left191 width: root.itemWidth * .8
191 right: iconItem.right
192 verticalCenter: parent.verticalCenter
193 leftMargin: units.gu(1.5)
194 rightMargin: units.gu(1.5)
195 }
196 height: units.gu(1)192 height: units.gu(1)
197 visible: root.progress > -1193 visible: root.progress > -1
198 color: UbuntuColors.darkGrey194 backgroundColor: UbuntuColors.darkGrey
199 borderSource: "none"195 borderSource: "none"
200196
201 Item {197 Item {
@@ -213,7 +209,7 @@
213 top: parent.top209 top: parent.top
214 bottom: parent.bottom210 bottom: parent.bottom
215 }211 }
216 color: "white"212 backgroundColor: "white"
217 borderSource: "none"213 borderSource: "none"
218 width: progressOverlay.width214 width: progressOverlay.width
219 }215 }
220216
=== modified file 'qml/Launcher/LauncherPanel.qml'
--- qml/Launcher/LauncherPanel.qml 2016-02-19 15:10:33 +0000
+++ qml/Launcher/LauncherPanel.qml 2016-02-19 15:10:34 +0000
@@ -53,14 +53,14 @@
53 if (highlightIndex >= launcherListView.count) {53 if (highlightIndex >= launcherListView.count) {
54 highlightIndex = -1;54 highlightIndex = -1;
55 }55 }
56 moveAnimation.moveToIndex(Math.max(highlightIndex, 0));56 launcherListView.moveToIndex(Math.max(highlightIndex, 0));
57 }57 }
58 function highlightPrevious() {58 function highlightPrevious() {
59 highlightIndex--;59 highlightIndex--;
60 if (highlightIndex <= -2) {60 if (highlightIndex <= -2) {
61 highlightIndex = launcherListView.count - 1;61 highlightIndex = launcherListView.count - 1;
62 }62 }
63 moveAnimation.moveToIndex(Math.max(highlightIndex, 0));63 launcherListView.moveToIndex(Math.max(highlightIndex, 0));
64 }64 }
65 function openQuicklist(index) {65 function openQuicklist(index) {
66 quickList.open(index);66 quickList.open(index);
@@ -83,13 +83,13 @@
83 Rectangle {83 Rectangle {
84 objectName: "buttonShowDashHome"84 objectName: "buttonShowDashHome"
85 width: parent.width85 width: parent.width
86 height: units.gu(7)86 height: width * .9
87 color: UbuntuColors.orange87 color: UbuntuColors.orange
88 readonly property bool highlighted: root.highlightIndex == -1;88 readonly property bool highlighted: root.highlightIndex == -1;
8989
90 Image {90 Image {
91 objectName: "dashItem"91 objectName: "dashItem"
92 width: units.gu(5)92 width: parent.width * .6
93 height: width93 height: width
94 anchors.centerIn: parent94 anchors.centerIn: parent
95 source: "graphics/home.png"95 source: "graphics/home.png"
@@ -125,10 +125,8 @@
125 objectName: "launcherListView"125 objectName: "launcherListView"
126 anchors {126 anchors {
127 fill: parent127 fill: parent
128 topMargin: -extensionSize + units.gu(0.5)128 topMargin: -extensionSize + width * .15
129 bottomMargin: -extensionSize + units.gu(1)129 bottomMargin: -extensionSize + width * .15
130 leftMargin: units.gu(0.5)
131 rightMargin: units.gu(0.5)
132 }130 }
133 topMargin: extensionSize131 topMargin: extensionSize
134 bottomMargin: extensionSize132 bottomMargin: extensionSize
@@ -163,11 +161,11 @@
163 }161 }
164162
165 // The height of the area where icons start getting folded163 // The height of the area where icons start getting folded
166 property int foldingStartHeight: units.gu(6.5)164 property int foldingStartHeight: itemHeight
167 // The height of the area where the items reach the final folding angle165 // The height of the area where the items reach the final folding angle
168 property int foldingStopHeight: foldingStartHeight - itemHeight - spacing166 property int foldingStopHeight: foldingStartHeight - itemHeight - spacing
169 property int itemWidth: units.gu(7)167 property int itemWidth: width * .75
170 property int itemHeight: units.gu(6.5)168 property int itemHeight: itemWidth * 15 / 16 + units.gu(1)
171 property int clickFlickSpeed: units.gu(60)169 property int clickFlickSpeed: units.gu(60)
172 property int draggedIndex: dndArea.draggedIndex170 property int draggedIndex: dndArea.draggedIndex
173 property real realContentY: contentY - originY + topMargin171 property real realContentY: contentY - originY + topMargin
@@ -195,22 +193,24 @@
195193
196 UbuntuNumberAnimation {194 UbuntuNumberAnimation {
197 id: moveAnimation195 id: moveAnimation
196 objectName: "moveAnimation"
198 target: launcherListView197 target: launcherListView
199 property: "contentY"198 property: "contentY"
200 function moveTo(contentY) {199 function moveTo(contentY) {
201 from = launcherListView.contentY;200 from = launcherListView.contentY;
202 to = contentY;201 to = contentY;
203 start();202 restart();
204 }203 }
205 function moveToIndex(index) {204 }
206 var itemPosition = index * launcherListView.itemHeight;205 function moveToIndex(index) {
207 var height = launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin206 var totalItemHeight = launcherListView.itemHeight + launcherListView.spacing
208 var distanceToEnd = index == 0 || index == launcherListView.count - 1 ? 0 : launcherListView.itemHeight207 var itemPosition = index * totalItemHeight;
209 if (itemPosition + launcherListView.itemHeight + distanceToEnd > launcherListView.contentY + launcherListView.topMargin + height) {208 var height = launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin
210 moveAnimation.moveTo(itemPosition + launcherListView.itemHeight - launcherListView.topMargin - height + distanceToEnd);209 var distanceToEnd = index == 0 || index == launcherListView.count - 1 ? 0 : totalItemHeight
211 } else if (itemPosition - distanceToEnd < launcherListView.contentY + launcherListView.topMargin) {210 if (itemPosition + totalItemHeight + distanceToEnd > launcherListView.contentY + launcherListView.originY + launcherListView.topMargin + height) {
212 moveAnimation.moveTo(itemPosition - distanceToEnd - launcherListView.topMargin);211 moveAnimation.moveTo(itemPosition + launcherListView.itemHeight - launcherListView.topMargin - height + distanceToEnd - launcherListView.originY);
213 }212 } else if (itemPosition - distanceToEnd < launcherListView.contentY - launcherListView.originY + launcherListView.topMargin) {
213 moveAnimation.moveTo(itemPosition - distanceToEnd - launcherListView.topMargin + launcherListView.originY);
214 }214 }
215 }215 }
216216
@@ -228,7 +228,7 @@
228 itemIndex: index228 itemIndex: index
229 itemHeight: launcherListView.itemHeight229 itemHeight: launcherListView.itemHeight
230 itemWidth: launcherListView.itemWidth230 itemWidth: launcherListView.itemWidth
231 width: itemWidth231 width: parent.width
232 height: itemHeight232 height: itemHeight
233 iconName: model.icon233 iconName: model.icon
234 count: model.count234 count: model.count
@@ -277,7 +277,7 @@
277 onAlertingChanged: {277 onAlertingChanged: {
278 if(alerting) {278 if(alerting) {
279 if (!dragging && (launcherListView.peekingIndex === -1 || launcher.visibleWidth > 0)) {279 if (!dragging && (launcherListView.peekingIndex === -1 || launcher.visibleWidth > 0)) {
280 moveAnimation.moveToIndex(index)280 launcherListView.moveToIndex(index)
281 if (!dragging && launcher.state !== "visible") {281 if (!dragging && launcher.state !== "visible") {
282 peekingAnimation.start()282 peekingAnimation.start()
283 }283 }
@@ -439,10 +439,8 @@
439439
440 // First/last item do the scrolling at more than 12 degrees440 // First/last item do the scrolling at more than 12 degrees
441 if (index == 0 || index == launcherListView.count - 1) {441 if (index == 0 || index == launcherListView.count - 1) {
442 if (clickedItem.angle > 12) {442 if (clickedItem.angle > 12 || clickedItem.angle < -12) {
443 launcherListView.flick(0, -launcherListView.clickFlickSpeed);443 launcherListView.moveToIndex(index);
444 } else if (clickedItem.angle < -12) {
445 launcherListView.flick(0, launcherListView.clickFlickSpeed);
446 } else {444 } else {
447 root.applicationSelected(LauncherModel.get(index).appId);445 root.applicationSelected(LauncherModel.get(index).appId);
448 }446 }
@@ -450,10 +448,8 @@
450 }448 }
451449
452 // the rest launches apps up to an angle of 30 degrees450 // the rest launches apps up to an angle of 30 degrees
453 if (clickedItem.angle > 30) {451 if (clickedItem.angle > 30 || clickedItem.angle < -30) {
454 launcherListView.flick(0, -launcherListView.clickFlickSpeed);452 launcherListView.moveToIndex(index);
455 } else if (clickedItem.angle < -30) {
456 launcherListView.flick(0, launcherListView.clickFlickSpeed);
457 } else {453 } else {
458 root.applicationSelected(LauncherModel.get(index).appId);454 root.applicationSelected(LauncherModel.get(index).appId);
459 }455 }
@@ -668,7 +664,6 @@
668 onClicked: {664 onClicked: {
669 quickList.state = "";665 quickList.state = "";
670 quickList.focus = false;666 quickList.focus = false;
671 root.highlightIndex = -2;
672 root.kbdNavigationCancelled();667 root.kbdNavigationCancelled();
673 }668 }
674669
@@ -739,16 +734,21 @@
739 case Qt.Key_Left:734 case Qt.Key_Left:
740 case Qt.Key_Escape:735 case Qt.Key_Escape:
741 quickList.selectedIndex = -1;736 quickList.selectedIndex = -1;
742 // Falling through intentionally737 quickList.focus = false;
738 quickList.state = ""
739 event.accepted = true;
740 break;
743 case Qt.Key_Enter:741 case Qt.Key_Enter:
744 case Qt.Key_Return:742 case Qt.Key_Return:
745 case Qt.Key_Space:743 case Qt.Key_Space:
746 if (quickList.selectedIndex >= 0) {744 if (quickList.selectedIndex >= 0) {
747 LauncherModel.quickListActionInvoked(quickList.appId, quickList.selectedIndex)745 LauncherModel.quickListActionInvoked(quickList.appId, quickList.selectedIndex)
748 }746 }
747 quickList.selectedIndex = -1;
749 quickList.focus = false;748 quickList.focus = false;
750 quickList.state = ""749 quickList.state = ""
751 // Don't consume the event. We want to close the Launcher too, not just the quicklist.750 root.kbdNavigationCancelled();
751 event.accepted = true;
752 break;752 break;
753 }753 }
754 }754 }
755755
=== modified file 'qml/Shell.qml'
--- qml/Shell.qml 2016-02-19 15:10:33 +0000
+++ qml/Shell.qml 2016-02-19 15:10:34 +0000
@@ -25,6 +25,7 @@
25import Unity.Connectivity 0.125import Unity.Connectivity 0.1
26import Unity.Launcher 0.126import Unity.Launcher 0.1
27import GlobalShortcut 1.0 // has to be before Utils, because of WindowKeysFilter27import GlobalShortcut 1.0 // has to be before Utils, because of WindowKeysFilter
28import GSettings 1.0
28import Utils 0.129import Utils 0.1
29import Powerd 0.130import Powerd 0.1
30import SessionBroadcast 0.131import SessionBroadcast 0.1
@@ -187,6 +188,11 @@
187 }188 }
188 }189 }
189190
191 GSettings {
192 id: settings
193 schema.id: "com.canonical.Unity8"
194 }
195
190 Item {196 Item {
191 id: stages197 id: stages
192 objectName: "stages"198 objectName: "stages"
@@ -343,6 +349,11 @@
343 property: "altTabPressed"349 property: "altTabPressed"
344 value: physicalKeysMapper.altTabPressed350 value: physicalKeysMapper.altTabPressed
345 }351 }
352 Binding {
353 target: applicationsDisplayLoader.item
354 property: "leftMargin"
355 value: shell.usageScenario == "desktop" && !settings.autohideLauncher ? launcher.panelWidth: 0
356 }
346 }357 }
347358
348 Tutorial {359 Tutorial {
@@ -373,7 +384,11 @@
373 InputMethod {384 InputMethod {
374 id: inputMethod385 id: inputMethod
375 objectName: "inputMethod"386 objectName: "inputMethod"
376 anchors { fill: parent; topMargin: panel.panelHeight }387 anchors {
388 fill: parent
389 topMargin: panel.panelHeight
390 leftMargin: launcher.lockedVisible ? launcher.panelWidth : 0
391 }
377 z: notifications.useModal || panel.indicators.shown || wizard.active ? overlay.z + 1 : overlay.z - 1392 z: notifications.useModal || panel.indicators.shown || wizard.active ? overlay.z + 1 : overlay.z - 1
378 }393 }
379394
@@ -559,6 +574,8 @@
559 shadeBackground: !tutorial.running574 shadeBackground: !tutorial.running
560 superPressed: physicalKeysMapper.superPressed575 superPressed: physicalKeysMapper.superPressed
561 superTabPressed: physicalKeysMapper.superTabPressed576 superTabPressed: physicalKeysMapper.superTabPressed
577 panelWidth: units.gu(settings.launcherWidth)
578 lockedVisible: shell.usageScenario == "desktop" && !settings.autohideLauncher && !panel.fullscreenMode
562579
563 onShowDashHome: showHome()580 onShowDashHome: showHome()
564 onDash: showDash()581 onDash: showDash()
565582
=== modified file 'qml/Stages/AbstractStage.qml'
--- qml/Stages/AbstractStage.qml 2016-02-19 15:10:33 +0000
+++ qml/Stages/AbstractStage.qml 2016-02-19 15:10:34 +0000
@@ -42,6 +42,8 @@
42 property int shellOrientationAngle42 property int shellOrientationAngle
43 property bool spreadEnabled: true // If false, animations and right edge will be disabled43 property bool spreadEnabled: true // If false, animations and right edge will be disabled
44 property bool suspended44 property bool suspended
45 // A Stage should paint a wallpaper etc over its full size but not use the margins for window placement
46 property int leftMargin: 0
4547
46 // To be read from outside48 // To be read from outside
47 property var mainApp: null49 property var mainApp: null
4850
=== modified file 'qml/Stages/DesktopStage.qml'
--- qml/Stages/DesktopStage.qml 2016-02-19 15:10:33 +0000
+++ qml/Stages/DesktopStage.qml 2016-02-19 15:10:34 +0000
@@ -226,6 +226,7 @@
226 PanelState.dropShadow = false;226 PanelState.dropShadow = false;
227 }227 }
228228
229
229 FocusScope {230 FocusScope {
230 id: appContainer231 id: appContainer
231 objectName: "appContainer"232 objectName: "appContainer"
@@ -297,6 +298,7 @@
297 visible: !visuallyMinimized &&298 visible: !visuallyMinimized &&
298 !greeter.fullyShown &&299 !greeter.fullyShown &&
299 (priv.foregroundMaximizedAppZ === -1 || priv.foregroundMaximizedAppZ <= z) ||300 (priv.foregroundMaximizedAppZ === -1 || priv.foregroundMaximizedAppZ <= z) ||
301 decoratedWindow.fullscreen ||
300 (spread.state == "altTab" && index === spread.highlightedIndex)302 (spread.state == "altTab" && index === spread.highlightedIndex)
301303
302 Binding {304 Binding {
@@ -368,10 +370,10 @@
368 states: [370 states: [
369 State {371 State {
370 name: "fullscreen"; when: decoratedWindow.fullscreen372 name: "fullscreen"; when: decoratedWindow.fullscreen
371 extend: "maximized"
372 PropertyChanges {373 PropertyChanges {
373 target: appDelegate;374 target: appDelegate;
374 y: -PanelState.panelHeight375 x: 0; y: -PanelState.panelHeight
376 requestedWidth: appContainer.width; requestedHeight: appContainer.height;
375 }377 }
376 },378 },
377 State {379 State {
@@ -388,21 +390,21 @@
388 name: "maximized"; when: appDelegate.maximized && !appDelegate.minimized390 name: "maximized"; when: appDelegate.maximized && !appDelegate.minimized
389 PropertyChanges {391 PropertyChanges {
390 target: appDelegate;392 target: appDelegate;
391 x: 0; y: 0;393 x: root.leftMargin; y: 0;
392 requestedWidth: root.width; requestedHeight: root.height;394 requestedWidth: appContainer.width - root.leftMargin; requestedHeight: appContainer.height;
393 visuallyMinimized: false;395 visuallyMinimized: false;
394 visuallyMaximized: true396 visuallyMaximized: true
395 }397 }
396 },398 },
397 State {399 State {
398 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized400 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
399 PropertyChanges { target: appDelegate; x: 0; y: PanelState.panelHeight;401 PropertyChanges { target: appDelegate; x: root.leftMargin; y: PanelState.panelHeight;
400 requestedWidth: root.width/2; requestedHeight: root.height - PanelState.panelHeight }402 requestedWidth: (appContainer.width - root.leftMargin)/2; requestedHeight: appContainer.height - PanelState.panelHeight }
401 },403 },
402 State {404 State {
403 name: "maximizedRight"; when: appDelegate.maximizedRight && !appDelegate.minimized405 name: "maximizedRight"; when: appDelegate.maximizedRight && !appDelegate.minimized
404 PropertyChanges { target: appDelegate; x: root.width/2; y: PanelState.panelHeight;406 PropertyChanges { target: appDelegate; x: (appContainer.width + root.leftMargin)/2; y: PanelState.panelHeight;
405 requestedWidth: root.width/2; requestedHeight: root.height - PanelState.panelHeight }407 requestedWidth: (appContainer.width - root.leftMargin)/2; requestedHeight: appContainer.height - PanelState.panelHeight }
406 },408 },
407 State {409 State {
408 name: "minimized"; when: appDelegate.minimized410 name: "minimized"; when: appDelegate.minimized
@@ -465,8 +467,9 @@
465 minHeight: units.gu(10)467 minHeight: units.gu(10)
466 borderThickness: units.gu(2)468 borderThickness: units.gu(2)
467 windowId: model.appId // FIXME: Change this to point to windowId once we have such a thing469 windowId: model.appId // FIXME: Change this to point to windowId once we have such a thing
468 screenWidth: root.width470 screenWidth: appContainer.width
469 screenHeight: root.height471 screenHeight: appContainer.height
472 leftMargin: root.leftMargin
470473
471 onPressed: { ApplicationManager.focusApplication(model.appId) }474 onPressed: { ApplicationManager.focusApplication(model.appId) }
472 }475 }
@@ -523,7 +526,7 @@
523 DesktopSpread {526 DesktopSpread {
524 id: spread527 id: spread
525 objectName: "spread"528 objectName: "spread"
526 anchors.fill: parent529 anchors.fill: appContainer
527 workspace: appContainer530 workspace: appContainer
528 focus: state == "altTab"531 focus: state == "altTab"
529 altTabPressed: root.altTabPressed532 altTabPressed: root.altTabPressed
530533
=== modified file 'qml/Stages/WindowResizeArea.qml'
--- qml/Stages/WindowResizeArea.qml 2016-02-03 14:00:47 +0000
+++ qml/Stages/WindowResizeArea.qml 2016-02-19 15:10:34 +0000
@@ -40,6 +40,7 @@
40 property int defaultHeight: units.gu(50)40 property int defaultHeight: units.gu(50)
41 property int screenWidth: 041 property int screenWidth: 0
42 property int screenHeight: 042 property int screenHeight: 0
43 property int leftMargin: 0
4344
44 QtObject {45 QtObject {
45 id: priv46 id: priv
@@ -72,9 +73,9 @@
72 var windowGeometry = windowStateStorage.getGeometry(root.windowId,73 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
73 Qt.rect(target.x, target.y, defaultWidth, defaultHeight));74 Qt.rect(target.x, target.y, defaultWidth, defaultHeight));
7475
75 target.requestedWidth = Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth);76 target.requestedWidth = Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin);
76 target.requestedHeight = Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight);77 target.requestedHeight = Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight);
77 target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - target.requestedWidth), 0)78 target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin)
78 target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight)79 target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight)
7980
80 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)81 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
8182
=== modified file 'tests/mocks/GSettings.1.0/fake_gsettings.cpp'
--- tests/mocks/GSettings.1.0/fake_gsettings.cpp 2015-09-29 20:19:56 +0000
+++ tests/mocks/GSettings.1.0/fake_gsettings.cpp 2016-02-19 15:10:34 +0000
@@ -22,6 +22,8 @@
2222
23GSettingsControllerQml::GSettingsControllerQml()23GSettingsControllerQml::GSettingsControllerQml()
24 : m_usageMode("Staged")24 : m_usageMode("Staged")
25 , m_autohideLauncher(false)
26 , m_launcherWidth(8)
25{27{
26}28}
2729
@@ -88,6 +90,32 @@
88 }90 }
89}91}
9092
93bool GSettingsControllerQml::autohideLauncher() const
94{
95 return m_autohideLauncher;
96}
97
98void GSettingsControllerQml::setAutohideLauncher(bool autohideLauncher)
99{
100 if (m_autohideLauncher != autohideLauncher) {
101 m_autohideLauncher = autohideLauncher;
102 Q_EMIT autohideLauncherChanged(autohideLauncher);
103 }
104}
105
106int GSettingsControllerQml::launcherWidth() const
107{
108 return m_launcherWidth;
109}
110
111void GSettingsControllerQml::setLauncherWidth(int launcherWidth)
112{
113 if (m_launcherWidth != launcherWidth) {
114 m_launcherWidth = launcherWidth;
115 Q_EMIT launcherWidthChanged(launcherWidth);
116 }
117}
118
91GSettingsSchemaQml::GSettingsSchemaQml(QObject *parent): QObject(parent) {119GSettingsSchemaQml::GSettingsSchemaQml(QObject *parent): QObject(parent) {
92}120}
93121
@@ -129,6 +157,10 @@
129 this, &GSettingsQml::lockedOutTimeChanged);157 this, &GSettingsQml::lockedOutTimeChanged);
130 connect(GSettingsControllerQml::instance(), &GSettingsControllerQml::lifecycleExemptAppidsChanged,158 connect(GSettingsControllerQml::instance(), &GSettingsControllerQml::lifecycleExemptAppidsChanged,
131 this, &GSettingsQml::lifecycleExemptAppidsChanged);159 this, &GSettingsQml::lifecycleExemptAppidsChanged);
160 connect(GSettingsControllerQml::instance(), &GSettingsControllerQml::autohideLauncherChanged,
161 this, &GSettingsQml::autohideLauncherChanged);
162 connect(GSettingsControllerQml::instance(), &GSettingsControllerQml::launcherWidthChanged,
163 this, &GSettingsQml::launcherWidthChanged);
132}164}
133165
134GSettingsSchemaQml * GSettingsQml::schema() const {166GSettingsSchemaQml * GSettingsQml::schema() const {
@@ -192,9 +224,41 @@
192 }224 }
193}225}
194226
227bool GSettingsQml::autohideLauncher() const
228{
229 if (m_schema->id() == "com.canonical.Unity8") {
230 return GSettingsControllerQml::instance()->autohideLauncher();
231 } else {
232 return false;
233 }
234}
235
236int GSettingsQml::launcherWidth() const
237{
238 if (m_schema->id() == "com.canonical.Unity8") {
239 return GSettingsControllerQml::instance()->launcherWidth();
240 } else {
241 return false;
242 }
243}
244
195void GSettingsQml::setLifecycleExemptAppids(const QStringList &appIds)245void GSettingsQml::setLifecycleExemptAppids(const QStringList &appIds)
196{246{
197 if (m_schema->id() == "com.canonical.qtmir") {247 if (m_schema->id() == "com.canonical.qtmir") {
198 GSettingsControllerQml::instance()->setLifecycleExemptAppids(appIds);248 GSettingsControllerQml::instance()->setLifecycleExemptAppids(appIds);
199 }249 }
200}250}
251
252void GSettingsQml::setAutohideLauncher(bool autohideLauncher)
253{
254 if (m_schema->id() == "com.canonical.Unity8") {
255 GSettingsControllerQml::instance()->setAutohideLauncher(autohideLauncher);
256 }
257}
258
259void GSettingsQml::setLauncherWidth(int launcherWidth)
260{
261 if (m_schema->id() == "com.canonical.Unity8") {
262 GSettingsControllerQml::instance()->setLauncherWidth(launcherWidth);
263 }
264}
201265
=== modified file 'tests/mocks/GSettings.1.0/fake_gsettings.h'
--- tests/mocks/GSettings.1.0/fake_gsettings.h 2015-09-29 20:19:56 +0000
+++ tests/mocks/GSettings.1.0/fake_gsettings.h 2016-02-19 15:10:34 +0000
@@ -50,6 +50,8 @@
50 Q_PROPERTY(QString usageMode READ usageMode WRITE setUsageMode NOTIFY usageModeChanged)50 Q_PROPERTY(QString usageMode READ usageMode WRITE setUsageMode NOTIFY usageModeChanged)
51 Q_PROPERTY(qint64 lockedOutTime READ lockedOutTime WRITE setLockedOutTime NOTIFY lockedOutTimeChanged)51 Q_PROPERTY(qint64 lockedOutTime READ lockedOutTime WRITE setLockedOutTime NOTIFY lockedOutTimeChanged)
52 Q_PROPERTY(QStringList lifecycleExemptAppids READ lifecycleExemptAppids WRITE setLifecycleExemptAppids NOTIFY lifecycleExemptAppidsChanged)52 Q_PROPERTY(QStringList lifecycleExemptAppids READ lifecycleExemptAppids WRITE setLifecycleExemptAppids NOTIFY lifecycleExemptAppidsChanged)
53 Q_PROPERTY(bool autohideLauncher READ autohideLauncher WRITE setAutohideLauncher NOTIFY autohideLauncherChanged)
54 Q_PROPERTY(int launcherWidth READ launcherWidth WRITE setLauncherWidth NOTIFY launcherWidthChanged)
5355
54public:56public:
55 GSettingsQml(QObject *parent = nullptr);57 GSettingsQml(QObject *parent = nullptr);
@@ -59,11 +61,15 @@
59 QString usageMode() const;61 QString usageMode() const;
60 qint64 lockedOutTime() const;62 qint64 lockedOutTime() const;
61 QStringList lifecycleExemptAppids() const;63 QStringList lifecycleExemptAppids() const;
64 bool autohideLauncher() const;
65 int launcherWidth() const;
6266
63 void setPictureUri(const QString &str);67 void setPictureUri(const QString &str);
64 void setUsageMode(const QString &usageMode);68 void setUsageMode(const QString &usageMode);
65 void setLockedOutTime(qint64 timestamp);69 void setLockedOutTime(qint64 timestamp);
66 void setLifecycleExemptAppids(const QStringList &appIds);70 void setLifecycleExemptAppids(const QStringList &appIds);
71 void setAutohideLauncher(bool autohideLauncher);
72 void setLauncherWidth(int launcherWidth);
6773
68Q_SIGNALS:74Q_SIGNALS:
69 void schemaChanged();75 void schemaChanged();
@@ -71,6 +77,8 @@
71 void usageModeChanged(const QString&);77 void usageModeChanged(const QString&);
72 void lockedOutTimeChanged(qint64);78 void lockedOutTimeChanged(qint64);
73 void lifecycleExemptAppidsChanged(const QStringList &);79 void lifecycleExemptAppidsChanged(const QStringList &);
80 void autohideLauncherChanged(bool);
81 void launcherWidthChanged(int launcherWidth);
7482
75private:83private:
76 GSettingsSchemaQml* m_schema;84 GSettingsSchemaQml* m_schema;
@@ -98,11 +106,19 @@
98 QStringList lifecycleExemptAppids() const;106 QStringList lifecycleExemptAppids() const;
99 Q_INVOKABLE void setLifecycleExemptAppids(const QStringList &appIds);107 Q_INVOKABLE void setLifecycleExemptAppids(const QStringList &appIds);
100108
109 bool autohideLauncher() const;
110 Q_INVOKABLE void setAutohideLauncher(bool autohideLauncher);
111
112 int launcherWidth() const;
113 Q_INVOKABLE void setLauncherWidth(int launcherWidth);
114
101Q_SIGNALS:115Q_SIGNALS:
102 void pictureUriChanged(const QString&);116 void pictureUriChanged(const QString&);
103 void usageModeChanged(const QString&);117 void usageModeChanged(const QString&);
104 void lockedOutTimeChanged(qint64 timestamp);118 void lockedOutTimeChanged(qint64 timestamp);
105 void lifecycleExemptAppidsChanged(const QStringList&);119 void lifecycleExemptAppidsChanged(const QStringList&);
120 void autohideLauncherChanged(bool autohideLauncher);
121 void launcherWidthChanged(int launcherWidth);
106122
107private:123private:
108 GSettingsControllerQml();124 GSettingsControllerQml();
@@ -111,6 +127,8 @@
111 QString m_usageMode;127 QString m_usageMode;
112 qint64 m_lockedOutTime;128 qint64 m_lockedOutTime;
113 QStringList m_lifecycleExemptAppids;129 QStringList m_lifecycleExemptAppids;
130 bool m_autohideLauncher;
131 int m_launcherWidth;
114132
115 static GSettingsControllerQml* s_controllerInstance;133 static GSettingsControllerQml* s_controllerInstance;
116 QList<GSettingsQml *> m_registeredGSettings;134 QList<GSettingsQml *> m_registeredGSettings;
117135
=== modified file 'tests/qmltests/Launcher/tst_Launcher.qml'
--- tests/qmltests/Launcher/tst_Launcher.qml 2016-02-19 15:10:33 +0000
+++ tests/qmltests/Launcher/tst_Launcher.qml 2016-02-19 15:10:34 +0000
@@ -28,8 +28,8 @@
28 launcher. */28 launcher. */
29Item {29Item {
30 id: root30 id: root
31 width: units.gu(50)31 width: units.gu(140)
32 height: units.gu(55)32 height: units.gu(70)
3333
34 Loader {34 Loader {
35 id: launcherLoader35 id: launcherLoader
@@ -79,11 +79,40 @@
79 }79 }
80 }80 }
8181
82 Binding {
83 target: launcherLoader.item
84 property: "lockedVisible"
85 value: lockedVisibleCheckBox.checked
86 }
87 Binding {
88 target: launcherLoader.item
89 property: "panelWidth"
90 value: units.gu(Math.round(widthSlider.value))
91 }
92
82 ColumnLayout {93 ColumnLayout {
83 anchors { bottom: parent.bottom; right: parent.right; margins: units.gu(1) }94 anchors { bottom: parent.bottom; right: parent.right; margins: units.gu(1) }
84 spacing: units.gu(1)95 spacing: units.gu(1)
85 width: childrenRect.width96 width: childrenRect.width
8697
98 RowLayout {
99 CheckBox {
100 id: lockedVisibleCheckBox
101 checked: false
102 }
103 Label {
104 text: "Launcher always visible"
105 }
106 }
107
108 Slider {
109 id: widthSlider
110 Layout.fillWidth: true
111 minimumValue: 6
112 maximumValue: 12
113 value: 10
114 }
115
87 MouseTouchEmulationCheckbox {}116 MouseTouchEmulationCheckbox {}
88117
89 EdgeBarrierControls {118 EdgeBarrierControls {
@@ -217,10 +246,6 @@
217 // growing while populating it with icons etc.246 // growing while populating it with icons etc.
218 tryCompare(listView, "flicking", false);247 tryCompare(listView, "flicking", false);
219248
220 // Make sure noone changed the height of the window. The issue this test case
221 // is verifying only happens on certain heights of the Launcher
222 compare(root.height, units.gu(55));
223
224 compare(listView.contentY, -listView.topMargin, "Launcher did not start up with first item unfolded");249 compare(listView.contentY, -listView.topMargin, "Launcher did not start up with first item unfolded");
225250
226 // Now do check that snapping is in fact enabled251 // Now do check that snapping is in fact enabled
@@ -277,14 +302,21 @@
277302
278 function positionLauncherListAtBeginning() {303 function positionLauncherListAtBeginning() {
279 var listView = testCase.findChild(launcherLoader.item, "launcherListView");304 var listView = testCase.findChild(launcherLoader.item, "launcherListView");
280 listView.contentY = -listView.topMargin;305 var moveAnimation = findInvisibleChild(listView, "moveAnimation")
306
307 listView.moveToIndex(0);
308
309 waitForRendering(listView);
310 tryCompare(moveAnimation, "running", false);
281 }311 }
282 function positionLauncherListAtEnd() {312 function positionLauncherListAtEnd() {
283 var listView = testCase.findChild(launcherLoader.item, "launcherListView");313 var listView = testCase.findChild(launcherLoader.item, "launcherListView");
284 if ((listView.contentHeight + listView.topMargin + listView.bottomMargin) > listView.height) {314 var moveAnimation = findInvisibleChild(listView, "moveAnimation")
285 listView.contentY = listView.topMargin + listView.contentHeight315
286 - listView.height;316 listView.moveToIndex(listView.count -1);
287 }317
318 waitForRendering(listView);
319 tryCompare(moveAnimation, "running", false);
288 }320 }
289321
290 function assertFocusOnIndex(index) {322 function assertFocusOnIndex(index) {
@@ -292,10 +324,10 @@
292 var bfbFocusHighlight = findChild(launcher, "bfbFocusHighlight");324 var bfbFocusHighlight = findChild(launcher, "bfbFocusHighlight");
293325
294 waitForRendering(launcher);326 waitForRendering(launcher);
295 tryCompare(bfbFocusHighlight, "visible", index === -1);327 compare(bfbFocusHighlight.visible, index === -1);
296 for (var i = 0; i < launcherListView.count; i++) {328 for (var i = 0; i < launcherListView.count; i++) {
297 var focusRing = findChild(findChild(launcher, "launcherDelegate" + i), "focusRing")329 var focusRing = findChild(findChild(launcher, "launcherDelegate" + i), "focusRing")
298 tryCompare(focusRing, "visible", index === i);330 compare(focusRing.visible, index === i);
299 }331 }
300 }332 }
301333
@@ -400,6 +432,7 @@
400 wait(100)432 wait(100)
401 compare(launcher.maxPanelX, -launcher.panelWidth, "Launcher moved even if it shouldn't")433 compare(launcher.maxPanelX, -launcher.panelWidth, "Launcher moved even if it shouldn't")
402 }434 }
435
403 waitUntilLauncherDisappears();436 waitUntilLauncherDisappears();
404 launcher.available = true;437 launcher.available = true;
405 }438 }
@@ -423,6 +456,8 @@
423 dragLauncherIntoView();456 dragLauncherIntoView();
424 var launcherListView = findChild(launcher, "launcherListView");457 var launcherListView = findChild(launcher, "launcherListView");
425 for (var i = 0; i < launcherListView.count; ++i) {458 for (var i = 0; i < launcherListView.count; ++i) {
459 launcherListView.moveToIndex(i);
460 waitForRendering(launcherListView);
426 var delegate = findChild(launcherListView, "launcherDelegate" + i)461 var delegate = findChild(launcherListView, "launcherDelegate" + i)
427 compare(findChild(delegate, "countEmblem").visible, LauncherModel.get(i).countVisible)462 compare(findChild(delegate, "countEmblem").visible, LauncherModel.get(i).countVisible)
428 // Intentionally allow type coercion (string/number)463 // Intentionally allow type coercion (string/number)
@@ -483,6 +518,7 @@
483 launcher.lastSelectedApplication = "";518 launcher.lastSelectedApplication = "";
484 dragLauncherIntoView();519 dragLauncherIntoView();
485 var listView = findChild(launcher, "launcherListView");520 var listView = findChild(launcher, "launcherListView");
521 var moveAnimation = findInvisibleChild(listView, "moveAnimation")
486522
487 // flicking is unreliable. sometimes it works, sometimes the523 // flicking is unreliable. sometimes it works, sometimes the
488 // list view moves just a tiny bit or not at all, making tests fail.524 // list view moves just a tiny bit or not at all, making tests fail.
@@ -493,12 +529,14 @@
493 } else {529 } else {
494 positionLauncherListAtEnd();530 positionLauncherListAtEnd();
495 }531 }
496 tryCompare(listView, "flicking", false);
497
498 var oldY = listView.contentY;532 var oldY = listView.contentY;
499533
500 mouseClick(listView, listView.width / 2, data.clickY);534 mouseClick(listView, listView.width / 2, data.clickY);
501 tryCompare(listView, "flicking", false);535
536 if (data.expectFlick) {
537 tryCompare(moveAnimation, "running", true);
538 }
539 tryCompare(moveAnimation, "running", false);
502540
503 if (data.expectFlick) {541 if (data.expectFlick) {
504 verify(listView.contentY != oldY);542 verify(listView.contentY != oldY);
@@ -1086,12 +1124,15 @@
1086 function test_keyboardNavigation() {1124 function test_keyboardNavigation() {
1087 var bfbFocusHighlight = findChild(launcher, "bfbFocusHighlight");1125 var bfbFocusHighlight = findChild(launcher, "bfbFocusHighlight");
1088 var quickList = findChild(launcher, "quickList");1126 var quickList = findChild(launcher, "quickList");
1127 var launcherPanel = findChild(launcher, "launcherPanel");
1089 var launcherListView = findChild(launcher, "launcherListView");1128 var launcherListView = findChild(launcher, "launcherListView");
1090 var last = launcherListView.count - 1;1129 var last = launcherListView.count - 1;
10911130
1092 compare(bfbFocusHighlight.visible, false);1131 compare(bfbFocusHighlight.visible, false);
10931132
1094 launcher.openForKeyboardNavigation();1133 launcher.openForKeyboardNavigation();
1134 tryCompare(launcherPanel, "x", 0);
1135 waitForRendering(launcher);
10951136
1096 assertFocusOnIndex(-1);1137 assertFocusOnIndex(-1);
10971138
@@ -1164,11 +1205,47 @@
1164 compare(signalSpy.count, 1, "Quicklist signal wasn't triggered")1205 compare(signalSpy.count, 1, "Quicklist signal wasn't triggered")
1165 compare(signalSpy.signalArguments[0][0], LauncherModel.get(1).appId)1206 compare(signalSpy.signalArguments[0][0], LauncherModel.get(1).appId)
1166 compare(signalSpy.signalArguments[0][1], 2)1207 compare(signalSpy.signalArguments[0][1], 2)
1167 }1208 assertFocusOnIndex(-2);
11681209 }
1169 function test_cancelKbdNavigationWitMouse() {1210
1211 function test_hideNotWorkingWhenLockedOut_data() {
1212 return [
1213 {tag: "locked visible", locked: true},
1214 {tag: "no locked visible", locked: false},
1215 ]
1216 }
1217
1218 function test_hideNotWorkingWhenLockedOut(data) {
1219 launcher.lockedVisible = data.locked;
1220 if (data.locked) {
1221 tryCompare(launcher, "state", "visible");
1222 } else {
1223 tryCompare(launcher, "state", "");
1224 }
1225
1226 launcher.hide();
1227 waitForRendering(launcher);
1228 if (data.locked) {
1229 verify(launcher.state == "visible");
1230 } else {
1231 verify(launcher.state == "");
1232 }
1233 }
1234
1235 function test_cancelKbdNavigationWitMouse_data() {
1236 return [
1237 {tag: "locked out - no quicklist", autohide: false, withQuickList: false },
1238 {tag: "locked out - with quicklist", autohide: false, withQuickList: true },
1239 {tag: "autohide - no quicklist", autohide: true, withQuickList: false },
1240 {tag: "autohide - with quicklist", autohide: true, withQuickList: true },
1241 ]
1242 }
1243
1244 function test_cancelKbdNavigationWitMouse(data) {
1245 launcher.autohideEnabled = data.autohide;
1170 launcher.openForKeyboardNavigation();1246 launcher.openForKeyboardNavigation();
1171 waitForRendering(launcher);1247 waitForRendering(launcher);
1248
1172 var launcherPanel = findChild(launcher, "launcherPanel");1249 var launcherPanel = findChild(launcher, "launcherPanel");
1173 tryCompare(launcherPanel, "x", 0);1250 tryCompare(launcherPanel, "x", 0);
11741251
@@ -1176,15 +1253,22 @@
11761253
1177 keyClick(Qt.Key_Down); // Down to launcher item 01254 keyClick(Qt.Key_Down); // Down to launcher item 0
1178 keyClick(Qt.Key_Down); // Down to launcher item 11255 keyClick(Qt.Key_Down); // Down to launcher item 1
1179 keyClick(Qt.Key_Right); // Into quicklist
11801256
1257 if (data.withQuickList) {
1258 keyClick(Qt.Key_Right); // Into quicklist
1259 tryCompare(quickList, "visible", true)
1260 }
1181 waitForRendering(launcher)1261 waitForRendering(launcher)
1182 tryCompare(quickList, "visible", true)1262
11831263 mouseClick(root);
1184 mouseClick(root, root.width / 2, units.gu(2));1264
11851265 if (data.autohide) {
1186 tryCompare(launcher, "state", "");1266 tryCompare(launcher, "state", "");
1187 tryCompare(launcherPanel, "highlightIndex", -2);1267 } else {
1268 tryCompare(launcher, "state", "visible");
1269 }
1270
1271 assertFocusOnIndex(-2);
1188 }1272 }
1189 }1273 }
1190}1274}
11911275
=== modified file 'tests/qmltests/tst_Shell.qml'
--- tests/qmltests/tst_Shell.qml 2016-02-19 15:10:33 +0000
+++ tests/qmltests/tst_Shell.qml 2016-02-19 15:10:34 +0000
@@ -223,6 +223,19 @@
223 }223 }
224 }224 }
225225
226 Row {
227 anchors { left: parent.left; right: parent.right }
228 CheckBox {
229 id: autohideLauncherCheckbox
230 onCheckedChanged: {
231 GSettingsController.setAutohideLauncher(checked)
232 }
233 }
234 Label {
235 text: "Autohide launcher"
236 }
237 }
238
226 Label { text: "Applications"; font.bold: true }239 Label { text: "Applications"; font.bold: true }
227240
228 Button {241 Button {
@@ -921,6 +934,7 @@
921 function dragLauncherIntoView() {934 function dragLauncherIntoView() {
922 var launcher = findChild(shell, "launcher");935 var launcher = findChild(shell, "launcher");
923 var launcherPanel = findChild(launcher, "launcherPanel");936 var launcherPanel = findChild(launcher, "launcherPanel");
937 waitForRendering(launcher);
924 verify(launcherPanel.x = - launcherPanel.width);938 verify(launcherPanel.x = - launcherPanel.width);
925939
926 var touchStartX = 2;940 var touchStartX = 2;
@@ -1678,7 +1692,7 @@
1678 var x = 0;1692 var x = 0;
1679 var y = shell.height * .51693 var y = shell.height * .5
1680 mouseMove(shell, x, y)1694 mouseMove(shell, x, y)
1681 while (x <= spreadFlickable.width) {1695 while (x <= shell.width) {
1682 x+=10;1696 x+=10;
1683 mouseMove(shell, x, y)1697 mouseMove(shell, x, y)
1684 wait(0); // spin the loop so bindings get evaluated1698 wait(0); // spin the loop so bindings get evaluated
@@ -1752,25 +1766,38 @@
1752 keyRelease(Qt.Key_Alt);1766 keyRelease(Qt.Key_Alt);
1753 }1767 }
17541768
1755 function test_focusAppFromLauncherExitsSpread() {1769 function test_focusAppFromLauncherExitsSpread_data() {
1770 return [
1771 {tag: "autohide launcher", launcherLocked: false },
1772 {tag: "locked launcher", launcherLocked: true }
1773 ]
1774 }
1775
1776 function test_focusAppFromLauncherExitsSpread(data) {
1756 loadDesktopShellWithApps()1777 loadDesktopShellWithApps()
17571778 var launcher = findChild(shell, "launcher");
1758 var desktopSpread = findChild(shell, "spread");1779 var desktopSpread = findChild(shell, "spread");
1759 var launcher = findChild(shell, "launcher");
1760 var bfb = findChild(launcher, "buttonShowDashHome");1780 var bfb = findChild(launcher, "buttonShowDashHome");
17611781
1782 GSettingsController.setAutohideLauncher(!data.launcherLocked);
1783 waitForRendering(shell);
1784
1762 keyPress(Qt.Key_Alt)1785 keyPress(Qt.Key_Alt)
1763 keyClick(Qt.Key_Tab);1786 keyClick(Qt.Key_Tab);
17641787
1765 tryCompare(desktopSpread, "state", "altTab")1788 tryCompare(desktopSpread, "state", "altTab")
17661789
1767 revealLauncherByEdgePushWithMouse();1790 if (!data.launcherLocked) {
1768 tryCompare(launcher, "x", 0);1791 revealLauncherByEdgePushWithMouse();
1769 mouseMove(bfb, bfb.width / 2, bfb.height / 2)1792 tryCompare(launcher, "x", 0);
1770 waitForRendering(shell)1793 mouseMove(bfb, bfb.width / 2, bfb.height / 2)
1794 waitForRendering(shell)
1795 }
17711796
1772 mouseClick(bfb, bfb.width / 2, bfb.height / 2)1797 mouseClick(bfb, bfb.width / 2, bfb.height / 2)
1773 tryCompare(launcher, "state", "")1798 if (!data.launcherLocked) {
1799 tryCompare(launcher, "state", "")
1800 }
1774 tryCompare(desktopSpread, "state", "")1801 tryCompare(desktopSpread, "state", "")
17751802
1776 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash")1803 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash")
@@ -1998,16 +2025,24 @@
1998 }2025 }
1999 }2026 }
20002027
2001 function test_superTabToCycleLauncher() {2028 function test_superTabToCycleLauncher_data() {
2029 return [
2030 {tag: "autohide launcher", launcherLocked: false},
2031 {tag: "locked launcher", launcherLocked: true}
2032 ]
2033 }
2034
2035 function test_superTabToCycleLauncher(data) {
2002 loadShell("desktop");2036 loadShell("desktop");
2003 shell.usageScenario = "desktop";2037 shell.usageScenario = "desktop";
2038 GSettingsController.setAutohideLauncher(!data.launcherLocked);
2004 waitForRendering(shell);2039 waitForRendering(shell);
20052040
2006 var launcher = findChild(shell, "launcher");2041 var launcher = findChild(shell, "launcher");
2007 var launcherPanel = findChild(launcher, "launcherPanel");2042 var launcherPanel = findChild(launcher, "launcherPanel");
2008 var firstAppInLauncher = LauncherModel.get(0).appId;2043 var firstAppInLauncher = LauncherModel.get(0).appId;
20092044
2010 compare(launcher.state, "");2045 compare(launcher.state, data.launcherLocked ? "visible": "");
2011 compare(launcherPanel.highlightIndex, -2);2046 compare(launcherPanel.highlightIndex, -2);
2012 compare(ApplicationManager.focusedApplicationId, "unity8-dash");2047 compare(ApplicationManager.focusedApplicationId, "unity8-dash");
20132048
@@ -2019,7 +2054,7 @@
2019 keyClick(Qt.Key_Tab);2054 keyClick(Qt.Key_Tab);
2020 tryCompare(launcherPanel, "highlightIndex", 0);2055 tryCompare(launcherPanel, "highlightIndex", 0);
2021 keyRelease(Qt.Key_Super_L, Qt.MetaModifier);2056 keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
2022 tryCompare(launcher, "state", "");2057 tryCompare(launcher, "state", data.launcherLocked ? "visible" : "");
2023 tryCompare(launcherPanel, "highlightIndex", -2);2058 tryCompare(launcherPanel, "highlightIndex", -2);
2024 tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);2059 tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);
20252060
@@ -2029,7 +2064,7 @@
2029 tryCompare(launcher, "state", "visible");2064 tryCompare(launcher, "state", "visible");
2030 tryCompare(launcherPanel, "highlightIndex", -1);2065 tryCompare(launcherPanel, "highlightIndex", -1);
2031 keyRelease(Qt.Key_Super_L, Qt.MetaModifier);2066 keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
2032 tryCompare(launcher, "state", "");2067 tryCompare(launcher, "state", data.launcherLocked ? "visible" : "");
2033 tryCompare(launcherPanel, "highlightIndex", -2);2068 tryCompare(launcherPanel, "highlightIndex", -2);
2034 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");2069 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
2035 }2070 }
@@ -2078,6 +2113,49 @@
2078 tryCompare(launcher, "focus", true)2113 tryCompare(launcher, "focus", true)
2079 }2114 }
20802115
2116 function test_lockedOutLauncherAddsMarginsToMaximized() {
2117 loadShell("desktop");
2118 shell.usageScenario = "desktop";
2119 waitForRendering(shell);
2120 var appContainer = findChild(shell, "appContainer");
2121 var launcher = findChild(shell, "launcher");
2122
2123 var app = ApplicationManager.startApplication("music-app");
2124 waitUntilAppWindowIsFullyLoaded(app);
2125 var appDelegate = findChild(appContainer, "appDelegate_music-app");
2126 appDelegate.maximize();
2127 tryCompare(appDelegate, "visuallyMaximized", true);
2128 waitForRendering(shell);
2129
2130 GSettingsController.setAutohideLauncher(true);
2131 waitForRendering(shell)
2132 var hiddenSize = appDelegate.width;
2133
2134 GSettingsController.setAutohideLauncher(false);
2135 waitForRendering(shell)
2136 var shownSize = appDelegate.width;
2137
2138 compare(shownSize + launcher.panelWidth, hiddenSize);
2139 }
2140
2141 function test_fullscreenAppHidesLockedOutLauncher() {
2142 loadShell("desktop");
2143 shell.usageScenario = "desktop";
2144
2145 var launcher = findChild(shell, "launcher");
2146 var launcherPanel = findChild(launcher, "launcherPanel");
2147
2148 GSettingsController.setAutohideLauncher(false);
2149 waitForRendering(shell)
2150
2151 tryCompare(launcher, "lockedVisible", true);
2152
2153 var cameraApp = ApplicationManager.startApplication("camera-app");
2154 waitUntilAppWindowIsFullyLoaded(cameraApp);
2155
2156 tryCompare(launcher, "lockedVisible", false);
2157 }
2158
2081 function test_inputEventsOnEdgesEndUpInAppSurface_data() {2159 function test_inputEventsOnEdgesEndUpInAppSurface_data() {
2082 return [2160 return [
2083 { tag: "phone", repeaterName: "spreadRepeater" },2161 { tag: "phone", repeaterName: "spreadRepeater" },

Subscribers

People subscribed via source and target branches