andlabs / andlabs/libui

width of multiline text lable wrong on windows 10

オープン
#464 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C
スター
10.9k
フォーク
612
PR マージ指標
30日以内にマージされた PR はありません

説明

On windows 10 1903, the width of multiline text lable is the sum of each line's width

below is my Go test code
```go
package main

import (
"github.com/andlabs/ui"
_ "github.com/andlabs/ui/winmanifest"
)
func setupUi() {
mainwin := ui.NewWindow("", 100, 500, true)
hbox := ui.NewHorizontalBox()
mainwin.SetChild(hbox)
b := ui.NewButton("TEST")
l := ui.NewLabel("")
hbox.Append(b, true)
hbox.Append(l, true)
s1 := "\r\n\r\n1\r\n\r\n\r\n\r\n"
s2 := "1"
for i := 0; i < 6; i++ {
s1 += s1
s2 += s2
}
b.OnClicked(func(button *ui.Button) {
if l.Text() == s1{
l.SetText(s2)
}else{
l.SetText(s1)
}
})
mainwin.Show()
}
func main() {
ui.Main(setupUi)
}
```
![image](https://user-images.githubusercontent.com/23057110/57388416-b38a9300-71ea-11e9-844a-d4035296f398.png)
![image](https://user-images.githubusercontent.com/23057110/57388442-bf765500-71ea-11e9-8706-c626afd14ebc.png)
![image](https://user-images.githubusercontent.com/23057110/57388461-cbfaad80-71ea-11e9-81ba-e4c3eb0db7c5.png)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。