Hi Eric,
I'm currently working for scrollbar bug (issue 77549). I commited a
change in aquavcl03, and it works better, but it's far to be correct:
- still an offset, mainly with font list
- it's slow ( fonts list again )
For that, I propose a new change: instead of read the preferences every
time a scrollbar is used, read one time only, and use saldata structure
in runtime ( a boolean here): will save a lot of time in runtime (a
simple true/false test is faster than read values every time )
The patch is :
http://eric.bachard.free.fr/mac/aquavcl/patches/aquavcl03_august2007/scrollbar/scrollbar_new2.diff
Looks good to me.
Just a minor nitpick though. If a function returns a bool and a variable
caches this result like here
+ if(isAppleScrollBarVariantDoubleMax() == true )
+ ImplGetSVData()->maNWFData.mbIsScrollbarDoubleMax = true;
+ else
+ ImplGetSVData()->maNWFData.mbIsScrollbarDoubleMax = false;
then I prefer a direct assignment.
Please note:
- this patch is not complete: the way to be informed system preferences
have been modified in runtime is still missing. I'm searching if events
or something like that can be used.
- a previous version (using salinstance) can be found :
http://eric.bachard.free.fr/mac/aquavcl/patches/aquavcl03_august2007/scrollbar/
( was
http://eric.bachard.free.fr/mac/aquavcl/patches/aquavcl03_august2007/scrollbar/scrollbar_new.diff
), but use salframe is probably better.
Updating the settings is usually done in salframe because on most
platforms getting the settings requires a frame. In this case a frame is
not necessary (so salinstance would be even better), but for consistency
with other system settings keeping it in salframe is prefered.
I remember Philipp adviced me to use something about that. It was "..
call SendInternalEvent( pThis, NULL,SALEVENT_SETTINGSCHANGED ) on your
SalDisplay, and this will cause SalFrame::UpdateSettings to be called
again ... ".
Is it possible to use such mechanism there ?
If there is an system event this is no problem.
Anyway, this remaining issue has a much lower priority than using the
wrong arrows or having a slow UI response, which are both fixed by your
patch.
--
Herbert
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]