Commit b776800626c57578051c688be7526bc202a23541

  • avatar
  • egaudet
  • Tue Sep 29 05:15:24 CEST 2009
Added 4x4 launcher patch for webos 1.2.0
  
14X4 Launcher page for webOS 1.2.0
2Index: /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
3===================================================================
4--- .orig/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
5+++ /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
6@@ -10,7 +10,7 @@ var LauncherAssistant = Class.create({
7 */
8 kQuickLaunchHeight: 67,
9
10- kPageIndicatorSpacing: 6, /* spacing between each page indicator */
11+ kPageIndicatorSpacing: 1, /* spacing between each page indicator */
12 kPageMargin: 10, /* 10 pixel margin on each side of a page */
13 kPageWidthNoMargin: NaN,
14 kPageWidth: NaN,
15@@ -23,8 +23,8 @@ var LauncherAssistant = Class.create({
16 visible: true,
17 label: $L('Launcher'),
18 items: [
19- /*{ label: $L('New page'), command: 'newpage' },
20- { label: $L('Delete page'), command: 'deletepage' },*/
21+ { label: $L('New page'), command: 'newpage' },
22+ { label: $L('Delete page'), command: 'deletepage' },
23 Mojo.Menu.editItem,
24 { label: $L('List Apps...'), command: 'listapps' },
25 Mojo.Menu.helpItem
26@@ -117,7 +117,7 @@ var LauncherAssistant = Class.create({
27 case 'listapps':
28 ApplicationService.launch(this.deviceInfo.id, this.deviceInfo.params);
29 break;
30- /*
31+
32 case 'newpage':
33 if (this.pageDivs.length < 10) {
34 this.insertPage(this.activePageIndex, true);
35@@ -131,7 +131,7 @@ var LauncherAssistant = Class.create({
36 }
37 }
38 break;
39- */
40+
41 }
42 }
43 else if (event.type === Mojo.Event.commandEnable) {
44@@ -324,9 +324,9 @@ var LauncherAssistant = Class.create({
45 var newAppDiv = $(newAppInfo.launchPointId);
46 Mojo.assert(newAppDiv !== undefined, "Application (%d) was inserted into the DOM but unable to be retrieved!", newAppInfo.launchPointId);
47 if (isNaN(this.kAppWidth) || isNaN(this.kAppHeight)) {
48- this.kAppWidth = newAppDiv.getWidth();
49- this.kAppHeight = newAppDiv.getHeight();
50- this.kAppsPerRow = Math.round(this.kPageWidthNoMargin / this.kAppWidth);
51+ this.kAppWidth = 72;
52+ this.kAppHeight = 90;
53+ this.kAppsPerRow = 4;
54 }
55
56 Mojo.listen(newAppDiv, Mojo.Event.tap, this.onAppTapped.bindAsEventListener(this));
57@@ -439,7 +439,7 @@ var LauncherAssistant = Class.create({
58 /* determines the position of an app element at appIndex within a page */
59 calculateAppPosition: function(appIndex) {
60 return {
61- left: (((appIndex % this.kAppsPerRow) * this.kAppWidth) + this.kPageMargin),
62+ left: (((appIndex % this.kAppsPerRow) * this.kAppWidth)),
63 top: (Math.floor(appIndex/this.kAppsPerRow) * this.kAppHeight)
64 };
65 },
66Index: /usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
67===================================================================
68--- .orig/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
69+++ /usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
70@@ -121,7 +121,7 @@ body.palm-default
71
72 .launcher_page .name {
73 position:absolute;
74- top: 68px;
75+ top: 48px;
76 width:100px;
77 height: 34px;
78 max-height: 34px;
79@@ -130,7 +130,7 @@ body.palm-default
80 color:white;
81 text-align:center;
82 font-weight:bold;
83- font-size: 14px;
84+ font-size: 12px;
85 overflow: hidden;
86 text-overflow: ellipsis;
87 z-index:5;
88@@ -164,8 +164,8 @@ body.palm-default
89 }
90
91 .draggable {
92- width:64px;
93- height:64px;
94+ width:48px;
95+ height:48px;
96 margin: 0 auto;
97 -webkit-user-drag: any;
98 -webkit-user-select: none;
99@@ -213,8 +213,8 @@ body.palm-default
100
101 #app-icon {
102 float:left;
103- width:64px;
104- height:64px;
105+ width:32px;
106+ height:32px;
107 background: center center no-repeat;
108 }
109