]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix tooltips for ribbon
authorKevin Wasserman <kevin.wasserman@painless-security.com>
Sat, 21 Jul 2012 20:24:14 +0000 (16:24 -0400)
committerTom Yu <tlyu@mit.edu>
Mon, 27 Aug 2012 23:27:32 +0000 (19:27 -0400)
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
(cherry picked from commit 4325ac72975587bb04b6cd85d45b4c0d7743b2e3)

ticket: 7257
status: resolved

src/windows/leash/MainFrm.cpp

index 5f1c6e662275e2827506b3da5688aa7bca18ee4c..c66486eeb2ec5eb498f7431bccbe6240e59c2bbb 100644 (file)
@@ -90,9 +90,23 @@ CMainFrame::~CMainFrame()
 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
 {
     if (CLeashApp::m_useRibbon) {
-               CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows7));
-               CDockingManager::SetDockingMode(DT_SMART);
-               m_wndRibbonBar.SetWindows7Look(TRUE);
+        // Fixup tooltips (cribbed from http://social.msdn.microsoft.com/Forums/en/vcmfcatl/thread/5c5b4879-d278-4d79-8894-99e7f9b322df)
+
+        CMFCToolTipInfo ttParams;
+        ttParams.m_bVislManagerTheme = TRUE;
+        ttParams.m_bVislManagerTheme = FALSE;
+        ttParams.m_bDrawSeparator = FALSE;
+        ttParams.m_clrFillGradient = afxGlobalData.clrBarFace;
+        ttParams.m_clrFill = RGB(255, 255, 255);
+        ttParams.m_clrBorder = afxGlobalData.clrBarShadow;
+        ttParams.m_clrText = afxGlobalData.clrBarText;
+
+        theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL,
+                RUNTIME_CLASS(CMFCToolTipCtrl), &ttParams);
+
+        CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows7));
+        CDockingManager::SetDockingMode(DT_SMART);
+        m_wndRibbonBar.SetWindows7Look(TRUE);
 
         // Create the ribbon bar
         if (!m_wndRibbonBar.Create(this))