From c3d652aeb9db1ada2badcd616fbfcdf802bd9ec2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 14 Feb 2011 22:12:04 +0000 Subject: [PATCH] Don't add margins for buttons with text and images by default in wxMSW. For some reason wxXPButtonImageData added (big) margins around the button by default resulting in too much padding. Simply remove these margins to make it behave similarly to wxODButtonImageData. See #12924. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/button.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/msw/button.cpp b/src/msw/button.cpp index cabac36506..6323ec0bc9 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -225,13 +225,13 @@ public: m_data.himl = GetHimagelistOf(&m_iml); - // use default margins + // no margins by default m_data.margin.left = - m_data.margin.right = btn->GetCharWidth(); + m_data.margin.right = m_data.margin.top = - m_data.margin.bottom = btn->GetCharHeight() / 2; + m_data.margin.bottom = 0; - // and default alignment + // use default alignment m_data.uAlign = BUTTON_IMAGELIST_ALIGN_LEFT; UpdateImageInfo(); -- 2.45.2