Fix clicking on drop down button in wxAuiToolBar on wxMSW

The code handling the mouse events assumed the drop down button with was
10px, but wxAuiMSWToolBarArt uses a different width (14px). So clicking
on the left-most 4 pixels was not registered as a drop down click.

Allow the get (and set) the width of the drop down button of the
ToolBarArt.

Increase the detection area for drop down events, because the drop down
button is drawn 1 pixel larger than the actual size.

Rename some variables where dropdown was used instead of overflow.

Closes https://github.com/wxWidgets/wxWidgets/pull/939
This commit is contained in:
Maarten Bent
2018-09-20 13:51:54 +02:00
committed by Vadim Zeitlin
parent 8a2dd7f18e
commit 7a8e314736
5 changed files with 41 additions and 28 deletions

View File

@@ -48,7 +48,8 @@ enum wxAuiToolBarArtSetting
{
wxAUI_TBART_SEPARATOR_SIZE = 0,
wxAUI_TBART_GRIPPER_SIZE = 1,
wxAUI_TBART_OVERFLOW_SIZE = 2
wxAUI_TBART_OVERFLOW_SIZE = 2,
wxAUI_TBART_DROPDOWN_SIZE = 3
};
enum wxAuiToolBarToolTextOrientation
@@ -447,6 +448,7 @@ protected:
int m_separatorSize;
int m_gripperSize;
int m_overflowSize;
int m_dropdownSize;
};