Patch Launcher To Allow More Icons Per Row

From WebOS Internals
Revision as of 23:22, 11 August 2009 by Sottey (talk | contribs) (corrected typos)
Jump to navigation Jump to search

I'm gonna show you guys how to edit your launcher to customize the icon size, text size, distance between page indicators, and also, most importantly, how to make more than three icons show in each row on the pages of the launcher.

NOTE If you mess something up while editing, you can totally screw up your icon formatting, so make sure you back up your files in case you don't like the end result.

First things first, enable read/write access so you can edit the files.

mount -o remount,rw /

1. Edit the following file: /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js

To change the space between page indicators (those are the little white lines at the bottom that show you which page you are on) go to this line:

kPageIndicatorSpacing: 6

Change the value "6" to whatever you'd like, it is the amount of space between indicators in pixels. I changed mine to 1.

2. Still in that same file, you have to find the following code

kPageMargin: 10

Edit the value "10" and change it to whatever you want, it really just takes some experimenting to see what looks good, you will probably want to edit this after you change the apps per row setting. I changed mine to 2.

3. Next, find the following code, this will control the apps per row.

Modify the code to add a new div:

this.kAppWidth = newAppDiv.getWidth();

Change that line to this:

this.kAppWidth = 58;

This is just the value I found to look best, it puts 5 icons per row in your launcher..

4. Now go to the following file to edit: /usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css

Find the following section in the code:

.launcher_page .name {	
	top: 68px;
	height: 34px;
	max-height: 34px;
    font-size: 14px;	
	overflow: hidden;
	text-overflow: ellipsis;

Change the "font-size" attribute to change what the font size the name of your apps is. I changed mine to "9"

5. Lastly, in the same file, edit the following code:

.draggable {
	margin: 0 auto;
	-webkit-user-drag: any;
	-webkit-user-select: none;

Change the "width" and "height", which controls the width/height of the icons.

I changed mine to be "48x48"

6. Now just restart luna.

mount -o remount,ro /
pkill LunaSysMgr

Now, here's my end result...

Launcher smaller icons.png

All value's are customizable so make it look how ever you want, I found what I like, hopefully you will too :)

Credits: Me(dhMassacre/Decimation), destinal