Re: [patch] Scrollbar thickness from dillorc
"corvid" <[email protected]>
| Newsgroups | gmane.comp.web.dillo.devel |
|---|---|
| Message-ID | <20130121230006.GA4272@local> |
Johannes wrote: > On Sun, Jan 20, 2013 at 04:01:11PM +0100, podarcis wrote: > > Scrollbars currently have the hardcoded thickness 15. This can be too > > small to operate dillo on large screens or with fingers on a touch > > screen. > > > > The supplied patch does the following: > > > > - Adds the prefence "scrollbar_tickness" to dillorc. > > > > - Reads the value into the prefences > > (Note: added a type UINT32 to prefsparse.cc) > > > > - Sets this value to the FltkViewport with the new > > method FltkViewport::setScrollbarThickness(). > > > > Note: I deliberately did no check for value 0, which can therefore be > > used to make the scrollbars invisible. Scrolling can then still be > > achieved with the cursor keys. This could be called a feature. > > I like the idea and want to commit this if no one objects. > Some issues I see with the current patch: > > * I would rather drop PREFS_UINT32 and simply use > PREFS_INT32 instead. But if we want to keep it, it should warn if > a negative value is assigned to a PREFS_UINT32 variable. > * Similarily in dw/* I would use int instead of size_t. We also use > int for width and height as does fltk. > * In C++ code we use camel cased variables and paramters, so it > should be scrollbarThickness in dw/*. > * I'd make the scrollbarThickness member in FltkViewport non-static > and it should be private. No objection to having the preference, although I note that, with the patch as it is: - if I set the thickness to something like fifty, there is text hidden under the scrollbar that I can see if I drag the page. Putting the setScrollbarThickness() earlier in UIcmd_tab_new() seems to fix it. - if I set the thickness to a negative number, dragging can make the page unreadable if the page is narrow enough that it wants a horizontal scrollbar (not that we'd permit negative values).