[haiku-development] Re: RoundRect ButtonFrame

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 19 Mar 2012 17:10:52 -0400

> class MyControlLook : public BControlLook {
> public:
>        virtual void DrawButtonFrame(BView* view, BRect& rect,
>                                                                        const
> BRect& updateRect,
>                                                                        const
> rgb_color& base,
>                                                                        const
> rgb_color& background,
>                                        uint32 flags = 0,
>
>  uint32 borders = B_ALL_BORDERS)
>        {
>                DrawRoundedRect(rect, ...);
>        }
> };

> Is that what you meant? Don't edit the default BControlLook directly. Or do
> you want to add a new button style B_ROUNDED_EDGES?

I was hoping to do the latter, modify ControlLook with a new rounded
button style by setting a flag. However, I suppose that I could do as
you say and implement the code myself it it's own class. But either
way I'll still need to implement the DrawRoundedRect() method somehow.

John Scipione

Other related posts: