Skip to content

Commit

Permalink
Fix floating panel movement issue in RTL mode
Browse files Browse the repository at this point in the history
Fix #10579, close #10586
  • Loading branch information
Ashfaaq18 authored and donho committed Sep 27, 2021
1 parent d11d2c7 commit d939e4a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions PowerEditor/src/WinControls/DockingWnd/Gripper.h
Expand Up @@ -48,6 +48,8 @@ class Gripper
void init(HINSTANCE hInst, HWND hParent) {
_hInst = hInst;
_hParent = hParent;
DWORD hwndExStyle = (DWORD)GetWindowLongPtr(_hParent, GWL_EXSTYLE);
isRTL = hwndExStyle & WS_EX_LAYOUTRTL;
};

void startGrip(DockingCont* pCont, DockingManager* pDockMgr);
Expand Down Expand Up @@ -97,8 +99,8 @@ protected :
ShrinkRcToSize(rc);
};
void ShrinkRcToSize(RECT *rc) {
rc->right -= rc->left;
rc->bottom -= rc->top;
isRTL ? rc->right = rc->left - rc->right : rc->right -= rc->left;
rc->bottom -= rc->top;
};
void DoCalcGripperRect(RECT* rc, RECT rcCorr, POINT pt) {
if ((rc->left + rc->right) < pt.x)
Expand Down Expand Up @@ -142,5 +144,8 @@ protected :

// is class registered
static BOOL _isRegistered;

// get layout direction
bool isRTL;
};

0 comments on commit d939e4a

Please sign in to comment.