[haiku-commits] Re: r41185 - haiku/trunk/src/apps/screenshot

  • From: "Humdinger" <humdingerb@xxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 06 Apr 2011 18:27:53 +0200

Hi Axel!

Axel Dörfler, Tue, 05 Apr 2011 21:23:56 +0200:
> Instead of using fixed spacings, you should always make it depend on
> the font size. The best way to do this is to utilize BControlLook::
> DefaultItemSpacing(), and in this case maybe rather BControlLook::
> DefaultLabelSpacing().

Right. Like this?:

        const float kSpacing = be_control_look->DefaultItemSpacing();
        const float kLabelSpacing = be_control_look->DefaultLabelSpacing();

        BGridLayout* gridLayout = BGridLayoutBuilder(0.0, kSpacing / 2)
                .Add(fDelayControl->CreateLabelLayoutItem(), 0, 0)
                .Add(fDelayControl->CreateTextViewLayoutItem(), 1, 0)
                .Add(BSpaceLayoutItem::CreateHorizontalStrut(kLabelSpacing), 2,
0)



And replacing all values currently set to 10.0 with kSpacing, 5.0 with
kSpacing/2.
kLabelSpacing seems appropriate in front of the unit seconds.

Regards,
Humdinger

--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-
      Deutsche Haiku News  -  Haiku Gazette
        http://haiku-gazette.blogspot.com

Other related posts: