mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-28 08:14:18 +02:00
Fix docked window sizing direction problem in RTL mode
Fix #10536, close #10576
This commit is contained in:
parent
19cf5c9037
commit
531bef28d8
@ -31,6 +31,8 @@ void DockingSplitter::init(HINSTANCE hInst, HWND hWnd, HWND hMessage, UINT flags
|
|||||||
_flags = flags;
|
_flags = flags;
|
||||||
|
|
||||||
WNDCLASS wc;
|
WNDCLASS wc;
|
||||||
|
DWORD hwndExStyle = (DWORD)GetWindowLongPtr(hWnd, GWL_EXSTYLE);
|
||||||
|
isRTL = hwndExStyle & WS_EX_LAYOUTRTL;
|
||||||
|
|
||||||
if (flags & DMS_HORIZONTAL)
|
if (flags & DMS_HORIZONTAL)
|
||||||
{
|
{
|
||||||
@ -137,7 +139,7 @@ LRESULT DockingSplitter::runProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
}
|
}
|
||||||
else if (_ptOldPos.x != pt.x)
|
else if (_ptOldPos.x != pt.x)
|
||||||
{
|
{
|
||||||
::SendMessage(_hMessage, DMM_MOVE_SPLITTER, _ptOldPos.x - pt.x, reinterpret_cast<LPARAM>(_hSelf));
|
::SendMessage(_hMessage, DMM_MOVE_SPLITTER, isRTL ? pt.x - _ptOldPos.x : _ptOldPos.x - pt.x, reinterpret_cast<LPARAM>(_hSelf));
|
||||||
}
|
}
|
||||||
_ptOldPos = pt;
|
_ptOldPos = pt;
|
||||||
}
|
}
|
||||||
|
@ -49,5 +49,8 @@ private:
|
|||||||
|
|
||||||
static BOOL _isVertReg;
|
static BOOL _isVertReg;
|
||||||
static BOOL _isHoriReg;
|
static BOOL _isHoriReg;
|
||||||
|
|
||||||
|
// get layout direction
|
||||||
|
bool isRTL;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user