Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Guillaume_G:WSL
mingw64-wxWidgets-3_0
Fix-calculation-of-space-for-bitmap-in-wxButton...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File Fix-calculation-of-space-for-bitmap-in-wxButton.patch of Package mingw64-wxWidgets-3_0
References: http://trac.wxwidgets.org/ticket/16536 diff --git a/src/msw/anybutton.cpp b/src/msw/anybutton.cpp --- a/src/msw/anybutton.cpp +++ b/src/msw/anybutton.cpp @@ -520,7 +520,9 @@ void wxAnyButton::AdjustForBitmapSize(wxSize &size) const wxCHECK_RET( m_imageData, wxT("shouldn't be called if no image") ); // account for the bitmap size - const wxSize sizeBmp = m_imageData->GetBitmap(State_Normal).GetSize(); + wxSize sizeBmp = m_imageData->GetBitmap(State_Normal).GetSize(); + // account for the user-specified margins + sizeBmp += 2*m_imageData->GetBitmapMargins(); const wxDirection dirBmp = m_imageData->GetBitmapPosition(); if ( dirBmp == wxLEFT || dirBmp == wxRIGHT ) { @@ -535,9 +537,6 @@ void wxAnyButton::AdjustForBitmapSize(wxSize &size) const size.x = sizeBmp.x; } - // account for the user-specified margins - size += 2*m_imageData->GetBitmapMargins(); - // and also for the margins we always add internally (unless we have no // border at all in which case the button has exactly the same size as // bitmap and so no margins should be used)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor