gui: use Consolas as monospace font on Windows
This commit is contained in:
parent
3b17ddd8a4
commit
7b4cc885f5
7
main.go
7
main.go
@ -3,6 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"runtime"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
@ -233,7 +234,11 @@ func (f *TMainForm) OnFormCreate(sender vcl.IObject) {
|
|||||||
f.queryInput.SetHeight(MY_HEIGHT)
|
f.queryInput.SetHeight(MY_HEIGHT)
|
||||||
f.queryInput.SetAlign(types.AlTop)
|
f.queryInput.SetAlign(types.AlTop)
|
||||||
f.queryInput.SetTop(1)
|
f.queryInput.SetTop(1)
|
||||||
f.queryInput.Font().SetName("monospace")
|
if runtime.GOOS == "windows" {
|
||||||
|
f.queryInput.Font().SetName("Consolas")
|
||||||
|
} else {
|
||||||
|
f.queryInput.Font().SetName("monospace")
|
||||||
|
}
|
||||||
f.queryInput.BorderSpacing().SetLeft(MY_SPACING)
|
f.queryInput.BorderSpacing().SetLeft(MY_SPACING)
|
||||||
//f.queryInput.BorderSpacing().SetTop(1)
|
//f.queryInput.BorderSpacing().SetTop(1)
|
||||||
f.queryInput.BorderSpacing().SetRight(MY_SPACING)
|
f.queryInput.BorderSpacing().SetRight(MY_SPACING)
|
||||||
|
Loading…
Reference in New Issue
Block a user