| |   |
| 4X4 Launcher page for webOS 1.2.0 |
| Index: /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js |
| =================================================================== |
| --- .orig/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js |
| +++ /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js |
| @@ -10,7 +10,7 @@ var LauncherAssistant = Class.create({ |
| */ |
| kQuickLaunchHeight: 67, |
| |
| - kPageIndicatorSpacing: 6, /* spacing between each page indicator */ |
| + kPageIndicatorSpacing: 1, /* spacing between each page indicator */ |
| kPageMargin: 10, /* 10 pixel margin on each side of a page */ |
| kPageWidthNoMargin: NaN, |
| kPageWidth: NaN, |
| @@ -23,8 +23,8 @@ var LauncherAssistant = Class.create({ |
| visible: true, |
| label: $L('Launcher'), |
| items: [ |
| - /*{ label: $L('New page'), command: 'newpage' }, |
| - { label: $L('Delete page'), command: 'deletepage' },*/ |
| + { label: $L('New page'), command: 'newpage' }, |
| + { label: $L('Delete page'), command: 'deletepage' }, |
| Mojo.Menu.editItem, |
| { label: $L('List Apps...'), command: 'listapps' }, |
| Mojo.Menu.helpItem |
| @@ -117,7 +117,7 @@ var LauncherAssistant = Class.create({ |
| case 'listapps': |
| ApplicationService.launch(this.deviceInfo.id, this.deviceInfo.params); |
| break; |
| - /* |
| + |
| case 'newpage': |
| if (this.pageDivs.length < 10) { |
| this.insertPage(this.activePageIndex, true); |
| @@ -131,7 +131,7 @@ var LauncherAssistant = Class.create({ |
| } |
| } |
| break; |
| - */ |
| + |
| } |
| } |
| else if (event.type === Mojo.Event.commandEnable) { |
| @@ -324,9 +324,9 @@ var LauncherAssistant = Class.create({ |
| var newAppDiv = $(newAppInfo.launchPointId); |
| Mojo.assert(newAppDiv !== undefined, "Application (%d) was inserted into the DOM but unable to be retrieved!", newAppInfo.launchPointId); |
| if (isNaN(this.kAppWidth) || isNaN(this.kAppHeight)) { |
| - this.kAppWidth = newAppDiv.getWidth(); |
| - this.kAppHeight = newAppDiv.getHeight(); |
| - this.kAppsPerRow = Math.round(this.kPageWidthNoMargin / this.kAppWidth); |
| + this.kAppWidth = 72; |
| + this.kAppHeight = 90; |
| + this.kAppsPerRow = 4; |
| } |
| |
| Mojo.listen(newAppDiv, Mojo.Event.tap, this.onAppTapped.bindAsEventListener(this)); |
| @@ -439,7 +439,7 @@ var LauncherAssistant = Class.create({ |
| /* determines the position of an app element at appIndex within a page */ |
| calculateAppPosition: function(appIndex) { |
| return { |
| - left: (((appIndex % this.kAppsPerRow) * this.kAppWidth) + this.kPageMargin), |
| + left: (((appIndex % this.kAppsPerRow) * this.kAppWidth)), |
| top: (Math.floor(appIndex/this.kAppsPerRow) * this.kAppHeight) |
| }; |
| }, |
| Index: /usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css |
| =================================================================== |
| --- .orig/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css |
| +++ /usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css |
| @@ -121,7 +121,7 @@ body.palm-default |
| |
| .launcher_page .name { |
| position:absolute; |
| - top: 68px; |
| + top: 48px; |
| width:100px; |
| height: 34px; |
| max-height: 34px; |
| @@ -130,7 +130,7 @@ body.palm-default |
| color:white; |
| text-align:center; |
| font-weight:bold; |
| - font-size: 14px; |
| + font-size: 12px; |
| overflow: hidden; |
| text-overflow: ellipsis; |
| z-index:5; |
| @@ -164,8 +164,8 @@ body.palm-default |
| } |
| |
| .draggable { |
| - width:64px; |
| - height:64px; |
| + width:48px; |
| + height:48px; |
| margin: 0 auto; |
| -webkit-user-drag: any; |
| -webkit-user-select: none; |
| @@ -213,8 +213,8 @@ body.palm-default |
| |
| #app-icon { |
| float:left; |
| - width:64px; |
| - height:64px; |
| + width:32px; |
| + height:32px; |
| background: center center no-repeat; |
| } |
| |