]> git.saurik.com Git - wxWidgets.git/commitdiff
Display help string for ribbon tools in a tool tip.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 29 Dec 2011 22:05:15 +0000 (22:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 29 Dec 2011 22:05:15 +0000 (22:05 +0000)
Show the help string of the ribbon item currently being hovered over in a
tooltip.

Closes #11879.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/ribbon/buttonbar.cpp
src/ribbon/toolbar.cpp

index 9d420c37504a91f1ebbca7daf57b70385423ce83..6e56743fa550eaeea8dcf770efb9218010e84468 100644 (file)
@@ -459,6 +459,7 @@ All (GUI):
   wxDataViewCtrl (Andrew Xu).
 - Fix item alignment in icon view in the generic wxListCtrl.
 - Support font-family/style, text-decoration in wxHtmlWindow (Blake Oleander).
   wxDataViewCtrl (Andrew Xu).
 - Fix item alignment in icon view in the generic wxListCtrl.
 - Support font-family/style, text-decoration in wxHtmlWindow (Blake Oleander).
+- Show ribbon tools help strings in tooltips (John Roberts).
 
 GTK:
 
 
 GTK:
 
index a1404abbb8d2450e98966d27ca66be7b46ebaa49..10680a0c31d7f27ff64b3166cba08c98d639ad17 100644 (file)
@@ -875,6 +875,11 @@ void wxRibbonButtonBar::OnMouseMove(wxMouseEvent& evt)
         }
     }
 
         }
     }
 
+    if(new_hovered == NULL && GetToolTip())
+    {
+        UnsetToolTip();
+    }
+
     if(new_hovered != m_hovered_button || (m_hovered_button != NULL &&
         new_hovered_state != m_hovered_button->base->state))
     {
     if(new_hovered != m_hovered_button || (m_hovered_button != NULL &&
         new_hovered_state != m_hovered_button->base->state))
     {
@@ -886,6 +891,7 @@ void wxRibbonButtonBar::OnMouseMove(wxMouseEvent& evt)
         if(m_hovered_button != NULL)
         {
             m_hovered_button->base->state = new_hovered_state;
         if(m_hovered_button != NULL)
         {
             m_hovered_button->base->state = new_hovered_state;
+            SetToolTip(m_hovered_button->base->help_string);
         }
         Refresh(false);
     }
         }
         Refresh(false);
     }
index 5715d6e1bc7243fbdac131dc339bd71fa0ec13d8..95afe6039671173cc6669b743e180581b42cc3ff 100644 (file)
@@ -581,6 +581,15 @@ void wxRibbonToolBar::OnMouseMove(wxMouseEvent& evt)
         }
     }
 
         }
     }
 
+    if(new_hover)
+    {
+        SetToolTip(new_hover->help_string);
+    }
+    else if(GetToolTip())
+    {
+        UnsetToolTip();
+    }
+
     if(new_hover != m_hover_tool)
     {
         if(m_hover_tool)
     if(new_hover != m_hover_tool)
     {
         if(m_hover_tool)