mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 05:45:00 +02:00
Make margin width display correctly under high DPI
This commit is contained in:
parent
121f19d8f9
commit
242530c1fc
@ -2453,11 +2453,12 @@ void ScintillaEditView::showMargin(int whichMarge, bool willBeShowed)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int width = 3;
|
DPIManager& dpiManager = NppParameters::getInstance()._dpiManager;
|
||||||
|
int width = dpiManager.scaleX(3);
|
||||||
if (whichMarge == _SC_MARGE_SYBOLE)
|
if (whichMarge == _SC_MARGE_SYBOLE)
|
||||||
width = NppParameters::getInstance()._dpiManager.scaleX(100) >= 150 ? 20 : 16;
|
width = dpiManager.scaleX(16);
|
||||||
else if (whichMarge == _SC_MARGE_FOLDER)
|
else if (whichMarge == _SC_MARGE_FOLDER)
|
||||||
width = NppParameters::getInstance()._dpiManager.scaleX(100) >= 150 ? 18 : 14;
|
width = dpiManager.scaleX(14);
|
||||||
execute(SCI_SETMARGINWIDTHN, whichMarge, willBeShowed ? width : 0);
|
execute(SCI_SETMARGINWIDTHN, whichMarge, willBeShowed ? width : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user