Fix positioning of TextCtrlEditor in wxPG (wxGTK)
Position of the editor associated with properties like StringProperty, IntProperty, etc. needs to be adjusted in order to display edited text string at the same position as the text which is displayed as a property value prior to the editing.
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
// Here are some platform dependent defines
|
||||
// NOTE: More in propertygrid.cpp
|
||||
//
|
||||
// NB: Only define wxPG_TEXTCTRLXADJUST for platforms that do not
|
||||
// (yet) support wxTextEntry::SetMargins() for the left margin.
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
|
||||
@@ -38,6 +40,9 @@
|
||||
// space between vertical line and value editor control
|
||||
#define wxPG_XBEFOREWIDGET 1
|
||||
|
||||
// left margin can be set with wxTextEntry::SetMargins()
|
||||
#undef wxPG_TEXTCTRLXADJUST
|
||||
|
||||
// comment to use bitmap buttons
|
||||
#define wxPG_ICON_WIDTH 9
|
||||
// 1 if wxRendererNative should be employed
|
||||
@@ -67,9 +72,8 @@
|
||||
#define wxPG_XBEFOREWIDGET 1
|
||||
|
||||
// x position adjustment for wxTextCtrl (and like)
|
||||
// NB: Only define wxPG_TEXTCTRLXADJUST for platforms that do not
|
||||
// (yet) support wxTextEntry::SetMargins() for the left margin.
|
||||
//#define wxPG_TEXTCTRLXADJUST 3
|
||||
// left margin can be set with wxTextEntry::SetMargins()
|
||||
#undef wxPG_TEXTCTRLXADJUST
|
||||
|
||||
// comment to use bitmap buttons
|
||||
#define wxPG_ICON_WIDTH 9
|
||||
@@ -100,6 +104,7 @@
|
||||
#define wxPG_XBEFOREWIDGET 1
|
||||
|
||||
// x position adjustment for wxTextCtrl (and like)
|
||||
// left margin cannot be set with wxTextEntry::SetMargins()
|
||||
#define wxPG_TEXTCTRLXADJUST 0
|
||||
|
||||
// comment to use bitmap buttons
|
||||
@@ -131,6 +136,7 @@
|
||||
#define wxPG_XBEFOREWIDGET 1
|
||||
|
||||
// x position adjustment for wxTextCtrl (and like)
|
||||
// left margin cannot be set with wxTextEntry::SetMargins()
|
||||
#define wxPG_TEXTCTRLXADJUST 3
|
||||
|
||||
// comment to use bitmap buttons
|
||||
|
Reference in New Issue
Block a user