General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Skinning Question
Posted by: reeko124
Date: April 25, 2009 11:19PM

With the skin I am making I want to change the default toolbar position. I opened up the skin.js and looked but wanted to know do I need more then notepad to change it? Anything special I need to change it? Thanks in advance. I have one nearly done but I want the default position to be the way I envision it before I would upload it.



Reeko

Options: ReplyQuote
Re: Skinning Question
Posted by: desga2
Date: April 26, 2009 12:20PM

The better way to do this is setting toolbars in possition that you like and copy "toolband" preferences from your prefs.js file in your profile to the skin.js file.

K-Meleon in Spanish

Options: ReplyQuote
Re: Skinning Question
Posted by: guenter
Date: April 26, 2009 03:16PM

I checked: My editor says the file is UTF8 coded.

Notepad.exe is maybe not good at UTF8?
Try it anyway if You run into problem use and editor that knows to code as UTF8.



Edited 1 time(s). Last edit at 04/26/2009 03:18PM by guenter.

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 26, 2009 04:06PM

I am gonna try it with desga's method. It seems easier grinning smiley

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 27, 2009 04:11AM

Another question. I have a design that I am thinking about but the only way for it to work is to breakup the mainbar into each individual button. Can that be done or is it written into the actual program to be read that way? I can write each invidual one in the toolbar.cfg file if need be. Thats pointless if I can't change the file that reads the toolbars file. So is there a script or anything that I can edit to do that? Hope I made sense.



Reeko

Options: ReplyQuote
Re: Skinning Question
Posted by: JamesD
Date: April 27, 2009 11:57AM

You can create a toolbar for each button, but that seems overkill. Can you explain more the reason you need each button separate?

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 27, 2009 12:17PM

Quote
JamesD
You can create a toolbar for each button, but that seems overkill. Can you explain more the reason you need each button separate?

I should clarify it is only the back,forward,stop, and refresh buttons I need seperated. The reason is I want to place those not in a straight line but in a pattern I am making. Also I just figured out that it would look stupid with the lines that show when each line or toolbar is seperated so I likely won't do it now.



Reeko

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 27, 2009 01:23PM



I made a mockup of the design real quick. Obviously there will be buttons in the circle and not letters. The circle will be a part of the background. It will be different as will the colors also in the background. Just wanted to give everyone an idea. I did remove the lines that seperate because it would look stupid going thru the circle. So can that be done in K-Meleon?



Reeko



Edited 1 time(s). Last edit at 04/27/2009 01:28PM by reeko124.

Options: ReplyQuote
Re: Skinning Question
Posted by: guenter
Date: April 27, 2009 06:43PM

Naturally You put them in place like desga2 said - I would also do it like that.

But some things need specific file encodings smiling smiley
And we do not want to learn to look for these sordid details the hard way grinning smiley

Quote
reeko124
back,forward,stop, and refresh buttons

Back(24,24){
# That does bar (24,24) resizing / Bar opening code
Back {
# Button opening code
ID_NAV_BACK
Go back one page
mainhot.bmp[0]
maincold.bmp[0]
maindead.bmp[0]
}
#Closing Button end
}
Closing Bar end


# Here we go again -

Forward{
Forward {
ID_NAV_FORWARD
Go forward one page
mainhot.bmp[1]
maincold.bmp[1]
maindead.bmp[1]
}
}

Stop{
Stop {
ID_NAV_STOP
Stop loading this page
mainhot.bmp[2]
maincold.bmp[2]
maindead.bmp[2]
}

Reload{
Reload{
%ifplugin macros
ID_NAV_RELOAD|Reloa&ding
Reload this page. Right-click for more options.
%else
ID_NAV_RELOAD
Reload this page
%endif
mainhot.bmp[3]
maincold.bmp[3]
maindead.bmp[3]
}
}


# I wanted my skin to automatically translate. So I reused English strings from
# kmeleon.kml = that kml comes with each non English kmeleon.
# format: K-Meleon Localization (version 1.5, encoding must be UTF-8)
# In the following example English=German
# OK=OK
# Cancel=Abbrechen
# Close=Schließen


# ----- Toolbar Names (View > Toolbars)

Bookmarks=&Lesezeichenleiste
Favorites=Fa&voritenleiste
Hotlist=H&otlist-Leiste
URL Bar=&Adressleiste

# An extra additional bar with two button.

%ifplugin macros
JavaScript &Console(24,24){
JavaScript &Console{
macros(Console2)
JavaScript &Console
mainhot.bmp[30]
maincold.bmp[30]
maindead.bmp[30]
}
So&urce Code(16,16){
# Button can be resized to different/other size than bar and/or other button.
ID_VIEW_SOURCE
So&urce Code
mainhot.bmp[22]
maincold.bmp[22]
maincold.bmp[22]
}

}
%endif

# & 2 more button examples

Browser Con&figuration(24,24){
Browser Con&figuration{
ID_PREFERENCES|Compact Menu
View Preferences. Right-click to view Compact Menu.
mainhot.bmp[15]
maincold.bmp[15]
maindead.bmp[15]
}

}


&Save Page As...(24,24){
Save{
ID_FILE_SAVE_AS
&Save Page As...
mainhot.bmp[28]
maincold.bmp[28]
maincold.bmp[28]
}
}



Edited 1 time(s). Last edit at 04/27/2009 06:49PM by guenter.

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 27, 2009 07:14PM

I didn't do anything that desga said I just moved everything around and photoshopped that stuff in lol. So I take it that it can't be done the way I want? I read what you posted but it still relies on the mainbar being together. Am I right?

Options: ReplyQuote
Re: Skinning Question
Posted by: desga2
Date: April 27, 2009 08:09PM

You can use the "Freedom Buttons Concept". Like JamesD said you and you can look in guenter's example.

K-Meleon in Spanish



Edited 2 time(s). Last edit at 04/27/2009 08:11PM by desga2.

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 27, 2009 08:12PM

thanks for the link grinning smiley

Can you remove the lines between each button and row? Sorry to ask so many questions guys.



Edited 4 time(s). Last edit at 04/27/2009 08:27PM by reeko124.

Options: ReplyQuote
Re: Skinning Question
Posted by: guenter
Date: April 27, 2009 08:56PM

No AFAIK You cannot remove them.

To see my buttons code as I have formated it - pretend to quote me.

No, You are not asking many question - You make a skin for all of us



Edited 1 time(s). Last edit at 04/27/2009 08:58PM by guenter.

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 27, 2009 08:59PM

then its pointless to make it sad smiley

I can just finish the normal plain design I made then.

Thanks for your response guenter



Edited 1 time(s). Last edit at 04/27/2009 09:00PM by reeko124.

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 28, 2009 02:28AM

Noticed this in the "Freedom Button Concept thread"

Note: Recomended add a new pref, go to Edit -> Configuration -> Browser Configuration (or about:config in URL bar).
Right click in pref list and select New -> Boolean, paste this pref name: kmeleon.display.toolbars_line
and set value to: false
Restart K-Meleon to show changes.

I edited that into it to just to see if it did what I thought it would do. It didn't. So what does it exactly do? I thought i stumbled upon something that removed lines there for a minute but that wasn't the case.



Edited 1 time(s). Last edit at 04/28/2009 02:29AM by reeko124.

Options: ReplyQuote
Re: Skinning Question
Posted by: jsnj
Date: April 28, 2009 04:48AM

Interesting. I never knew that pref existed. reeko, the toolbars must be locked and the background image must be disabled for you to see the effect of no toolbar lines.

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 28, 2009 06:12AM

Quote
jsnj
Interesting. I never knew that pref existed. reeko, the toolbars must be locked and the background image must be disabled for you to see the effect of no toolbar lines.

I was searching for a way to do it and was gonna ask about a userchrome.css that disables it in firefox but come back here and see that you posted. I installed regular 1.5.2 just for skinning because I use Fred's 1.5.2 minimal on a daily basis.

I tried the preference again with it locked and background off on the regular KM and it wouldn't work then I tried it on Freds and it worked with the background on. I had to reinstall regular KM and now it works. Thats even with the background on. If it hid the lines but couldn't use background then the skins would really be limited. I am going to get some sleep and start on these tomorrow grinning smiley

Options: ReplyQuote
Re: Skinning Question
Posted by: guenter
Date: April 28, 2009 07:38AM

userchrome.css only influences K-Meleon's chrome - e.g. about:config window.
User interface and skin is not from chrome else we would have Firefox extensions and
difficulties.

I have checked.
A way to hide the borders seems to, will or can exist.
Have a look at CCF. But I have no idea how it is done.


Toggle this value to false via browser configuration - and lock toolbars.

Works with all versions.

If it does not exist.
You have to create it or write it to e.g. Kmeleon.js inside default/pref/ folder.

pref("kmeleon.display.toolbars_line", false);





Edited 4 time(s). Last edit at 04/28/2009 04:14PM by guenter.

Attachments: 2.jpg (8.2 KB)  
Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 28, 2009 04:27PM

Nice toolbar Guenter. Thats probably better then what I can make. I already got rid of the toolbars by doing that same thing in about:config. Here is yet another question. Must something always be touching the left border? I want the main toolbar to be in the middle and all by itself in the line but something has to be on left border for that to work.

Options: ReplyQuote
Re: Skinning Question
Posted by: jsnj
Date: April 28, 2009 05:07PM

Hmm...why doesn't the pref work for me when my background is enabled? Here's a pic of a skin I'm working on. The blue background is with the skin background disabled. I thought maybe it had something to do with the VS I'm using, but it also happens with the Luna theme that comes with XP.





Edited 1 time(s). Last edit at 04/28/2009 05:08PM by jsnj.

Attachments: toolbarline.png (61.7 KB)  
Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 28, 2009 05:13PM

Quote
jsnj
Hmm...why doesn't the pref work for me when my background is enabled? Here's a pic of a skin I'm working on. The blue background is with the skin background disabled. I thought maybe it had something to do with the VS I'm using, but it also happens with the Luna theme that comes with XP.


Nice skin. I have no clue why it doesn't work.Here is what I did. I said last night at first it didn't work with 1.5.2 then after it worked with Fred's 1.5.2 minimal I just went and reinstalled the regular 1.5.2. I only installed it the first time for skinning purposes anyway so it wasn't no big deal to reinstall.Now it works with no problem.

Options: ReplyQuote
Re: Skinning Question
Posted by: guenter
Date: April 28, 2009 06:13PM

Quote
jsnj
Hmm...why doesn't the pref work for me when my background is enabled?

Check whether You can find the pref inside about:config.

If not add it via about:config, or to .../kmeleon.js or to user.js in used profile first.

First I tried to add tp prefs.js in used profile.
I do not know why, but it was lost on the next start.
I mean the whole pref and the effect had disappeared again sad smiley

Then I edited it into ./K-Meleon/defaults/pref/kmeleon.js (any k-meleon specific js file at this location will do) and now it works.



Edited 1 time(s). Last edit at 04/28/2009 06:15PM by guenter.

Options: ReplyQuote
Re: Skinning Question
Posted by: guenter
Date: April 28, 2009 06:59PM

Quote
reeko124
Nice toolbar

Must something always be touching the left border?

1.) grinning smiley A more complete view of the theme.



Contributors:

Background: nicked from jsnj's chromium skin. thx to him. Icon set: ported to K-Meleon by Rapido. thx to him and the person that created its icon set for Maxton. Throbber: initial idea by Romain Vallet. thx to him. Animation came with unofficial K-Meleon 0.8.2+. Skin's installer download location is @ updated skins aka KMeleonThemes15p2.

2.) AFAIK Yes, but only jsnj or another dev may truly know whether what works or no. I never tried to fix it there. You could try to use an empty bar as dummy, placeholder?

3.) No idea why I did not stick when I added to pref.js by hand. Maybe it does with multi user support profile location? I definitely had to edit it to one of Fred's Light versions setup ./defaults/../*.js

p.s. I still use the old profile location that was default for 0.9 (thx jsnj). Maybe that setup acts differently or my K-Meleon was still running when I edited the file and changed the file on exit? I am sure I shut down but who knows?



Edited 2 time(s). Last edit at 04/29/2009 12:19PM by guenter.

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 28, 2009 07:06PM

I don't use multiple profiles so maybe thats why it worked for me.

I was thinking about making a dummy bar just for that grinning smiley



Edited 1 time(s). Last edit at 04/28/2009 07:06PM by reeko124.

Options: ReplyQuote
Re: Skinning Question
Posted by: guenter
Date: April 28, 2009 07:23PM

Likely.

After thought maybe use layer bar as spacer?

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: April 30, 2009 03:36AM

I am trying to do that first design like I showed. It is to hard to line anything thing up becuse something always needs to border the left side. You move one thing and it throws the alignment off. I'll keep trying grinning smiley

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: May 04, 2009 04:35AM

Can't make a blank bar to use as a spacer on the left border. I made them just like every other button but because there is no design on them they shrink down. even if I could get it to work it would still show the outline of the shape when you hover over it sad smiley So in that regard it would be pointless.



Reeko

Options: ReplyQuote
Re: Skinning Question
Posted by: Rapido
Date: May 04, 2009 06:46PM

Hi! If i'm correct you want to add a extra toolbar for just a few buttons.
Am i correct so far? If so remember That the name should be something like this:

&Java Bar(24,24){
JavaHot.bmp[..]
JavaCold.bmp[..]
JavaDead.bmp[..]
}

And the where the dots are it should say 1 or 2 or what number it has in the bmp picture you are using for it and just build the toolbar in toolbars.cfg like this and when you are done just end it with a } bird sign and _ underline sign. If done correct your toolbar should appear in your skin.

Yours: Rapido

Options: ReplyQuote
Re: Skinning Question
Posted by: reeko124
Date: May 04, 2009 07:05PM

I did do it but it didn't turn out right. Thanks for your help anyway Rapido

Options: ReplyQuote
Re: Skinning Question
Posted by: jsnj
Date: May 11, 2009 08:24PM

Quote
jsnj
Hmm...why doesn't the pref work for me when my background is enabled? Here's a pic of a skin I'm working on. The blue background is with the skin background disabled. I thought maybe it had something to do with the VS I'm using, but it also happens with the Luna theme that comes with XP.

k-meleon.exe.manifest is the culprit. The pref works with the background enabled if that file is absent or the Windows theme is Windows Classic or Standard. Shame the pref doesn't work with newer themes or Visual Styles with the skin background enabled.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.