on xenial help sign in
Merge pull request #120 from ubports/xenial_-_edge_-_sorting

Remove the grouping from the Drawer

commite53d96a12fad2f81d11237149135169c787eb1ed authorMarius Gripsgard <marius@ubports.com> dateFri 19 Apr 2019, 22:46 (7 years ago) parent1ee6c52a4366c2
11 files changed+326−584
po/unity8.pot+184−203 qml/Panel/Handle.qml → qml/Components/Handle.qml+1 qml/Launcher/Drawer.qml+100−246 qml/Launcher/DrawerGridView.qml+6−2 qml/Launcher/DrawerListView.qml−38 qml/Launcher/Launcher.qml+16−7 qml/Launcher/LauncherPanel.qml+3−3 qml/Launcher/MoreAppsHeader.qml−69 qml/Shell.qml+9−9 tests/qmltests/Launcher/tst_Drawer.qml+6−6 tests/qmltests/tst_Shell.qml+1−1
po/unity8.pot+184−203
@@ -8,7 +8,7 @@ msgid ""
88msgstr ""
99"Project-Id-Version: unity8\n"
1010"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2017-04-04 22:56+0000\n"
11+"POT-Creation-Date: 2019-04-08 17:26-0500\n"
1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -38,7 +38,7 @@ msgstr ""
3838msgid "Log In"
3939msgstr ""
4040
41−#: plugins/LightDM/Greeter.cpp:254
41+#: plugins/LightDM/Greeter.cpp:254 qml/Wizard/Pages/UpdateDelegate.qml:118
4242msgid "Retry"
4343msgstr ""
4444
@@ -83,8 +83,7 @@ msgid "Log Out"
8383msgstr ""
8484
8585#: qml/Components/Dialogs.qml:199 qml/Components/Dialogs.qml:264
86−#: qml/Dash/DashPageHeader.qml:324 qml/Greeter/NarrowView.qml:208
87−#: qml/Wizard/Pages/passcode-confirm.qml:32
86+#: qml/Greeter/NarrowView.qml:208 qml/Wizard/Pages/passcode-confirm.qml:32
8887#: qml/Wizard/Pages/passcode-set.qml:32
8988msgid "Cancel"
9089msgstr ""
@@ -377,103 +376,6 @@ msgstr ""
377376msgid "Find more settings in the system settings."
378377msgstr ""
379378
380−#: qml/Dash/DashPageHeader.qml:361
381−msgctxt "Button: Open the Ubuntu Store"
382−msgid "Store"
383−msgstr ""
384−
385−#: qml/Dash/DashPageHeader.qml:368
386−msgctxt "Button: Start a search in the current dash scope"
387−msgid "Search"
388−msgstr ""
389−
390−#: qml/Dash/DashPageHeader.qml:378
391−msgctxt "Button: Show the current dash scope settings"
392−msgid "Settings"
393−msgstr ""
394−
395−#: qml/Dash/DashPageHeader.qml:385
396−msgid "Remove from Favorites"
397−msgstr ""
398−
399−#: qml/Dash/DashPageHeader.qml:385
400−msgid "Add to Favorites"
401−msgstr ""
402−
403−#: qml/Dash/FiltersPopover.qml:61
404−msgid "Refine your results"
405−msgstr ""
406−
407−#: qml/Dash/FiltersPopover.qml:70
408−msgid "Reset"
409−msgstr ""
410−
411−#: qml/Dash/GenericScopeView.qml:547 qml/Dash/GenericScopeView.qml:718
412−msgid "Show less"
413−msgstr ""
414−
415−#: qml/Dash/GenericScopeView.qml:547
416−msgid "Show all"
417−msgstr ""
418−
419−#: qml/Dash/GenericScopeView.qml:578
420−msgctxt "Label: Hint for dash search line edit"
421−msgid "Search"
422−msgstr ""
423−
424−#: qml/Dash/PageHeaderExtraPanel.qml:67
425−msgid "Recent Searches"
426−msgstr ""
427−
428−#: qml/Dash/PageHeaderExtraPanel.qml:78
429−msgid "Clear All"
430−msgstr ""
431−
432−#: qml/Dash/Previews/PreviewActionCombo.qml:36
433−msgid "More..."
434−msgstr ""
435−
436−#: qml/Dash/Previews/PreviewActionCombo.qml:36
437−msgid "Less..."
438−msgstr ""
439−
440−#: qml/Dash/Previews/PreviewCommentInput.qml:83
441−#: qml/Dash/Previews/PreviewRatingInput.qml:202
442−msgid "Send"
443−msgstr ""
444−
445−#: qml/Dash/Previews/PreviewRatingInput.qml:109
446−msgid "Rate this"
447−msgstr ""
448−
449−#: qml/Dash/Previews/PreviewRatingInput.qml:184
450−msgid "Add a review"
451−msgstr ""
452−
453−#: qml/Dash/PullToRefreshScopeStyle.qml:56
454−msgid "Pull to refresh…"
455−msgstr ""
456−
457−#: qml/Dash/PullToRefreshScopeStyle.qml:61
458−msgid "Release to refresh…"
459−msgstr ""
460−
461−#: qml/Dash/ScopeSettings/ScopeSettingBoolean.qml:43
462−msgid "Enable location data"
463−msgstr ""
464−
465−#: qml/Dash/ScopesList.qml:146
466−msgid "Manage"
467−msgstr ""
468−
469−#: qml/Dash/ScopesList.qml:187
470−msgid "Home"
471−msgstr ""
472−
473−#: qml/Dash/ScopesList.qml:188
474−msgid "Also installed"
475−msgstr ""
476−
477379#: qml/Greeter/CoverPage.qml:127
478380msgid "Unlock"
479381msgstr ""
@@ -525,19 +427,10 @@ msgstr ""
525427msgid "Select desktop environment"
526428msgstr ""
527429
528−#: qml/Launcher/Drawer.qml:94
430+#: qml/Launcher/Drawer.qml:107
529431msgid "Search…"
530432msgstr ""
531433
532−#: qml/Launcher/Drawer.qml:129
533−msgctxt "Apps sorted alphabetically"
534−msgid "A-Z"
535−msgstr ""
536−
537−#: qml/Launcher/MoreAppsHeader.qml:55
538−msgid "More apps in the store"
539−msgstr ""
540−
541434#: qml/Notifications/NotificationMenuItemFactory.qml:124
542435msgid "Show password"
543436msgstr ""
@@ -590,6 +483,7 @@ msgid "In queue…"
590483msgstr ""
591484
592485#: qml/Panel/Indicators/IndicatorMenuItemFactory.qml:1021
486+#: qml/Wizard/Pages/UpdateDelegate.qml:226
593487msgid "Downloading"
594488msgstr ""
595489
@@ -653,25 +547,42 @@ msgstr ""
653547msgid "Swipe from the top edge to access notifications and quick settings"
654548msgstr ""
655549
656−#: qml/Wizard/Page.qml:54
550+#: qml/Wizard/Page.qml:59
657551msgctxt "Button: Go back one page in the Wizard"
658552msgid "Back"
659553msgstr ""
660554
661−#: qml/Wizard/Pages/10-welcome.qml:28
555+#: qml/Wizard/Pages/10-welcome.qml:29
662556msgid "Language"
663557msgstr ""
664558
665−#: qml/Wizard/Pages/10-welcome.qml:173 qml/Wizard/Pages/20-keyboard.qml:152
666−#: qml/Wizard/Pages/30-wifi.qml:206 qml/Wizard/Pages/40-location.qml:271
667−#: qml/Wizard/Pages/50-timezone.qml:271 qml/Wizard/Pages/60-account.qml:65
668−#: qml/Wizard/Pages/70-passwd-type.qml:145
669−#: qml/Wizard/Pages/75-report-check.qml:84
670−#: qml/Wizard/Pages/passcode-desktop.qml:142
671−#: qml/Wizard/Pages/password-set.qml:142
559+#: qml/Wizard/Pages/10-welcome.qml:175
560+#: qml/Wizard/Pages/10-welcome-update.qml:126
561+#: qml/Wizard/Pages/11-changelog.qml:74 qml/Wizard/Pages/20-keyboard.qml:152
562+#: qml/Wizard/Pages/30-wifi.qml:214 qml/Wizard/Pages/50-timezone.qml:272
563+#: qml/Wizard/Pages/60-account.qml:72 qml/Wizard/Pages/70-passwd-type.qml:146
564+#: qml/Wizard/Pages/76-app-update.qml:231
565+#: qml/Wizard/Pages/passcode-desktop.qml:154
566+#: qml/Wizard/Pages/password-set.qml:153
672567msgid "Next"
673568msgstr ""
674569
570+#: qml/Wizard/Pages/10-welcome-update.qml:91
571+msgid "Welcome to "
572+msgstr ""
573+
574+#: qml/Wizard/Pages/10-welcome-update.qml:106
575+msgid "We will make sure your device is ready to use "
576+msgstr ""
577+
578+#: qml/Wizard/Pages/11-changelog.qml:28
579+msgid "What's new"
580+msgstr ""
581+
582+#: qml/Wizard/Pages/11-changelog.qml:74
583+msgid "Loading..."
584+msgstr ""
585+
675586#: qml/Wizard/Pages/20-keyboard.qml:31
676587msgid "Select Keyboard"
677588msgstr ""
@@ -684,64 +595,33 @@ msgstr ""
684595msgid "Keyboard layout"
685596msgstr ""
686597
687−#: qml/Wizard/Pages/20-keyboard.qml:152 qml/Wizard/Pages/30-wifi.qml:206
688−#: qml/Wizard/Pages/60-account.qml:65 qml/Wizard/Pages/sim.qml:101
598+#: qml/Wizard/Pages/20-keyboard.qml:152 qml/Wizard/Pages/30-wifi.qml:214
599+#: qml/Wizard/Pages/60-account.qml:72 qml/Wizard/Pages/76-app-update.qml:235
600+#: qml/Wizard/Pages/79-system-update.qml:144 qml/Wizard/Pages/sim.qml:101
689601msgid "Skip"
690602msgstr ""
691603
692−#: qml/Wizard/Pages/30-wifi.qml:30
604+#: qml/Wizard/Pages/30-wifi.qml:31
693605msgid "Connect to Wi‑Fi"
694606msgstr ""
695607
696−#: qml/Wizard/Pages/30-wifi.qml:131
608+#: qml/Wizard/Pages/30-wifi.qml:139
697609msgid "Connected"
698610msgstr ""
699611
700−#: qml/Wizard/Pages/30-wifi.qml:164
612+#: qml/Wizard/Pages/30-wifi.qml:172
701613msgid "Available Wi-Fi networks"
702614msgstr ""
703615
704−#: qml/Wizard/Pages/30-wifi.qml:165
616+#: qml/Wizard/Pages/30-wifi.qml:173
705617msgid "No available Wi-Fi networks"
706618msgstr ""
707619
708−#: qml/Wizard/Pages/40-location.qml:27
709−msgid "Location Services"
710−msgstr ""
711−
712−#: qml/Wizard/Pages/40-location.qml:83
713−msgid ""
714−"Use GPS, Wi-Fi hotspots and mobile network anonymously to detect location "
715−"(recommended)"
716−msgstr ""
717−
718−#: qml/Wizard/Pages/40-location.qml:105
719−#, qt-format
720−msgid "By selecting this option you agree to the Nokia HERE %1."
721−msgstr ""
722−
723−#: qml/Wizard/Pages/40-location.qml:106
724−msgctxt "part of: Nokia HERE terms and conditions"
725−msgid "terms and conditions"
726−msgstr ""
727−
728−#: qml/Wizard/Pages/40-location.qml:160
729−msgid "GPS only"
730−msgstr ""
731−
732−#: qml/Wizard/Pages/40-location.qml:214
733−msgid "Don't use my location"
734−msgstr ""
735−
736−#: qml/Wizard/Pages/40-location.qml:260
737−msgid "You can change it later in System Settings."
738−msgstr ""
739−
740620#: qml/Wizard/Pages/50-timezone.qml:30
741621msgid "Time Zone"
742622msgstr ""
743623
744−#: qml/Wizard/Pages/50-timezone.qml:182
624+#: qml/Wizard/Pages/50-timezone.qml:183
745625msgid "Enter your city"
746626msgstr ""
747627
@@ -749,7 +629,7 @@ msgstr ""
749629msgid "Personalize Your Device"
750630msgstr ""
751631
752−#: qml/Wizard/Pages/60-account.qml:48
632+#: qml/Wizard/Pages/60-account.qml:54
753633msgid "Preferred Name"
754634msgstr ""
755635
@@ -757,81 +637,120 @@ msgstr ""
757637msgid "Lock Screen"
758638msgstr ""
759639
760−#: qml/Wizard/Pages/70-passwd-type.qml:102
640+#: qml/Wizard/Pages/70-passwd-type.qml:103
761641msgctxt "Label: Type of security method"
762642msgid "Create new password"
763643msgstr ""
764644
765−#: qml/Wizard/Pages/70-passwd-type.qml:104
645+#: qml/Wizard/Pages/70-passwd-type.qml:105
766646msgctxt "Label: Type of security method"
767647msgid "Create passcode (numbers only)"
768648msgstr ""
769649
770−#: qml/Wizard/Pages/70-passwd-type.qml:106
650+#: qml/Wizard/Pages/70-passwd-type.qml:107
771651msgctxt "Label: Type of security method"
772652msgid "No lock code"
773653msgstr ""
774654
775−#: qml/Wizard/Pages/75-report-check.qml:26 qml/Wizard/Pages/here-terms.qml:108
776−msgid "Privacy Policy"
655+#: qml/Wizard/Pages/76-app-update.qml:34
656+msgid "Update Apps"
777657msgstr ""
778658
779−#: qml/Wizard/Pages/75-report-check.qml:26
780−msgid "Help Us Improve"
659+#: qml/Wizard/Pages/76-app-update.qml:122
660+msgid "This device is not connected to the internet."
781661msgstr ""
782662
783−#: qml/Wizard/Pages/75-report-check.qml:59
784−msgid "Improve system performance by sending us crashes and error reports."
663+#: qml/Wizard/Pages/76-app-update.qml:123
664+#: qml/Wizard/Pages/76-app-update.qml:129
665+msgid "Use the OpenStore app to check for updates once connected."
785666msgstr ""
786667
787−#: qml/Wizard/Pages/75-report-check.qml:60
788−msgid "Privacy policy"
668+#: qml/Wizard/Pages/76-app-update.qml:125
669+msgid "Software is up to date"
789670msgstr ""
790671
791−#: qml/Wizard/Pages/80-finished.qml:89
792−msgid "Welcome to Ubuntu"
672+#: qml/Wizard/Pages/76-app-update.qml:128
673+msgid "The update server is not responding."
793674msgstr ""
794675
795−#: qml/Wizard/Pages/80-finished.qml:104
796−msgid "You are ready to use your device now"
676+#: qml/Wizard/Pages/76-app-update.qml:233
677+msgid "Please wait..."
797678msgstr ""
798679
799−#: qml/Wizard/Pages/80-finished.qml:124
800−msgid "Get Started"
680+#: qml/Wizard/Pages/79-system-update.qml:28
681+msgid "Update Device"
801682msgstr ""
802683
803−#: qml/Wizard/Pages/here-terms.qml:25
804−msgid "Terms & Conditions"
684+#: qml/Wizard/Pages/79-system-update.qml:55
685+msgid ""
686+"There is a system update available and ready to install. Afterwards, the "
687+"device will automatically restart."
805688msgstr ""
806689
807−#: qml/Wizard/Pages/here-terms.qml:69
808−msgid "Your device uses positioning technologies provided by HERE."
690+#: qml/Wizard/Pages/79-system-update.qml:76
691+msgctxt "string identifying name of the update"
692+msgid "Ubuntu Touch system"
809693msgstr ""
810694
811−#: qml/Wizard/Pages/here-terms.qml:81
812−msgid ""
813−"To provide you with positioning services and to improve their quality, HERE "
814−"collects information about nearby cell towers and Wi-Fi hotspots around your "
815−"current location whenever your position is being found."
695+#: qml/Wizard/Pages/79-system-update.qml:83
696+#, qt-format
697+msgctxt "version of the system update"
698+msgid "Version %1"
816699msgstr ""
817700
818−#: qml/Wizard/Pages/here-terms.qml:93
819−msgid ""
820−"The information collected is used to analyze the service and to improve the "
821−"use of service, but not to identify you personally."
701+#: qml/Wizard/Pages/79-system-update.qml:95
702+msgid "This could take a few minutes..."
703+msgstr ""
704+
705+#: qml/Wizard/Pages/79-system-update.qml:109
706+msgid "Install and restart now"
707+msgstr ""
708+
709+#: qml/Wizard/Pages/80-finished.qml:91
710+msgid "Welcome Back"
711+msgstr ""
712+
713+#: qml/Wizard/Pages/80-finished.qml:91
714+msgid "Welcome to Ubuntu"
715+msgstr ""
716+
717+#: qml/Wizard/Pages/80-finished.qml:106
718+msgid "You are ready to use your device now"
719+msgstr ""
720+
721+#: qml/Wizard/Pages/80-finished.qml:126
722+msgid "Continue"
822723msgstr ""
823724
824−#: qml/Wizard/Pages/here-terms.qml:106
725+#: qml/Wizard/Pages/80-finished.qml:126
726+msgid "Get Started"
727+msgstr ""
728+
729+#: qml/Wizard/Pages/DownloadHandler.qml:174
730+msgid "Installation failed"
731+msgstr ""
732+
733+#: qml/Wizard/Pages/GlobalUpdateControls.qml:84
734+msgid "Checking for updates…"
735+msgstr ""
736+
737+#: qml/Wizard/Pages/GlobalUpdateControls.qml:109
825738#, qt-format
826−msgid "By continuing, you agree to the HERE platform %1 and %2."
739+msgid "%1 update available"
740+msgid_plural "%1 updates available"
741+msgstr[0] ""
742+msgstr[1] ""
743+
744+#: qml/Wizard/Pages/GlobalUpdateControls.qml:119
745+msgid "Update all…"
827746msgstr ""
828747
829−#: qml/Wizard/Pages/here-terms.qml:107
830−msgid "Service Terms"
748+#: qml/Wizard/Pages/GlobalUpdateControls.qml:121
749+msgid "Update all"
831750msgstr ""
832751
833752#: qml/Wizard/Pages/passcode-confirm.qml:43
834−#: qml/Wizard/Pages/passcode-desktop.qml:97
753+#: qml/Wizard/Pages/passcode-desktop.qml:104
835754msgid "Confirm passcode"
836755msgstr ""
837756
@@ -848,24 +767,24 @@ msgstr ""
848767msgid "Lock Screen Passcode"
849768msgstr ""
850769
851−#: qml/Wizard/Pages/passcode-desktop.qml:61
770+#: qml/Wizard/Pages/passcode-desktop.qml:68
852771msgid "Enter 4 numbers to setup your passcode"
853772msgstr ""
854773
855−#: qml/Wizard/Pages/passcode-desktop.qml:77
774+#: qml/Wizard/Pages/passcode-desktop.qml:84
856775#: qml/Wizard/Pages/passcode-set.qml:54
857776msgid "Choose passcode"
858777msgstr ""
859778
860−#: qml/Wizard/Pages/passcode-desktop.qml:127
779+#: qml/Wizard/Pages/passcode-desktop.qml:139
861780msgid "Passcode too short"
862781msgstr ""
863782
864−#: qml/Wizard/Pages/passcode-desktop.qml:129
783+#: qml/Wizard/Pages/passcode-desktop.qml:141
865784msgid "Passcodes match"
866785msgstr ""
867786
868−#: qml/Wizard/Pages/passcode-desktop.qml:131
787+#: qml/Wizard/Pages/passcode-desktop.qml:143
869788msgid "Passcodes do not match"
870789msgstr ""
871790
@@ -877,15 +796,15 @@ msgstr ""
877796msgid "Lock Screen Password"
878797msgstr ""
879798
880−#: qml/Wizard/Pages/password-set.qml:62
799+#: qml/Wizard/Pages/password-set.qml:68
881800msgid "Enter at least 8 characters"
882801msgstr ""
883802
884−#: qml/Wizard/Pages/password-set.qml:74
803+#: qml/Wizard/Pages/password-set.qml:80
885804msgid "Choose password"
886805msgstr ""
887806
888−#: qml/Wizard/Pages/password-set.qml:104
807+#: qml/Wizard/Pages/password-set.qml:110
889808msgid "Confirm password"
890809msgstr ""
891810
@@ -913,6 +832,68 @@ msgstr ""
913832msgid "To proceed with no SIM tap Skip."
914833msgstr ""
915834
835+#: qml/Wizard/Pages/UpdateDelegate.qml:123
836+msgid "Update"
837+msgstr ""
838+
839+#: qml/Wizard/Pages/UpdateDelegate.qml:125
840+msgid "Download"
841+msgstr ""
842+
843+#: qml/Wizard/Pages/UpdateDelegate.qml:131
844+msgid "Resume"
845+msgstr ""
846+
847+#: qml/Wizard/Pages/UpdateDelegate.qml:138
848+msgid "Pause"
849+msgstr ""
850+
851+#: qml/Wizard/Pages/UpdateDelegate.qml:142
852+msgid "Install…"
853+msgstr ""
854+
855+#: qml/Wizard/Pages/UpdateDelegate.qml:144
856+msgid "Install"
857+msgstr ""
858+
859+#: qml/Wizard/Pages/UpdateDelegate.qml:148
860+msgid "Open"
861+msgstr ""
862+
863+#: qml/Wizard/Pages/UpdateDelegate.qml:216
864+msgid "Installing"
865+msgstr ""
866+
867+#: qml/Wizard/Pages/UpdateDelegate.qml:220
868+msgid "Paused"
869+msgstr ""
870+
871+#: qml/Wizard/Pages/UpdateDelegate.qml:223
872+msgid "Waiting to download"
873+msgstr ""
874+
875+#: qml/Wizard/Pages/UpdateDelegate.qml:279
876+#, qt-format
877+msgid "%1 of %2"
878+msgstr ""
879+
880+#: qml/Wizard/Pages/UpdateDelegate.qml:283
881+msgid "Downloaded"
882+msgstr ""
883+
884+#: qml/Wizard/Pages/UpdateDelegate.qml:286
885+msgid "Installed"
886+msgstr ""
887+
888+#: qml/Wizard/Pages/UpdateDelegate.qml:291
889+#, qt-format
890+msgid "Updated %1"
891+msgstr ""
892+
893+#: qml/Wizard/Pages/UpdateDelegate.qml:315
894+msgid "Update failed"
895+msgstr ""
896+
916897#: qml/Wizard/PasswordMeter.qml:87
917898msgid "Password too short"
918899msgstr ""
qml/Panel/Handle.qml → qml/Components/Handle.qmlrenamed+1
@@ -29,6 +29,7 @@ Rectangle {
2929 height: childrenRect.height
3030 anchors.centerIn: parent
3131 spacing: units.gu(0.5)
32+ rotation: (parent.width >= parent.height) ? 0 : 90
3233 Repeater {
3334 model: 3
3435 delegate: Rectangle {
qml/Launcher/Drawer.qml+100−246
@@ -26,13 +26,13 @@ FocusScope {
2626 id: root
2727
2828 property int panelWidth: 0
29− readonly property bool moving: listLoader.item && listLoader.item.moving
29+ readonly property bool moving: appList && appList.moving
3030 readonly property Item searchTextField: searchField
3131 readonly property real delegateWidth: units.gu(10)
3232
3333 signal applicationSelected(string appId)
3434
35− property bool firstOpen: true
35+ property bool handleVisible: false
3636 property bool draggingHorizontally: false
3737 property int dragDistance: 0
3838
@@ -46,15 +46,21 @@ FocusScope {
4646 focusInput();
4747 searchField.text = event.text;
4848 }
49+ switch (event.key) {
50+ case Qt.Key_Right:
51+ case Qt.Key_Left:
52+ case Qt.Key_Down:
53+ appList.focus = true;
54+ break;
55+ case Qt.Key_Up:
56+ focusInput();
57+ break;
58+ }
4959 // Catch all presses here in case the navigation lets something through
5060 // We never want to end up in the launcher with focus
5161 event.accepted = true;
5262 }
5363
54− Settings {
55− property alias selectedTab: sections.selectedIndex
56− }
57−
5864 MouseArea {
5965 anchors.fill: parent
6066 hoverEnabled: true
@@ -67,6 +73,44 @@ FocusScope {
6773 color: "#111111"
6874 opacity: 0.99
6975
76+ MouseArea {
77+ id: drawerHandle
78+ anchors {
79+ right: parent.right
80+ top: parent.top
81+ bottom: parent.bottom
82+ }
83+ width: root.handleVisible ? units.gu(2) : 0
84+ property int oldX: 0
85+
86+ onPressed: {
87+ handle.active = true;
88+ oldX = mouseX;
89+ }
90+ onMouseXChanged: {
91+ var diff = oldX - mouseX;
92+ root.draggingHorizontally |= diff > units.gu(2);
93+ if (!root.draggingHorizontally) {
94+ return;
95+ }
96+ root.dragDistance += diff;
97+ oldX = mouseX
98+ }
99+ onReleased: reset()
100+ onCanceled: reset()
101+
102+ function reset() {
103+ root.draggingHorizontally = false;
104+ handle.active = false;
105+ }
106+
107+ Handle {
108+ id: handle
109+ anchors.fill: parent
110+ active: parent.pressed
111+ }
112+ }
113+
70114 AppDrawerModel {
71115 id: appDrawerModel
72116 }
@@ -80,258 +124,65 @@ FocusScope {
80124
81125 Item {
82126 id: contentContainer
83− anchors.fill: parent
84− anchors.leftMargin: root.panelWidth
85−
86− TextField {
87− id: searchField
88− objectName: "searchField"
89− anchors { left: parent.left; top: parent.top; right: parent.right; margins: units.gu(1) }
90− placeholderText: i18n.tr("Search…")
91−
92− KeyNavigation.down: sections
93−
94− onAccepted: {
95− if (searchField.displayText != "" && listLoader.item) {
96− // In case there is no currentItem (it might have been filtered away) lets reset it to the first item
97− if (!listLoader.item.currentItem) {
98− listLoader.item.currentIndex = 0;
99− }
100− root.applicationSelected(listLoader.item.getFirstAppId());
101− }
102− }
127+ anchors {
128+ left: parent.left
129+ right: drawerHandle.left
130+ top: parent.top
131+ bottom: parent.bottom
132+ leftMargin: root.panelWidth
103133 }
104134
105135 Item {
106− id: sectionsContainer
107− anchors { left: parent.left; top: searchField.bottom; right: parent.right; }
108− height: sections.height
109− clip: true
110− z: 2
111−
112− Sections {
113− id: sections
114− objectName: "drawerSections"
115− width: parent.width
116−
117− KeyNavigation.up: searchField
118− KeyNavigation.down: headerFocusScope
119− KeyNavigation.backtab: searchField
120− KeyNavigation.tab: headerFocusScope
121−
122− actions: [
123− Action {
124− text: i18n.ctr("Apps sorted alphabetically", "A-Z")
125− // TODO: Disabling this for now as we don't get the right input from u-a-l yet.
126−// },
127−// Action {
128−// text: i18n.ctr("Most used apps", "Most used")
129− }
130− ]
131−
132− Rectangle {
133− anchors.bottom: parent.bottom
134− height: units.dp(1)
135− color: 'gray'
136− width: contentContainer.width
137− }
138− }
139− }
140−
141− FocusScope {
142− id: headerFocusScope
143− objectName: "headerFocusScope"
144− KeyNavigation.up: sections
145− KeyNavigation.down: listLoader.item
146− KeyNavigation.backtab: sections
147− KeyNavigation.tab: listLoader.item
148− activeFocusOnTab: true
149−
150− GSettings {
151− id: settings
152− schema.id: "com.canonical.Unity8"
153− }
154−
155− Keys.onPressed: {
156− switch (event.key) {
157− case Qt.Key_Return:
158− case Qt.Key_Enter:
159− case Qt.Key_Space:
160− trigger();
161− event.accepted = true;
162− }
163− }
164−
165− function trigger() {
166− Qt.openUrlExternally(settings.appstoreUri)
167− }
168− }
169−
170− Loader {
171− id: listLoader
172− objectName: "drawerListLoader"
173− anchors { left: parent.left; top: sectionsContainer.bottom; right: parent.right; bottom: parent.bottom }
174−
175− KeyNavigation.up: headerFocusScope
176− KeyNavigation.down: searchField
177− KeyNavigation.backtab: headerFocusScope
178− KeyNavigation.tab: searchField
179−
180− sourceComponent: {
181− switch (sections.selectedIndex) {
182− case 0: return aToZComponent;
183− case 1: return mostUsedComponent;
184− }
185− }
186− Binding {
187− target: listLoader.item || null
188− property: "objectName"
189− value: "drawerItemList"
190− }
191− }
192−
193− MouseArea {
194− id: horizontalDragDetector
195− parent: listLoader.item ? listLoader.item : null
196− anchors.fill: parent
197− propagateComposedEvents: true
198− property int oldX: 0
199− onPressed: {
200− if (root.firstOpen) {
201− mouse.accepted = false;
202− root.firstOpen = false;
203− return;
204− }
205− oldX = mouseX;
206− }
207− onMouseXChanged: {
208− var diff = oldX - mouseX;
209− root.draggingHorizontally |= diff > units.gu(2);
210− if (!root.draggingHorizontally) {
211− return;
212− }
213− parent.interactive = false;
214− root.dragDistance += diff;
215− oldX = mouseX
216− }
217− onReleased: reset();
218− onCanceled: reset();
219− function reset() {
220− if (root.draggingHorizontally) {
221− root.draggingHorizontally = false;
222− parent.interactive = true;
223− }
224− }
225− }
226−
227− Component {
228− id: mostUsedComponent
229− DrawerListView {
230− id: mostUsedListView
231−
232− header: MoreAppsHeader {
233− width: parent.width
234− height: units.gu(6)
235− highlighted: headerFocusScope.activeFocus
236− onClicked: headerFocusScope.trigger();
237− }
136+ id: searchFieldContainer
137+ height: units.gu(6)
138+ anchors { left: parent.left; top: parent.top; right: parent.right; margins: units.gu(1) }
238139
239− model: AppDrawerProxyModel {
240− source: sortProxyModel
241− group: AppDrawerProxyModel.GroupByAll
242− sortBy: AppDrawerProxyModel.SortByUsage
243− dynamicSortFilter: false
140+ TextField {
141+ id: searchField
142+ objectName: "searchField"
143+ anchors {
144+ left: parent.left
145+ top: parent.top
146+ right: parent.right
147+ bottom: parent.bottom
148+ bottomMargin: units.gu(2)
244149 }
150+ placeholderText: i18n.tr("Search…")
151+ z: 100
245152
246− delegate: UbuntuShape {
247− width: parent.width - units.gu(2)
248− anchors.horizontalCenter: parent.horizontalCenter
249− color: "#20ffffff"
250− aspect: UbuntuShape.Flat
251− // NOTE: Cannot use gridView.rows here as it would evaluate to 0 at first and only update later,
252− // which messes up the ListView.
253− height: (Math.ceil(mostUsedGridView.model.count / mostUsedGridView.columns) * mostUsedGridView.delegateHeight) + units.gu(2)
254−
255− readonly property string appId: model.appId
256−
257− DrawerGridView {
258− id: mostUsedGridView
259− anchors.fill: parent
260− topMargin: units.gu(1)
261− bottomMargin: units.gu(1)
262− clip: true
263−
264− interactive: true
265− focus: index == mostUsedListView.currentIndex
153+ KeyNavigation.down: appList
266154
267− model: sortProxyModel
268−
269− delegateWidth: root.delegateWidth
270− delegateHeight: units.gu(10)
271− delegate: drawerDelegateComponent
155+ onAccepted: {
156+ if (searchField.displayText != "" && appList) {
157+ // In case there is no currentItem (it might have been filtered away) lets reset it to the first item
158+ if (!appList.currentItem) {
159+ appList.currentIndex = 0;
160+ }
161+ root.applicationSelected(appList.getFirstAppId());
272162 }
273163 }
274164 }
275165 }
276166
277− Component {
278− id: aToZComponent
279− DrawerListView {
280− id: aToZListView
281−
282− header: MoreAppsHeader {
283− width: parent.width
284− height: units.gu(6)
285− highlighted: headerFocusScope.activeFocus
286− onClicked: headerFocusScope.trigger();
287− }
288−
289− model: AppDrawerProxyModel {
290− source: sortProxyModel
291− sortBy: AppDrawerProxyModel.SortByAToZ
292− group: AppDrawerProxyModel.GroupByAToZ
293− dynamicSortFilter: false
294− }
295−
296− delegate: UbuntuShape {
297− width: parent.width - units.gu(2)
298− anchors.horizontalCenter: parent.horizontalCenter
299− color: "#20ffffff"
300− aspect: UbuntuShape.Flat
301−
302− readonly property string appId: model.appId
303−
304− // NOTE: Cannot use gridView.rows here as it would evaluate to 0 at first and only update later,
305− // which messes up the ListView.
306− height: (Math.ceil(gridView.model.count / gridView.columns) * gridView.delegateHeight) +
307− categoryNameLabel.implicitHeight + units.gu(2)
308−
309− Label {
310− id: categoryNameLabel
311− anchors { left: parent.left; top: parent.top; right: parent.right; margins: units.gu(1) }
312− text: model.letter
313− }
314−
315− DrawerGridView {
316− id: gridView
317− anchors { left: parent.left; top: categoryNameLabel.bottom; right: parent.right; topMargin: units.gu(1) }
318− height: rows * delegateHeight
319−
320− interactive: false
321− focus: index == aToZListView.currentIndex
167+ DrawerGridView {
168+ id: appList
169+ anchors {
170+ left: parent.left
171+ right: parent.right
172+ top: searchFieldContainer.bottom
173+ bottom: parent.bottom
174+ }
175+ height: rows * delegateHeight
176+ clip: true
322177
323− model: AppDrawerProxyModel {
324− id: categoryModel
325− source: sortProxyModel
326− filterLetter: model.letter
327− dynamicSortFilter: false
328− }
329− delegateWidth: root.delegateWidth
330− delegateHeight: units.gu(10)
331− delegate: drawerDelegateComponent
332− }
333− }
178+ model: AppDrawerProxyModel {
179+ id: categoryModel
180+ source: sortProxyModel
181+ dynamicSortFilter: false
334182 }
183+ delegateWidth: root.delegateWidth
184+ delegateHeight: units.gu(11)
185+ delegate: drawerDelegateComponent
335186 }
336187 }
337188
@@ -340,7 +191,7 @@ FocusScope {
340191 AbstractButton {
341192 id: drawerDelegate
342193 width: GridView.view.cellWidth
343− height: units.gu(10)
194+ height: units.gu(11)
344195 objectName: "drawerItem_" + model.appId
345196
346197 readonly property bool focused: index === GridView.view.currentIndex && GridView.view.activeFocus
@@ -349,7 +200,7 @@ FocusScope {
349200 z: loader.active ? 1 : 0
350201
351202 Column {
352− width: units.gu(8)
203+ width: units.gu(9)
353204 anchors.horizontalCenter: parent.horizontalCenter
354205 height: childrenRect.height
355206 spacing: units.gu(1)
@@ -382,8 +233,11 @@ FocusScope {
382233 id: label
383234 text: model.name
384235 width: parent.width
236+ anchors.horizontalCenter: parent.horizontalCenter
385237 horizontalAlignment: Text.AlignHCenter
386238 fontSize: "small"
239+ wrapMode: Text.WordWrap
240+ maximumLineCount: 2
387241 elide: Text.ElideRight
388242
389243 Loader {
qml/Launcher/DrawerGridView.qml+6−2
@@ -20,8 +20,8 @@ import "../Components"
2020FocusScope {
2121 id: root
2222
23− property int delegateWidth: units.gu(10)
24− property int delegateHeight: units.gu(10)
23+ property int delegateWidth: units.gu(11)
24+ property int delegateHeight: units.gu(11)
2525 property alias delegate: gridView.delegate
2626 property alias model: gridView.model
2727 property alias interactive: gridView.interactive
@@ -46,4 +46,8 @@ FocusScope {
4646 cellWidth: root.delegateWidth + spacing
4747 cellHeight: root.delegateHeight
4848 }
49+
50+ function getFirstAppId() {
51+ return model.appId(0);
52+ }
4953}
qml/Launcher/DrawerListView.qmldeleted−38
@@ -1,38 +0,0 @@
1−/*
2− * Copyright (C) 2016 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.4
18−import Ubuntu.Components 1.3
19−import "../Components"
20−
21−ListView {
22− id: root
23− anchors.fill: parent
24− topMargin: units.gu(1)
25− bottomMargin: units.gu(1)
26− spacing: units.gu(1)
27− clip: true
28− focus: true
29−
30− onActiveFocusChanged: {
31− currentIndex = -1;
32− currentIndex = 0;
33− }
34−
35− function getFirstAppId() {
36− return model.appId(0);
37− }
38−}
qml/Launcher/Launcher.qml+16−7
@@ -167,7 +167,7 @@ FocusScope {
167167 switchToNextState("visible")
168168 }
169169
170− function openDrawer(focusInputField) {
170+ function toggleDrawer(focusInputField, onlyOpen) {
171171 if (!drawerEnabled) {
172172 return;
173173 }
@@ -179,7 +179,11 @@ FocusScope {
179179 if (focusInputField) {
180180 drawer.focusInput();
181181 }
182− switchToNextState("drawer")
182+ if (state === "drawer" && !onlyOpen) {
183+ switchToNextState("visible");
184+ } else {
185+ switchToNextState("drawer");
186+ }
183187 }
184188
185189 Keys.onPressed: {
@@ -353,14 +357,14 @@ FocusScope {
353357 // See drawer.onDraggingHorizontallyChanged below
354358 drawer.searchTextField.focus = hadFocus;
355359 drawer.searchTextField.select(oldSelectionStart, oldSelectionEnd);
356− resetOldFocus();
357360 } else if (fullyClosed) {
358361 drawer.searchTextField.text = "";
359− resetOldFocus();
360362 }
363+ resetOldFocus();
361364 }
362365 }
363366 width: Math.min(root.width, units.gu(81))
367+ handleVisible: (width < units.gu(81))
364368 panelWidth: panel.width
365369 visible: x > -width
366370 property var fullyOpen: x === 0
@@ -410,7 +414,7 @@ FocusScope {
410414 if (drawer.x < -units.gu(10)) {
411415 root.hide();
412416 } else {
413− root.openDrawer();
417+ root.toggleDrawer(false, true);
414418 }
415419 }
416420 }
@@ -493,7 +497,7 @@ FocusScope {
493497 }
494498 onPassed: {
495499 if (root.drawerEnabled) {
496− root.openDrawer()
500+ root.toggleDrawer()
497501 }
498502 }
499503
@@ -569,7 +573,7 @@ FocusScope {
569573 if (!dragging) {
570574 if (distance > panel.width / 2) {
571575 if (root.drawerEnabled && distance > panel.width * 3 && dragDirection() !== "left") {
572− root.openDrawer(false)
576+ root.toggleDrawer(false)
573577 } else {
574578 root.switchToNextState("visible");
575579 }
@@ -600,10 +604,12 @@ FocusScope {
600604 PropertyChanges {
601605 target: panel
602606 x: -root.x // so we never go past panelWidth, even when teased by tutorial
607+ focus: true
603608 }
604609 PropertyChanges {
605610 target: drawer
606611 anchors.rightMargin: 0
612+ focus: false
607613 }
608614 },
609615 State {
@@ -614,6 +620,9 @@ FocusScope {
614620 anchors.rightMargin: -drawer.width + root.x // so we never go past panelWidth, even when teased by tutorial
615621 focus: true
616622 }
623+ PropertyChanges {
624+ target: panel
625+ }
617626 },
618627 State {
619628 name: "visibleTemporary"
qml/Launcher/LauncherPanel.qml+3−3
@@ -90,16 +90,16 @@ Rectangle {
9090 color: UbuntuColors.orange
9191 readonly property bool highlighted: root.highlightIndex == -1;
9292
93− Image {
93+ Icon {
9494 objectName: "dashItem"
9595 width: parent.width * .6
9696 height: width
97− sourceSize.width: width
98− sourceSize.height: height
9997 anchors.centerIn: parent
10098 source: "graphics/home.svg"
99+ color: "white"
101100 rotation: root.rotation
102101 }
102+
103103 AbstractButton {
104104 id: dashItem
105105 anchors.fill: parent
qml/Launcher/MoreAppsHeader.qmldeleted−69
@@ -1,69 +0,0 @@
1−/*
2− * Copyright (C) 2017 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.4
18−import Ubuntu.Components 1.3
19−
20−AbstractButton {
21− id: root
22−
23− property bool highlighted: false
24−
25− UbuntuShape {
26− width: parent.width - units.gu(2)
27− anchors.horizontalCenter: parent.horizontalCenter
28− height: parent.height - units.gu(1)
29− color: "#20ffffff"
30− aspect: UbuntuShape.Flat
31−
32− StyledItem {
33− styleName: "FocusShape"
34− anchors.fill: parent
35− activeFocusOnTab: true
36− StyleHints {
37− visible: root.highlighted
38− }
39− }
40−
41− Row {
42− anchors.fill: parent
43− anchors.margins: units.gu(1)
44− spacing: units.gu(1)
45−
46− Icon {
47− height: units.gu(2.2)
48− width: height
49− name: "stock_application"
50− anchors.verticalCenter: parent.verticalCenter
51− color: "white"
52− }
53−
54− Label {
55− text: i18n.tr("More apps in the store")
56− anchors.verticalCenter: parent.verticalCenter
57− fontSize: "small"
58− }
59−
60− Icon {
61− height: units.gu(2.5)
62− width: height
63− anchors.verticalCenter: parent.verticalCenter
64− name: "go-next"
65− color: "white"
66− }
67− }
68− }
69−}
qml/Shell.qml+9−9
@@ -235,7 +235,7 @@ StyledItem {
235235 onHomeKeyActivated: {
236236 // Ignore when greeter is active, to avoid pocket presses
237237 if (!greeter.active) {
238− launcher.openDrawer(false);
238+ launcher.toggleDrawer(false);
239239 }
240240 }
241241 onTouchBegun: { cursor.opacity = 0; }
@@ -344,7 +344,7 @@ StyledItem {
344344 if (status !== TouchGestureArea.Recognized) {
345345 if (status === TouchGestureArea.WaitingForTouch) {
346346 if (wasPressed && !dragging) {
347− launcher.openDrawer(true);
347+ launcher.toggleDrawer(true);
348348 }
349349 }
350350 wasPressed = false;
@@ -375,7 +375,7 @@ StyledItem {
375375 onLoaded: {
376376 item.objectName = "greeter"
377377 }
378− property bool openDrawerAfterUnlock: false
378+ property bool toggleDrawerAfterUnlock: false
379379 Connections {
380380 target: greeter
381381 onActiveChanged: {
@@ -383,9 +383,9 @@ StyledItem {
383383 return
384384
385385 // Show drawer in case showHome() requests it
386− if (greeterLoader.openDrawerAfterUnlock) {
387− launcher.openDrawer(false);
388− greeterLoader.openDrawerAfterUnlock = false;
386+ if (greeterLoader.toggleDrawerAfterUnlock) {
387+ launcher.toggleDrawer(false);
388+ greeterLoader.toggleDrawerAfterUnlock = false;
389389 }
390390 // Show the launcher when there are no running apps
391391 else if (topLevelSurfaceList.count < 1) {
@@ -499,9 +499,9 @@ StyledItem {
499499 SessionBroadcast.requestHomeShown(AccountsService.user);
500500 } else {
501501 if (!greeter.active) {
502− launcher.openDrawer(false);
502+ launcher.toggleDrawer(false);
503503 } else {
504− greeterLoader.openDrawerAfterUnlock = true;
504+ greeterLoader.toggleDrawerAfterUnlock = true;
505505 }
506506 }
507507 }
@@ -609,7 +609,7 @@ StyledItem {
609609 GlobalShortcut {
610610 shortcut: Qt.MetaModifier | Qt.Key_A
611611 onTriggered: {
612− launcher.openDrawer(true);
612+ launcher.toggleDrawer(true);
613613 }
614614 }
615615 GlobalShortcut {
tests/qmltests/Launcher/tst_Drawer.qml+6−6
@@ -235,7 +235,7 @@ StyledItem {
235235 function test_search() {
236236 compare(launcher.lastSelectedApplication, "");
237237
238− launcher.openDrawer(true)
238+ launcher.toggleDrawer(true)
239239 typeString("cam");
240240 keyClick(Qt.Key_Enter);
241241
@@ -279,7 +279,7 @@ StyledItem {
279279 keyClick(Qt.Key_Escape);
280280 waitForRendering(launcher);
281281 waitUntilTransitionsEnd(launcher);
282− launcher.openDrawer(true);
282+ launcher.toggleDrawer(true);
283283 waitForRendering(launcher);
284284 waitUntilTransitionsEnd(launcher);
285285
@@ -290,7 +290,7 @@ StyledItem {
290290 }
291291
292292 function test_kbdNavigation() {
293− launcher.openDrawer(true);
293+ launcher.toggleDrawer(true);
294294 waitForRendering(launcher);
295295 waitUntilTransitionsEnd(launcher);
296296 compare(launcher.lastSelectedApplication, "");
@@ -331,7 +331,7 @@ StyledItem {
331331 // once https://codereview.qt-project.org/#/c/184942/ is accepted
332332 skip();
333333
334− launcher.openDrawer(true);
334+ launcher.toggleDrawer(true);
335335 waitForRendering(launcher);
336336 waitUntilTransitionsEnd(launcher);
337337
@@ -353,7 +353,7 @@ StyledItem {
353353 keyClick(Qt.Key_Down);
354354 tryCompare(panel, "highlightIndex", 0);
355355
356− launcher.openDrawer(true);
356+ launcher.toggleDrawer(true);
357357 tryCompare(searchField, "focus", true);
358358
359359 keyClick(Qt.Key_Escape);
@@ -365,7 +365,7 @@ StyledItem {
365365 }
366366
367367 function test_closeWhileDragging() {
368− launcher.openDrawer(true);
368+ launcher.toggleDrawer(true);
369369 waitForRendering(launcher);
370370 waitUntilTransitionsEnd(launcher);
371371
tests/qmltests/tst_Shell.qml+1−1
@@ -3130,7 +3130,7 @@ Rectangle {
31303130 if (data.lockLauncher) {
31313131 panel.applicationMenus.show();
31323132 tryCompare(panel.applicationMenus, "fullyOpened", true);
3133− launcher.openDrawer();
3133+ launcher.toggleDrawer();
31343134 } else {
31353135 tryCompare(launcher, "shown", false);
31363136 panel.applicationMenus.show();