Patches.
[webos-internals:justyns-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 9057138..6c52d5d 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 @@ -121,7 +121,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 @@ -135,7 +135,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 @@ -336,9 +336,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 @@ -536,7 +536,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 @@ -720,7 +720,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.launchRequest) { // 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 45b6546..1846089 100644
76 --- a/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
77 +++ b/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
78 @@ -25,7 +25,7 @@ body.palm-default
79  .launcher_fade_bottom {
80         position: absolute;
81         bottom: 0px;
82 -       background: url(../images/launcher-page-fade-bottom.png) center center no-repeat;
83 +/*     background: url(../images/launcher-page-fade-bottom.png) center center no-repeat; */
84         z-index:20;
85         left:0px;
86         width:320px;
87 @@ -39,13 +39,13 @@ body.palm-default
88         z-index: 29;
89         height: 24px;
90         bottom: 1px;
91 -       background: url(../images/fade-arrow-down.png) center center no-repeat;
92 +/*     background: url(../images/fade-arrow-down.png) center center no-repeat; */
93         -webkit-palm-mouse-target: ignore;
94  }
95  
96  .launcher_fade_top {
97         position:absolute;
98 -       background: url(../images/launcher-page-fade-top.png) center center no-repeat;
99 +/*     background: url(../images/launcher-page-fade-top.png) center center no-repeat; */
100         z-index:20;
101         left:0px;
102         top:0px;
103 @@ -60,7 +60,7 @@ body.palm-default
104         z-index: 29;
105         height: 24px;
106         top: 1px;
107 -       background: url(../images/fade-arrow-up.png) center center no-repeat;
108 +/*     background: url(../images/fade-arrow-up.png) center center no-repeat; */
109         -webkit-palm-mouse-target: ignore;
110  }
111  
112 @@ -75,7 +75,7 @@ body.palm-default
113  #page_indicators {
114         position:absolute;
115         bottom: 0px;
116 -       height:20px;
117 +       height:7px;
118         width: 100%;
119         z-index:30;
120         -webkit-palm-mouse-target: ignore;
121 @@ -86,7 +86,7 @@ body.palm-default
122         background: url(../images/launcher-page-indicator.png) no-repeat;
123         /* left/top provided by JS */
124         width:7px;
125 -       height:15px;
126 +       height:7px;
127         -webkit-palm-mouse-target: ignore;
128  }
129  
130 @@ -125,16 +125,17 @@ body.palm-default
131  
132  .launcher_page .name { 
133         position:absolute;
134 -       top: 68px;
135 -    width:100px;
136 +       top: 61px;
137 +       left:10px;
138 +    width:80px;
139         height: 34px;
140         max-height: 34px;
141      clear:both;
142 -       line-height:16px;
143 +       line-height:13px;
144      color:white;
145      text-align:center;
146         font-weight:bold;
147 -    font-size: 14px;
148 +    font-size: 12px;
149         overflow: hidden;
150         text-overflow: ellipsis;
151         z-index:5;
152 @@ -263,8 +264,8 @@ body.palm-default
153  }
154  
155  .draggable {
156 -       width:64px;
157 -       height:64px;
158 +       width:60px;
159 +       height:60px;
160         margin: 0 auto;
161         -webkit-user-drag: any;
162         -webkit-user-select: none;
163 @@ -304,8 +305,8 @@ body.palm-default
164  
165  #app-icon {
166         float:left;
167 -       width:64px;
168 -       height:64px;
169 +       width:60px;
170 +       height:60px;
171         background: center center no-repeat;
172  }
173