Fix AUI toolbar drop down width size in high DPI
Don't apply FromDIP() twice: GetElementSize() already returns the size in DIPs.
This commit is contained in:
parent
cc7c0bbd9c
commit
acd7ea6120
1 changed files with 2 additions and 2 deletions
|
|
@ -387,7 +387,7 @@ void wxAuiGenericToolBarArt::DrawDropDownButton(
|
|||
const wxAuiToolBarItem& item,
|
||||
const wxRect& rect)
|
||||
{
|
||||
int dropdownWidth = wnd->FromDIP(GetElementSize(wxAUI_TBART_DROPDOWN_SIZE));
|
||||
int dropdownWidth = GetElementSize(wxAUI_TBART_DROPDOWN_SIZE);
|
||||
int textWidth = 0, textHeight = 0, textX = 0, textY = 0;
|
||||
int bmpX = 0, bmpY = 0, dropBmpX = 0, dropBmpY = 0;
|
||||
|
||||
|
|
@ -2640,7 +2640,7 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt)
|
|||
|
||||
int mouse_x = evt.GetX();
|
||||
wxRect rect = m_actionItem->m_sizerItem->GetRect();
|
||||
int dropdownWidth = FromDIP(m_art->GetElementSize(wxAUI_TBART_DROPDOWN_SIZE));
|
||||
int dropdownWidth = m_art->GetElementSize(wxAUI_TBART_DROPDOWN_SIZE);
|
||||
const bool dropDownHit = m_actionItem->m_dropDown &&
|
||||
mouse_x >= (rect.x+rect.width-dropdownWidth) &&
|
||||
mouse_x < (rect.x+rect.width);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue