[haiku-commits] Re: haiku: hrev44733 - in src: preferences/appearance kits/interface

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-commits@xxxxxxxxxxxxx" <haiku-commits@xxxxxxxxxxxxx>
  • Date: Fri, 2 Nov 2012 10:31:45 -0400

On Fri, Nov 2, 2012 at 6:40 AM, Axel DÃrfler <axeld@xxxxxxxxxxxxxxxx> wrote:

> Am 02/11/2012 05:07, schrieb jscipione@xxxxxxxxx:
>
>  928ffe6: Allow the user to select the scrollbar setting graphically.
>>    This uses custom controls to allow the user to choose between
>>    single and double arrows and none, dots, or line knob styles
>>    in a graphical fashion copied from BeOS Scrollbar preflet.
>>
>
> FWIW I consider this an utterly superfluous feature. While there is a
> certain usability difference that may rectify the arrow changes, I would
> suggest to remove the dot/line knob styles again.
>

I'd like to open a dialog about this. My main intension was not to
resurrect this admittedly puerile setting but to provide a scroll bar knob,
even one that does not resemble dots or lines and is not configurable.
However, since there was a setting for this on BeOS (and corresponding data
structures in Haiku to match), and there is a ticket asking for the feature
anyway (#6206), I figured it might be better to just copy BeOS here.

>
> So far, we don't do theming, and this really doesn't belong anywhere else.
>

The discussion on #6202 seemed to indicate that it belonged in Appearance
if anywhere.


> BTW, we had those scroll bar settings a few years back, and removed it --
> for good reason.


According to #6206 it was removed in hrev17199 by you :)


>  +++ b/headers/os/interface/**ScrollBar.h
>> @@ -19,6 +19,12 @@
>>   #define DISABLES_ON_WINDOW_**DEACTIVATION 1
>>
>>
>> +enum {
>> +       KNOB_STYLE_NONE = 0,
>> +       KNOB_STYLE_DOTS,
>> +       KNOB_STYLE_LINES
>> +};
>> +
>>   class BScrollBar : public BView {
>>
>
> Two blank lines.
>

I'm glad you said that because I was not sure if there should be 2 blank
lines between data structures or not. Is that always true or only when
switching between one type and another? Meaning if you have 2 classes
defined in a header should there be 2 spaces between them as well?


> But:
> 1) why make them public?
> 2) if they are public, they must have the B_ prefix.


I made the enum public because I needed to reference the constants in a few
places, I could have just reproduced the enum I suppose but I figured it
might be more useful to have it defined in just one place. I'll put B_ in
front of the constants or just make the enum private and copy it.

Thanks,
John Scipione

Other related posts: