X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8cb172b4f12fae80b06d5936108a1bc7f2521674..24b9f055150de329d1fb61df5ce8d14e6d657cd0:/src/univ/themes/gtk.cpp diff --git a/src/univ/themes/gtk.cpp b/src/univ/themes/gtk.cpp index 47f7749cc2..9ef37e16d1 100644 --- a/src/univ/themes/gtk.cpp +++ b/src/univ/themes/gtk.cpp @@ -5,7 +5,7 @@ // Modified by: // Created: 06.08.00 // RCS-ID: $Id$ -// Copyright: (c) 2000 Vadim Zeitlin +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows license /////////////////////////////////////////////////////////////////////////////// @@ -186,6 +186,7 @@ public: // we don't have the ticks in GTK version } +#if wxUSE_MENUS virtual void DrawMenuBarItem(wxDC& dc, const wxRect& rect, const wxString& label, @@ -202,7 +203,7 @@ public: virtual void DrawMenuSeparator(wxDC& dc, wxCoord y, const wxMenuGeometryInfo& geomInfo); - +#endif virtual void GetComboBitmaps(wxBitmap *bmpNormal, wxBitmap *bmpPressed, wxBitmap *bmpDisabled); @@ -248,11 +249,12 @@ public: virtual wxSize GetSliderThumbSize(const wxRect& rect, wxOrientation orient) const; virtual wxSize GetProgressBarStep() const { return wxSize(16, 32); } +#if wxUSE_MENUS virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const; virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win, const wxMenu& menu) const; - +#endif // helpers for "wxBitmap wxColourScheme::Get()" void DrawCheckBitmap(wxDC& dc, const wxRect& rect); void DrawUncheckBitmap(wxDC& dc, const wxRect& rect, bool isPressed); @@ -1454,11 +1456,13 @@ void wxGTKRenderer::DrawRadioButton(wxDC& dc, // text control // ---------------------------------------------------------------------------- +static const int TEXT_BORDER = 2; + wxRect wxGTKRenderer::GetTextTotalArea(const wxTextCtrl *text, const wxRect& rect) { wxRect rectTotal = rect; - rectTotal.Inflate(2); + rectTotal.Inflate(TEXT_BORDER); return rectTotal; } @@ -1467,7 +1471,7 @@ wxRect wxGTKRenderer::GetTextClientArea(const wxTextCtrl *text, wxCoord *extraSpaceBeyond) { wxRect rectText = rect; - rectText.Inflate(-2); + rectText.Inflate(-TEXT_BORDER); if ( text->WrapLines() ) { @@ -1743,6 +1747,7 @@ void wxGTKRenderer::DrawSliderThumb(wxDC& dc, DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); } +#if wxUSE_MENUS // ---------------------------------------------------------------------------- // menu and menubar // ---------------------------------------------------------------------------- @@ -1787,7 +1792,7 @@ wxMenuGeometryInfo *wxGTKRenderer::GetMenuGeometry(wxWindow *win, return NULL; } - +#endif // ---------------------------------------------------------------------------- // combobox // ----------------------------------------------------------------------------