X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..9c805dec6caf3c98a3797898cffe795b5b56e606:/src/generic/renderg.cpp diff --git a/src/generic/renderg.cpp b/src/generic/renderg.cpp index 98a217f0f7..0024bcec60 100644 --- a/src/generic/renderg.cpp +++ b/src/generic/renderg.cpp @@ -67,6 +67,8 @@ public: virtual int GetHeaderButtonHeight(wxWindow *win); + virtual int GetHeaderButtonMargin(wxWindow *win); + virtual void DrawTreeItemButton(wxWindow *win, wxDC& dc, const wxRect& rect, @@ -396,6 +398,7 @@ wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win, // truncate and add an ellipsis (...) if the text is too wide. const int availWidth = rect.width - labelWidth; +#if wxUSE_CONTROLS if ( tw > availWidth ) { label = wxControl::Ellipsize(label, @@ -406,6 +409,7 @@ wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win, tw = dc.GetTextExtent(label).x; } else // enough space, we can respect alignment +#endif // wxUSE_CONTROLS { switch (params->m_labelAlignment) { @@ -445,6 +449,11 @@ int wxRendererGeneric::GetHeaderButtonHeight(wxWindow *win) return h + d + 2 * HEADER_OFFSET_Y + EXTRA_HEIGHT; } +int wxRendererGeneric::GetHeaderButtonMargin(wxWindow *WXUNUSED(win)) +{ + return 5; +} + // draw the plus or minus sign void