]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/ctrlcmn.cpp
Correct cell alignment computation for too small column sizes.
[wxWidgets.git] / src / common / ctrlcmn.cpp
index 5e8b9ef8b31c3ed7dc40a54af80f094ddd51b5ae..f6dbd6eb2dde3ccf1091c24b4bbea3e81b080a13 100644 (file)
@@ -35,6 +35,7 @@
     #include "wx/statbmp.h"
     #include "wx/bitmap.h"
     #include "wx/utils.h"       // for wxStripMenuCodes()
+    #include "wx/settings.h"
 #endif
 
 const char wxControlNameStr[] = "control";
@@ -173,7 +174,7 @@ int wxControlBase::FindAccelIndex(const wxString& label, wxString *labelOnly)
     // the character following MNEMONIC_PREFIX is the accelerator for this
     // control unless it is MNEMONIC_PREFIX too - this allows to insert
     // literal MNEMONIC_PREFIX chars into the label
-    static const wxChar MNEMONIC_PREFIX = _T('&');
+    static const wxChar MNEMONIC_PREFIX = wxT('&');
 
     if ( labelOnly )
     {
@@ -198,7 +199,7 @@ int wxControlBase::FindAccelIndex(const wxString& label, wxString *labelOnly)
                 }
                 else
                 {
-                    wxFAIL_MSG(_T("duplicate accel char in control label"));
+                    wxFAIL_MSG(wxT("duplicate accel char in control label"));
                 }
             }
         }
@@ -217,6 +218,17 @@ wxBorder wxControlBase::GetDefaultBorder() const
     return wxBORDER_THEME;
 }
 
+/* static */ wxVisualAttributes
+wxControlBase::GetCompositeControlsDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+    wxVisualAttributes attrs;
+    attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
+    attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+    attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
+
+    return attrs;
+}
+
 // ----------------------------------------------------------------------------
 // wxControlBase - ellipsization code
 // ----------------------------------------------------------------------------