[NEW_FEATURE] Make DPI-aware for Shortcutmapper and Preference Dialog.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1174 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
7cbc342570
commit
b94b9d8c61
@ -49,6 +49,16 @@ void ShortcutMapper::initTabs() {
|
||||
TabCtrl_SetCurSel(_hTabCtrl, int(_currentState));
|
||||
}
|
||||
|
||||
void ShortcutMapper::getClientRect(RECT & rc) const
|
||||
{
|
||||
Window::getClientRect(rc);
|
||||
|
||||
rc.top += NppParameters::getInstance()->_dpiManager.scaleY(40);
|
||||
rc.bottom -= NppParameters::getInstance()->_dpiManager.scaleY(20);
|
||||
rc.left += NppParameters::getInstance()->_dpiManager.scaleX(5);
|
||||
|
||||
}
|
||||
|
||||
void ShortcutMapper::translateTab(int index, const TCHAR * newname) {
|
||||
if (index < 0 || index > 4)
|
||||
return;
|
||||
|
@ -75,13 +75,7 @@ public:
|
||||
else
|
||||
::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_SHORTCUTMAPPER_DLG), _hParent, (DLGPROC)dlgProc, (LPARAM)this);
|
||||
};
|
||||
void getClientRect(RECT & rc) const {
|
||||
Window::getClientRect(rc);
|
||||
rc.top += 40;
|
||||
rc.bottom -= 20;
|
||||
rc.left += 5;
|
||||
};
|
||||
|
||||
void getClientRect(RECT & rc) const;
|
||||
void translateTab(int index, const TCHAR * newname);
|
||||
|
||||
protected :
|
||||
|
@ -158,9 +158,10 @@ BOOL CALLBACK PreferenceDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPa
|
||||
makeCategoryList();
|
||||
RECT rc;
|
||||
getClientRect(rc);
|
||||
rc.top += 10;
|
||||
rc.bottom -= 50;
|
||||
rc.left += 150;
|
||||
|
||||
rc.top += NppParameters::getInstance()->_dpiManager.scaleY(10);
|
||||
rc.bottom -= NppParameters::getInstance()->_dpiManager.scaleY(50);
|
||||
rc.left += NppParameters::getInstance()->_dpiManager.scaleX(150);
|
||||
|
||||
_barsDlg.reSizeTo(rc);
|
||||
_marginsDlg.reSizeTo(rc);
|
||||
|
Loading…
Reference in New Issue
Block a user