scrollbar metrics issue
Posted by: Brogan
Date: February 08, 2010 04:07AM

Scrollbars in k-meleon appear much larger than how they appear in normal applications. I've tried this with multiple visual styles and it seems to only happen when the scrollbars of the theme are smaller than the scrollbars of the default windows theme. As you can see in the screenshot of the k-meleon preferences window below, the vertical scrollbars are drawn much wider than the horizontal scrollbar. The vertical scrollbars should not be this wide. This bug isn't only limited to the preferences window. The browser itself often draws the vertical scrollbars too wide as well (also happens on forms on the webpage, like the one i used to type this post). Interestingly, in sites where the bug does occur, the bug will not occur when k-meleon starts maximized rather than windowed, With certain sites, however, the scrollbars are consistently drawn just as they should be. Facebook for example, produces the bug, while google causes them to be drawn just as they are supposed to.




screenshot of bug occuring in k-meleon's preferences window

Re: scrollbar metrics issue
Posted by: disrupted
Date: February 08, 2010 10:32PM

this is not a bug, this is how gecko interprets code when it comes to scrollbars.

preferences is xul dialog, xuls don't normally follow your windows metrics themes ..you can usually manipulate the scrollbar width for xuls by editing the userchrome css

same goes for internal scrollbars..that is the scrollbars on pages like on form objects or iframes etc..again the scrollbar width size is interpreted by the gecko engine..sometimes the site has bugs in its code which may occasionally cause the scrollbar to draw wider than your windows schemes or might be coded specifically to be of that size..this bug is also triggered when sites use mshtml fancy scrollers-coloured scrolls..those are supported by trident only and may cause gecko to expand that form scroll.. i've seen it happen quite a few times especially on msn/microsoft sites, this behaviour affects all geckos including seamonkey and firefox. in the case of rendered scrollbars the userchrome naturally have no power over it.

the over expanded scroll due to bad coding has been happening since netscape 4 so i don't really think it's bug in mozilla code and it's probably intended to react that way, however if you disagree you can report it at their bugs wiki.

anyway, as long as your main kmeleon window draws the scrollbar exactly as dictated by your windows theme then there is no bug in km regarding that issue.

Re: scrollbar metrics issue
Posted by: Brogan
Date: February 09, 2010 04:36PM

I see. Thanks for clearing that up, and sorry for wasting your time.

Re: scrollbar metrics issue
Posted by: disrupted
Date: February 09, 2010 05:06PM

not at all..this is a very good post because somebody else might encounter it and also think it's a kmeleon bug so now we have reference.

i get annoyed too when it happens but it's kinda rare and i would have reported it at mozilla's bugs wiki myself if i didn't think they would not take it seriously or say that's a bug in the website's code..they are not exactly the nicest of people

Re: scrollbar metrics issue
Posted by: Brogan
Date: February 10, 2010 06:42PM

Based on what you told me, I decided to try fixing the problem through css (using the "stylish" extension) and it worked!
I used the following code to fix it, where the values of min/max-height and min/max-width are the correct dimensions of the scrollbar:

scrollbar[orient="vertical"], scrollbar[orient="vertical"] thumb, scrollbar[orient="vertical"] scrollbarbutton 
{ 
     min-width: 9px !important; 
     max-width: 9px !important;
}

scrollbar[orient="horizontal"], scrollbar[orient="horizontal"] thumb, scrollbar[orient="horizontal"] scrollbarbutton 
{ 
     min-height: 9px ! important;  
     max-height: 9px !important;
}

Thanks again for your help!

Re: scrollbar metrics issue
Posted by: disrupted
Date: February 10, 2010 10:23PM

that's a great fix, thankyou for sharing!

K-Meleon forum is powered by Phorum.