]> git.saurik.com Git - wxWidgets.git/blobdiff - src/ribbon/art_aui.cpp
Added full scaling to wxRTC
[wxWidgets.git] / src / ribbon / art_aui.cpp
index 2c7d56de4211f287223086b350a27cdc9d1c5bd9..37293f9078389288e50a628f5ce3f2161601b55b 100644 (file)
@@ -959,6 +959,13 @@ void wxRibbonAUIArtProvider::DrawButtonBarButton(
                         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))
     {
@@ -1060,6 +1067,12 @@ void wxRibbonAUIArtProvider::DrawTool(
             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)
@@ -1117,7 +1130,7 @@ void wxRibbonAUIArtProvider::DrawTool(
 
     // Foreground
     int avail_width = bg_rect.GetWidth();
-    if(kind != wxRIBBON_BUTTON_NORMAL)
+    if(kind & wxRIBBON_BUTTON_DROPDOWN)
     {
         avail_width -= 8;
         if(is_split_hybrid)