]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/tipwin.cpp
added virtual DoSetSize method in order to allow for MacOSX Listbox bug workaround
[wxWidgets.git] / src / generic / tipwin.cpp
index 1469b554c77918cd8541da0c5c400fdd6db516bc..ed4939a286683da46258b30fd751ac1a64266f0e 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "wx/tipwin.h"
 #include "wx/timer.h"
+#include "wx/settings.h"
 
 // ----------------------------------------------------------------------------
 // constants
@@ -95,11 +96,18 @@ wxTipWindow::wxTipWindow(wxWindow *parent,
                          wxCoord maxLength, wxTipWindow** windowPtr)
            : wxFrame(parent, -1, _T(""),
                      wxDefaultPosition, wxDefaultSize,
-                     wxNO_BORDER | wxFRAME_FLOAT_ON_PARENT)
+                     wxNO_BORDER | wxFRAME_NO_TASKBAR )
 {
     // set colours
     SetForegroundColour(*wxBLACK);
-    SetBackgroundColour(wxColour(255, 255, 231));
+
+#ifdef __WXMSW__
+    wxColour bkCol(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_INFOBK));
+#else
+    wxColour bkCol(wxColour(255, 255, 225));
+#endif
+    SetBackgroundColour(bkCol);
+
     // set position and size
     int x, y;
     wxGetMousePosition(&x, &y);
@@ -154,7 +162,12 @@ wxTipWindowView::wxTipWindowView(wxWindow *parent)
 {
     // set colours
     SetForegroundColour(*wxBLACK);
-    SetBackgroundColour(wxColour(255, 255, 231));
+#ifdef __WXMSW__
+    wxColour bkCol(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_INFOBK));
+#else
+    wxColour bkCol(wxColour(255, 255, 225));
+#endif
+    SetBackgroundColour(bkCol);
     m_creationTime = wxGetLocalTime();
 }
 
@@ -237,12 +250,7 @@ void wxTipWindowView::OnPaint(wxPaintEvent& WXUNUSED(event))
     // first filll the background
     dc.SetBrush(wxBrush(GetBackgroundColour(), wxSOLID));
 
-    // Under Windows, you apparently get a thin black border whether you like it or not :-(
-#ifdef __WXMSW__
-    dc.SetPen( * wxTRANSPARENT_PEN );
-#else
     dc.SetPen( * wxBLACK_PEN );
-#endif
     dc.DrawRectangle(rect);
 
     // and then draw the text line by line