Fix the DPI in wxSTC IME window
This same modification was made to the Scintilla/SciTE source.
This commit is contained in:
@@ -1510,13 +1510,8 @@ void ScintillaWX::ImeStartComposition() {
|
||||
int sizeZoomed = vs.styles[styleHere].size + vs.zoomLevel * SC_FONT_SIZE_MULTIPLIER;
|
||||
if (sizeZoomed <= 2 * SC_FONT_SIZE_MULTIPLIER) // Hangs if sizeZoomed <= 1
|
||||
sizeZoomed = 2 * SC_FONT_SIZE_MULTIPLIER;
|
||||
AutoSurface surface(this);
|
||||
int deviceHeight = sizeZoomed;
|
||||
if (surface) {
|
||||
deviceHeight = (sizeZoomed * surface->LogPixelsY()) / 72;
|
||||
}
|
||||
// The negative is to allow for leading
|
||||
lf.lfHeight = -(std::abs(deviceHeight / SC_FONT_SIZE_MULTIPLIER));
|
||||
lf.lfHeight = -::MulDiv(sizeZoomed, stc->GetDPI().y, 72 * SC_FONT_SIZE_MULTIPLIER);
|
||||
lf.lfWeight = vs.styles[styleHere].weight;
|
||||
lf.lfItalic = static_cast<BYTE>(vs.styles[styleHere].italic ? 1 : 0);
|
||||
lf.lfCharSet = DEFAULT_CHARSET;
|
||||
|
||||
Reference in New Issue
Block a user