diff --git a/Externals/wxWidgets/include/wx/msw/tooltip.h b/Externals/wxWidgets/include/wx/msw/tooltip.h index 5da413c7bd..68817582c5 100644 --- a/Externals/wxWidgets/include/wx/msw/tooltip.h +++ b/Externals/wxWidgets/include/wx/msw/tooltip.h @@ -37,6 +37,8 @@ public: static void Enable(bool flag); // set the delay after which the tooltip appears static void SetDelay(long milliseconds); + // set the delay after which the tooltip disappears + static void SetAutoPop(long milliseconds); // implementation only from now on // ------------------------------- diff --git a/Externals/wxWidgets/include/wx/ownerdrw.h b/Externals/wxWidgets/include/wx/ownerdrw.h index 4d64222293..348498e95d 100644 --- a/Externals/wxWidgets/include/wx/ownerdrw.h +++ b/Externals/wxWidgets/include/wx/ownerdrw.h @@ -88,6 +88,16 @@ public: m_bOwnerDrawn = true; } + // Same as wxOwnerDrawn::SetMarginWidth() but does not affect + // ms_nLastMarginWidth. Exists solely to work around bug #4068, + // and will not exist in wxWidgets 2.9.0 and later. + void SetOwnMarginWidth(int nWidth) + { + m_nMarginWidth = (size_t) nWidth; + if ( ((size_t) nWidth) != ms_nDefaultMarginWidth ) + m_bOwnerDrawn = true; + } + int GetMarginWidth() const { return (int) m_nMarginWidth; } static int GetDefaultMarginWidth() { return (int) ms_nDefaultMarginWidth; } diff --git a/Externals/wxWidgets/src/msw/checklst.cpp b/Externals/wxWidgets/src/msw/checklst.cpp index ac98e3e0c1..d28109f1c6 100644 --- a/Externals/wxWidgets/src/msw/checklst.cpp +++ b/Externals/wxWidgets/src/msw/checklst.cpp @@ -160,7 +160,7 @@ wxCheckListBoxItem::wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex) // fix appearance for check list boxes: they don't look quite the same as // menu icons - SetMarginWidth(::GetSystemMetrics(SM_CXMENUCHECK) - + SetOwnMarginWidth(::GetSystemMetrics(SM_CXMENUCHECK) - 2*wxSystemSettings::GetMetric(wxSYS_EDGE_X) + 1); SetBackgroundColour(pParent->GetBackgroundColour()); } diff --git a/Externals/wxWidgets/src/msw/tooltip.cpp b/Externals/wxWidgets/src/msw/tooltip.cpp index c96bc5f668..b19b8e2f80 100644 --- a/Externals/wxWidgets/src/msw/tooltip.cpp +++ b/Externals/wxWidgets/src/msw/tooltip.cpp @@ -204,6 +204,13 @@ void wxToolTip::SetDelay(long milliseconds) TTDT_INITIAL, milliseconds); } +void wxToolTip::SetAutoPop(long milliseconds) +{ + SendTooltipMessageToAll(ms_hwndTT, TTM_SETDELAYTIME, + TTDT_AUTOPOP, milliseconds); +} + + // --------------------------------------------------------------------------- // implementation helpers // --------------------------------------------------------------------------- diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 4ea8ac5433..2739f0b2a4 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -429,6 +429,8 @@ CFrame::CFrame(wxFrame* parent, // Create cursors #ifdef _WIN32 CreateCursor(); + SetToolTip(_("")); + GetToolTip()->SetAutoPop(25000); #endif #if defined(HAVE_XRANDR) && HAVE_XRANDR diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h index ba7525ffe8..45600ac75d 100644 --- a/Source/Core/DolphinWX/Src/Frame.h +++ b/Source/Core/DolphinWX/Src/Frame.h @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 967f65df94..aa6aa4b89b 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -136,12 +136,6 @@ BEGIN_EVENT_TABLE(CGameListCtrl, wxListCtrl) EVT_MENU(IDM_INSTALLWAD, CGameListCtrl::OnInstallWAD) END_EVENT_TABLE() -#ifdef _WIN32 - int CGameListCtrl::MarginWidth(wxOwnerDrawn().GetMarginWidth()); -#else - int CGameListCtrl::MarginWidth(0); -#endif - CGameListCtrl::CGameListCtrl(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxListCtrl(parent, id, pos, size, style), toolTip(0) @@ -966,15 +960,7 @@ void CGameListCtrl::OnLeftClick(wxMouseEvent& event) } void CGameListCtrl::OnRightClick(wxMouseEvent& event) -{ - -#ifdef _WIN32 - // [HACK] - // Restore initial ms_nLastMarginWidth's value. - // This should be done whenever a popup menu is created at run-time - wxOwnerDrawn().SetMarginWidth(MarginWidth); -#endif - +{ // Focus the clicked item. int flags; long item = HitTest(event.GetPosition(), flags); diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.h b/Source/Core/DolphinWX/Src/GameListCtrl.h index 87be47eabc..8fca14f632 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.h +++ b/Source/Core/DolphinWX/Src/GameListCtrl.h @@ -96,11 +96,6 @@ private: void SetBackgroundColor(); void ScanForISOs(); - // stores inital ms_nLastMarginWidth's value. This is a static/shared wxWidgets member - // affected by an 'illegal' access from the wxCheckListBox controls. - // NOTE: workaround valid and necessary only with v.2.8.x, since newer versions have fixed this issue. - static int MarginWidth; - DECLARE_EVENT_TABLE() // events diff --git a/Source/Core/DolphinWX/Src/VideoConfigDiag.cpp b/Source/Core/DolphinWX/Src/VideoConfigDiag.cpp index 53a8c53a76..dbbe884670 100644 --- a/Source/Core/DolphinWX/Src/VideoConfigDiag.cpp +++ b/Source/Core/DolphinWX/Src/VideoConfigDiag.cpp @@ -237,8 +237,6 @@ static wxString FormatString(const GameListItem *item) return title; } -// TODO: implement some hack to increase the tooltip display duration, because some of these are way too long for anyone to read in 5 seconds. - wxString profile_tooltip = wxTRANSLATE("Selects which game should be affected by the configuration changes done in this dialog.\nThe (Default) profile affects the standard settings used for every game."); wxString adapter_tooltip = wxTRANSLATE("Select a hardware adapter to use.\nWhen in doubt, use the first one"); wxString ar_tooltip = wxTRANSLATE("Select what aspect ratio to use when rendering:\nAuto: Use the native aspect ratio (4:3)\nForce 16:9: Stretch the picture to an aspect ratio of 16:9.\nForce 4:3: Stretch the picture to an aspect ratio of 4:3.\nStretch to window: Stretch the picture to the window size.");