From 391ddf408d03e207c5446f3f0635a88fc4d96977 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 11 Mar 2004 22:44:36 +0000 Subject: [PATCH] Some themes round the edges of the buttons, overwriting any text that goes all the way to the edges. Give the button a few extra pixels to work around that. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/button.cpp | 4 ++++ src/gtk1/button.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 68e6eb5346..a3f1123908 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -212,6 +212,10 @@ wxSize wxButton::DoGetBestSize() const { wxSize ret( wxControl::DoGetBestSize() ); +#ifndef __WXGTK20__ + ret.x += 10; // add a few pixels for sloppy (but common) themes +#endif + if (!HasFlag(wxBU_EXACTFIT)) { if (ret.x < 80) ret.x = 80; diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp index 68e6eb5346..a3f1123908 100644 --- a/src/gtk1/button.cpp +++ b/src/gtk1/button.cpp @@ -212,6 +212,10 @@ wxSize wxButton::DoGetBestSize() const { wxSize ret( wxControl::DoGetBestSize() ); +#ifndef __WXGTK20__ + ret.x += 10; // add a few pixels for sloppy (but common) themes +#endif + if (!HasFlag(wxBU_EXACTFIT)) { if (ret.x < 80) ret.x = 80; -- 2.50.0