[haiku-commits] Re: haiku: hrev47085 - src/kits/interface

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 03 Apr 2014 23:10:14 +0200

On 04/03/2014 10:02 PM, Ingo Weinhold wrote:
On a tangentially related note, in BButton::Draw() just before we draw
the label we have the following code:

// always leave some room around the label
rect.InsetBy(kLabelMargin, kLabelMargin);

... where kLabelMargin is 3. This causes problems with some Be apps (and
even some Haiku apps) that have tight margins and thus won't allow the
label to display. Since we always center the label horizontally and
vertically can we remove this code?
The class should rather get methods to manipulate the margins, so that
new code can adjust them, if desired. For old code we might need to
implement some compatibility behavior.

Do you foresee any use of this? As John pointed out, the label is always centered, anyway. The only thing the margins should make sure is that the actual border is not clobbered by text.


Other related posts: