[haiku-development] Re: RoundRect ButtonFrame

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 25 Mar 2012 19:10:59 -0400

On Mar 25, 2012, at 6:59 PM, Pete Goodeve <pete.goodeve@xxxxxxxxxxxx> wrote:

On Sun, Mar 25, 2012 at 05:49:44PM -0400, John Scipione wrote:
On Mar 25, 2012, at 5:40 PM, Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>
If your custom buttons do their own drawing then it shouldn't be a
problem, this only applies to buttons drawn by ControlLook.

Well, no.  That's the thing.  I call the standard BButton::Draw(),
and then
add stuff on top  (a persistent state representation).  Probably no
conflict in this particular case, but you never know.

Well you shouldn't do that, you should copy the Draw code from
BControlLook and the modify it from there.

That is *exactly* contrary to the concept of deriving from the base class!!
You don't copy code -- you use it!

Yes but you don't draw on top of a drawn button. If you want to draw your own button, fine, draw it. If you don't, you have to accept the defaults even when they change. It is ridiculous to say that you can't change the default button because you drew over it to make a custom one. An like I said, a constructor could be added to get the square corners back or specify the roundness you want.

Other related posts: