Updated from author\'s thread
[webos-internals:modifications.git] / app-launcher / app-launcher-5x5-icons-v1.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..c08ed64 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 @@ -336,9 +336,9 @@ var LauncherAssistant = Class.create({
15                         newAppDiv = $(newAppInfo.launchPointId);
16                         Mojo.assert(newAppDiv !== undefined, "Application (%d) was inserted into the DOM but unable to be retrieved!", newAppInfo.launchPointId);
17                         if (isNaN(this.kAppWidth) || isNaN(this.kAppHeight)) {
18 -                               this.kAppWidth = newAppDiv.getWidth();
19 -                               this.kAppHeight = newAppDiv.getHeight();
20 -                               this.kAppsPerRow = Math.round(this.kPageWidthNoMargin / this.kAppWidth);
21 +                               this.kAppWidth = 64;
22 +                               this.kAppHeight = 75;
23 +                               this.kAppsPerRow = 5;
24                         }
25                         
26                         Mojo.listen(newAppDiv, Mojo.Event.tap, this.onAppTapped.bindAsEventListener(this));
27 @@ -536,8 +536,8 @@ var LauncherAssistant = Class.create({
28         /* determines the position of an app element at appIndex within a page */
29         calculateAppPosition: function(appIndex) {
30                 return {
31 -                       left: (((appIndex % this.kAppsPerRow) * this.kAppWidth) + this.kPageMargin),
32 -                       top: (Math.floor(appIndex/this.kAppsPerRow) * this.kAppHeight)
33 +                       left: (((appIndex % this.kAppsPerRow) * this.kAppWidth) - 20),
34 +                       top: ((Math.floor(appIndex/this.kAppsPerRow) * this.kAppHeight) - 10)
35                 };
36         },
37         
38 diff --git a/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css b/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
39 index 45b6546..e3b56cd 100644
40 --- a/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
41 +++ b/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
42 @@ -125,16 +125,17 @@ body.palm-default
43  
44  .launcher_page .name { 
45         position:absolute;
46 -       top: 68px;
47 -    width:100px;
48 +       top: 48px;
49 +       left:18px;
50 +       width:67px;
51         height: 34px;
52         max-height: 34px;
53      clear:both;
54 -       line-height:16px;
55 +       line-height:12px;
56      color:white;
57      text-align:center;
58         font-weight:bold;
59 -    font-size: 14px;
60 +    font-size: 12px;
61         overflow: hidden;
62         text-overflow: ellipsis;
63         z-index:5;
64 @@ -263,8 +264,8 @@ body.palm-default
65  }
66  
67  .draggable {
68 -       width:64px;
69 -       height:64px;
70 +       width:48px;
71 +       height:48px;
72         margin: 0 auto;
73         -webkit-user-drag: any;
74         -webkit-user-select: none;
75 @@ -304,8 +305,8 @@ body.palm-default
76  
77  #app-icon {
78         float:left;
79 -       width:64px;
80 -       height:64px;
81 +       width:32px;
82 +       height:32px;
83         background: center center no-repeat;
84  }
85