always forcing a relayout when position changes, making mlte a system option
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,6 +16,14 @@
|
|||||||
#pragma interface "textctrl.h"
|
#pragma interface "textctrl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_SYSTEM_OPTIONS
|
||||||
|
// set this to true if you want to use the 'classic' mlte based implementation
|
||||||
|
// instead of the HIView based implementation in 10.3 and upwards, the former
|
||||||
|
// has more features (backgrounds etc.) but may show redraw artefacts and other
|
||||||
|
// problems depending on your usage, default is 'false'
|
||||||
|
#define wxMAC_TEXTCONTROL_USE_MLTE _T("mac.textcontrol-use-mlte")
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/control.h"
|
#include "wx/control.h"
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxTextCtrlNameStr;
|
WXDLLEXPORT_DATA(extern const wxChar*) wxTextCtrlNameStr;
|
||||||
|
@@ -45,6 +45,7 @@
|
|||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/filefn.h"
|
#include "wx/filefn.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
|
#include "wx/sysopt.h"
|
||||||
|
|
||||||
#if defined(__BORLANDC__) && !defined(__WIN32__)
|
#if defined(__BORLANDC__) && !defined(__WIN32__)
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
@@ -422,7 +423,15 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
#ifdef __WXMAC_OSX__
|
#ifdef __WXMAC_OSX__
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
|
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
|
||||||
if ( UMAGetSystemVersion() >= 0x1050 )
|
|
||||||
|
bool tryHIView = UMAGetSystemVersion() >= 0x1030 ;
|
||||||
|
#if wxUSE_SYSTEM_OPTIONS
|
||||||
|
if ( (wxSystemOptions::HasOption(wxMAC_TEXTCONTROL_USE_MLTE) ) && ( wxSystemOptions::GetOptionInt( wxMAC_TEXTCONTROL_USE_MLTE ) == 1) )
|
||||||
|
{
|
||||||
|
tryHIView = false ;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if ( tryHIView )
|
||||||
{
|
{
|
||||||
m_peer = new wxMacMLTEHIViewControl( this , str , pos , size , style ) ;
|
m_peer = new wxMacMLTEHIViewControl( this , str , pos , size , style ) ;
|
||||||
}
|
}
|
||||||
@@ -2213,7 +2222,7 @@ void wxMacMLTEClassicControl::MacUpdatePosition()
|
|||||||
destRect.bottom = destRect.top + 0x40000000 ;
|
destRect.bottom = destRect.top + 0x40000000 ;
|
||||||
|
|
||||||
SectRect( &viewRect , &visBounds , &viewRect ) ;
|
SectRect( &viewRect , &visBounds , &viewRect ) ;
|
||||||
TXNSetRectBounds( m_txn , &viewRect , &destRect , false ) ;
|
TXNSetRectBounds( m_txn , &viewRect , &destRect , true ) ;
|
||||||
/*
|
/*
|
||||||
TXNSetFrameBounds( m_txn, m_txnControlBounds.top, m_txnControlBounds.left,
|
TXNSetFrameBounds( m_txn, m_txnControlBounds.top, m_txnControlBounds.left,
|
||||||
m_txnControlBounds.bottom - ( m_sbHorizontal ? 14 : 0 ) , m_txnControlBounds.right - ( m_sbVertical ? 14 : 0 ), m_txnFrameID);
|
m_txnControlBounds.bottom - ( m_sbHorizontal ? 14 : 0 ) , m_txnControlBounds.right - ( m_sbVertical ? 14 : 0 ), m_txnFrameID);
|
||||||
|
Reference in New Issue
Block a user