diff options
| author | trustable-code <krauter.simon@arcor.de> | 2020-02-16 00:52:07 +0100 |
|---|---|---|
| committer | trustable-code <krauter.simon@arcor.de> | 2020-02-16 00:52:07 +0100 |
| commit | 1cd4b28eb9f81114099acf2179cf134143fa3c7e (patch) | |
| tree | cd6676f04b4cfa67257a7dcc56218b808e21cd07 | |
| parent | 2e3b4bee7fdb4556a734c7224f1556be6ebb0538 (diff) | |
| download | NiGui-1cd4b28eb9f81114099acf2179cf134143fa3c7e.tar.gz NiGui-1cd4b28eb9f81114099acf2179cf134143fa3c7e.zip | |
Windows: Correct text position by moving two pixels to the left
| -rwxr-xr-x | src/nigui/private/windows/platform_impl.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nigui/private/windows/platform_impl.nim b/src/nigui/private/windows/platform_impl.nim index 2d22a83..2ba5f72 100755 --- a/src/nigui/private/windows/platform_impl.nim +++ b/src/nigui/private/windows/platform_impl.nim @@ -630,7 +630,7 @@ method drawText(canvas: Canvas, text: string, x, y = 0) = if canvasImpl.fFontBrush == nil: pCheckGdiplusStatus(GdipCreateSolidFill(canvas.textColor.pColorToARGB(), canvasImpl.fFontBrush)) var rect: RectF - rect.x = x.float + rect.x = (x - 2).float rect.y = y.float pCheckGdiplusStatus(GdipDrawString(canvasImpl.fGraphics, text.pUtf8ToUtf16(), -1, canvasImpl.fFont, rect, nil, canvasImpl.fFontBrush)) |
