[haiku-development] Re: RoundRect ButtonFrame

  • From: Donn Cave <donn@xxxxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 25 Mar 2012 17:03:36 -0700 (PDT)

> Yes but you don't draw on top of a drawn button.

For the one I did a couple weeks ago, I think it's fair to say that
it was safer to call the base view's Draw() first and draw my gimmick
on top, because I don't think that little graphic is very dependent
on BButton::Draw()'s implementation.  If I had copied that code, then
I'd run the risk that eventually view draws would change in a way that
is visually or otherwise incompatible.  I'd have an old style button
that was at best incongruous.

(The additional drawing is a green `light' that gradually fades to
black until the IMAP ping timer expires;  if I want to check my
mail immediately, I press the button.  So it's just a colored dot,
in a space created by starting the button label with "   ".  It
seems to me it would be crazy to copy BButton::Draw just for that.)

        Donn

Other related posts: