Move in-cell property expander buttons slightly to the right (looks better that way)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -115,6 +115,11 @@
|
|||||||
|
|
||||||
//#define wxPG_TOOLTIP_DELAY 1000
|
//#define wxPG_TOOLTIP_DELAY 1000
|
||||||
|
|
||||||
|
// This is the number of pixels the expander button inside
|
||||||
|
// property cells (i.e. not in the grey margin area are
|
||||||
|
// adjusted.
|
||||||
|
#define IN_CELL_EXPANDER_BUTTON_X_ADJUST 2
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
#if wxUSE_INTL
|
#if wxUSE_INTL
|
||||||
@@ -2272,6 +2277,10 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Fine tune button rectangle to actually fit the cell
|
||||||
|
if ( butRect.x > 0 )
|
||||||
|
butRect.x += IN_CELL_EXPANDER_BUTTON_X_ADJUST;
|
||||||
|
|
||||||
if ( p->m_flags & wxPG_PROP_MODIFIED && (windowStyle & wxPG_BOLD_MODIFIED) )
|
if ( p->m_flags & wxPG_PROP_MODIFIED && (windowStyle & wxPG_BOLD_MODIFIED) )
|
||||||
{
|
{
|
||||||
dc.SetFont(m_captionFont);
|
dc.SetFont(m_captionFont);
|
||||||
@@ -4506,6 +4515,10 @@ bool wxPropertyGrid::HandleMouseClick( int x, unsigned int y, wxMouseEvent &even
|
|||||||
{
|
{
|
||||||
int nx = x + m_marginWidth - marginEnds; // Normalize x.
|
int nx = x + m_marginWidth - marginEnds; // Normalize x.
|
||||||
|
|
||||||
|
// Fine tune cell button x
|
||||||
|
if ( !p->IsCategory() )
|
||||||
|
nx -= IN_CELL_EXPANDER_BUTTON_X_ADJUST;
|
||||||
|
|
||||||
if ( (nx >= m_gutterWidth && nx < (m_gutterWidth+m_iconWidth)) )
|
if ( (nx >= m_gutterWidth && nx < (m_gutterWidth+m_iconWidth)) )
|
||||||
{
|
{
|
||||||
int y2 = y % m_lineHeight;
|
int y2 = y % m_lineHeight;
|
||||||
|
Reference in New Issue
Block a user