const wxBitmap& bitmap_large,
const wxBitmap& bitmap_small)
{
+ if(kind == wxRIBBON_BUTTON_TOGGLE)
+ {
+ kind = wxRIBBON_BUTTON_NORMAL;
+ if(state & wxRIBBON_BUTTONBAR_BUTTON_TOGGLED)
+ state ^= wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK;
+ }
+
if(state & (wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK
| wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK))
{
wxRibbonButtonKind kind,
long state)
{
+ if(kind == wxRIBBON_BUTTON_TOGGLE)
+ {
+ if(state & wxRIBBON_TOOLBAR_TOOL_TOGGLED)
+ state ^= wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK;
+ }
+
wxRect bg_rect(rect);
bg_rect.Deflate(1);
if((state & wxRIBBON_TOOLBAR_TOOL_LAST) == 0)
// Foreground
int avail_width = bg_rect.GetWidth();
- if(kind != wxRIBBON_BUTTON_NORMAL)
+ if(kind & wxRIBBON_BUTTON_DROPDOWN)
{
avail_width -= 8;
if(is_split_hybrid)