[haiku-commits] Re: haiku: hrev45628 - src/apps/debugger/user_interface/gui/inspector_window

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-commits@xxxxxxxxxxxxx" <haiku-commits@xxxxxxxxxxxxx>
  • Date: Mon, 6 May 2013 21:47:55 -0400

On Mon, May 6, 2013 at 9:39 PM, Rene Gollent <anevilyak@xxxxxxxxx> wrote:
> On 5/6/13, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
>> To complete the circle: Stippi initially introduced the spacing [1]. :-)
>
> I hope that didn't come across as an accusation :-) That wasn't my
> intent anyways. At the time I started on the inspector window, I was
> less familiar with the layout kit, so I simply went looking for
> examples of its usage, of which the TeamWindow was the first one I
> found, so that was what I used as an initial reference. That having
> been said, after playing around with the latter's spacing/insets a
> bit, the constants it uses actually do make sense, as with the default
> spacing there winds up being far too much space between the flow
> control buttons, source file name and sourceview.

Most of the time I think it is a good idea to use
B_USE_DEFAULT_SPACING even if that adds a lot of space because the
spacing will look, well, default.

That being said if you really feel that the default spacing is too
much you can always grab be_control_look->DefaultItemSpacing() and
then modify it. A good rule of thumb to use is that at the default
12pt font be_control_look->DefaultItemSpacing() is around 10. (It's
actually 10.2). So, if you want 4px spacing you could divide by 2.5 to
get 4.08 (rounds to 4) which will put you right where you were, with
the added benefit that the spacing will adjust based on the user's
font settings.

Other related posts: