28 Updates for Patches
[webos-internals:modifications.git] / app-launcher / app-launcher-4x4-icons-v4-no-arrows-plus-more.patch
1 diff --git a/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js b/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
2 index bebbad2..851c45e 100644
3 --- a/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
4 +++ b/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
5 @@ -10,7 +10,7 @@ var LauncherAssistant = Class.create({
6          */
7         kQuickLaunchHeight: 67,
8         
9 -       kPageIndicatorSpacing: 6,       /* spacing between each page indicator */
10 +       kPageIndicatorSpacing: 1,       /* spacing between each page indicator */
11         kPageMargin: 10, /* 10 pixel margin on each side of a page */
12         kPageWidthNoMargin: NaN,
13         kPageWidth: NaN,
14 @@ -23,8 +23,8 @@ var LauncherAssistant = Class.create({
15                 visible: true,
16                 label: $L('Launcher'),
17          items: [
18 -                       /*{ label: $L('New page'), command: 'newpage' },
19 -                       { label: $L('Delete page'), command: 'deletepage' },*/
20 +                       { label: $L('New page'), command: 'newpage' },
21 +                       { label: $L('Delete page'), command: 'deletepage' },
22                         Mojo.Menu.editItem,
23                         { label: $L('List Apps...'), command: 'listapps' },
24                         { label: $L('Default Applications'), command: 'defaultapps'},
25 @@ -124,7 +124,7 @@ var LauncherAssistant = Class.create({
26                                 case 'defaultapps':
27                                         ApplicationService.launch(this.deviceInfo.id, this.deviceInfo.defaultAppParams);
28                                         break;
29 -                               /*
30 +                               //start add del page code
31                                 case 'newpage':
32                                         if (this.pageDivs.length < 10) {
33                                                 this.insertPage(this.activePageIndex, true);
34 @@ -138,7 +138,7 @@ var LauncherAssistant = Class.create({
35                                                 }
36                                         }
37                                         break;
38 -                               */
39 +                               //end add del page code
40                         }
41                 }
42                 else if (event.type === Mojo.Event.commandEnable) {
43 @@ -341,9 +341,9 @@ var LauncherAssistant = Class.create({
44                         newAppDiv = $(newAppInfo.launchPointId);
45                         Mojo.assert(newAppDiv !== undefined, "Application (%d) was inserted into the DOM but unable to be retrieved!", newAppInfo.launchPointId);
46                         if (isNaN(this.kAppWidth) || isNaN(this.kAppHeight)) {
47 -                               this.kAppWidth = newAppDiv.getWidth();
48 -                               this.kAppHeight = newAppDiv.getHeight();
49 -                               this.kAppsPerRow = Math.round(this.kPageWidthNoMargin / this.kAppWidth);
50 +                               this.kAppWidth = 80;
51 +                               this.kAppHeight = 91;
52 +                               this.kAppsPerRow = 4;
53                         }
54                         
55                         Mojo.listen(newAppDiv, Mojo.Event.tap, this.onAppTapped.bindAsEventListener(this));
56 @@ -541,7 +541,7 @@ var LauncherAssistant = Class.create({
57         /* determines the position of an app element at appIndex within a page */
58         calculateAppPosition: function(appIndex) {
59                 return {
60 -                       left: (((appIndex % this.kAppsPerRow) * this.kAppWidth) + this.kPageMargin),
61 +                       left: (((appIndex % this.kAppsPerRow) * this.kAppWidth) - 10),
62                         top: (Math.floor(appIndex/this.kAppsPerRow) * this.kAppHeight)
63                 };
64         },
65 @@ -723,7 +723,7 @@ var LauncherAssistant = Class.create({
66         onAppTapped: function(event) {
67                 var target = event.currentTarget;
68                 var appInfo = target._info;
69 -               if (event.up && event.up.altKey) {
70 +               if (event.up && event.up.altKey || event.up && event.up.metaKey) {
71                         // open app-info dialog
72                         this.showAppInfoMenu(appInfo);
73                 } else if (!this.feedbackTimeout) { // are we already trying to launch something?
74 diff --git a/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css b/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
75 index 545460c..1fbd22f 100644
76 --- a/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
77 +++ b/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
78 @@ -21,7 +21,7 @@ body.palm-default
79         width: 320px;
80         height: 100%;   
81  }
82 -
83 +/*
84  .launcher_fade_bottom {
85         position: absolute;
86         bottom: 0px;
87 @@ -63,7 +63,7 @@ body.palm-default
88         background: url(../images/fade-arrow-up.png) center center no-repeat;
89         -webkit-palm-mouse-target: ignore;
90  }
91 -
92 +*/
93  #pages_container {
94         position:relative;
95         left:0px;
96 @@ -75,7 +75,7 @@ body.palm-default
97  #page_indicators {
98         position:absolute;
99         bottom: 0px;
100 -       height:20px;
101 +       height:7px;
102         width: 100%;
103         z-index:30;
104         -webkit-palm-mouse-target: ignore;
105 @@ -86,7 +86,7 @@ body.palm-default
106         background: url(../images/launcher-page-indicator.png) no-repeat;
107         /* left/top provided by JS */
108         width:7px;
109 -       height:15px;
110 +       height:7px;
111         -webkit-palm-mouse-target: ignore;
112  }
113  
114 @@ -125,16 +125,17 @@ body.palm-default
115  
116  .launcher_page .name { 
117         position:absolute;
118 -       top: 68px;
119 -    width:100px;
120 +       top: 61px;
121 +       left:10px;
122 +       width:80px;
123         height: 34px;
124         max-height: 34px;
125      clear:both;
126 -       line-height:16px;
127 +       line-height:13px;
128      color:white;
129      text-align:center;
130         font-weight:bold;
131 -    font-size: 14px;
132 +    font-size: 12px;
133         overflow: hidden;
134         text-overflow: ellipsis;
135         z-index:5;
136 @@ -263,8 +264,8 @@ body.palm-default
137  }
138  
139  .draggable {
140 -       width:64px;
141 -       height:64px;
142 +       width:60px;
143 +       height:60px;
144         margin: 0 auto;
145         -webkit-user-drag: any;
146         -webkit-user-select: none;
147 @@ -312,8 +313,8 @@ body.palm-default
148  
149  #app-icon {
150         float:left;
151 -       width:64px;
152 -       height:64px;
153 +       width:60px;
154 +       height:60px;
155         background: center center no-repeat;
156  }
157