gui: use Consolas as monospace font on Windows

This commit is contained in:
mappu 2024-06-30 13:16:27 +12:00
parent 3b17ddd8a4
commit 7b4cc885f5

View File

@ -3,6 +3,7 @@ package main
import (
"errors"
"fmt"
"runtime"
"runtime/debug"
"strings"
"unsafe"
@ -233,7 +234,11 @@ func (f *TMainForm) OnFormCreate(sender vcl.IObject) {
f.queryInput.SetHeight(MY_HEIGHT)
f.queryInput.SetAlign(types.AlTop)
f.queryInput.SetTop(1)
if runtime.GOOS == "windows" {
f.queryInput.Font().SetName("Consolas")
} else {
f.queryInput.Font().SetName("monospace")
}
f.queryInput.BorderSpacing().SetLeft(MY_SPACING)
//f.queryInput.BorderSpacing().SetTop(1)
f.queryInput.BorderSpacing().SetRight(MY_SPACING)