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.
Bye, Axel.