gui: use Consolas as monospace font on Windows
This commit is contained in:
parent
3b17ddd8a4
commit
7b4cc885f5
5
main.go
5
main.go
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user