fyne

How to add padding, font size and colours to fyne UI app

烂漫一生 提交于 2021-01-27 21:11:19
问题 I have this sample app code below for a UI I'm implementing using the fyne toolkit, and cant figure out how to align the buttons to the left, makes top text bigger, and add colours. I've tried trying to create a custom theme to implement the UI features I need, but my understanding of the godoc for the fyne toolkit is lacking. Is there a doc someone can point me to to make this work? or provide me with some pointers, as the toolkit is poorly documented this is my sample app code package main

Golang的GUI开发包fyne基本教程

元气小坏坏 提交于 2020-07-27 10:12:21
关于 Fyne Fyne 是使用 Go 语言编写的易于使用的 UI 工具包和应用程序 API。它旨在构建使用单个代码库在桌面和移动设备上运行的应用程序。 当前的版本是 1.2,该版本增加了对 iOS 和 Android 设备的支持,并提供了编写自定义窗口小部件的更简单方法。我们现在正在朝 1.3 迈进,它将添加数据绑定和一些更高级的小部件,例如表和列表。 使用条件 要使用 Fyne 开发应用,您将需要 Go 1.12 或更高版本。 设置好goproxy=https://goproxy.cn,采用go mod模式开发,可以自动下载依赖包。 编译注意事项 如果不带任何参数编译,fyne应用会先打开控制台窗口,然后才从控制台窗口打开应用。要取消启动时的控制台窗口,需要在编译时加入如下参数:-ldflags -H=windowsgui。如下: go build -ldflags -H=windowsgui main.go Helloworld示例: 1 package main 2 3 import " fyne.io/fyne/widget " 4 import " fyne.io/fyne/app " 5 6 func main() { 7 app := app.New() 8 9 w := app.NewWindow( " Hello " ) 10 w.SetContent

How to install opengl for this to run

丶灬走出姿态 提交于 2019-12-11 05:22:02
问题 I am trying following simple code to create a GUI using Fyne package: // from: https://github.com/fyne-io/fyne package main import ( "fyne.io/fyne/widget" "fyne.io/fyne/app" ) func main() { app := app.New() w := app.NewWindow("Hello") w.SetContent(widget.NewVBox( widget.NewLabel("Hello Fyne!"), widget.NewButton("Quit", func() { app.Quit() }), )) w.ShowAndRun() } It compiles and builds executable file without any error or even warning, but on trying to run it gives following error: I:\

Increasing default font size of this simple go gui application

别来无恙 提交于 2019-12-11 05:06:54
问题 I am using following simple demo code to create a GUI using Fyne package: package main import ( "fyne.io/fyne/widget" "fyne.io/fyne/app" ) func main() { app := app.New() w := app.NewWindow("Hello") w.SetContent(widget.NewVBox( widget.NewLabel("Hello Fyne!"), widget.NewButton("Quit", func() { app.Quit() }), )) w.ShowAndRun() } It works all right but I want to increase size default font of this GUI (so that font size should increase in label, button and any other widget like entry that may be

How to change color of GUI components

蹲街弑〆低调 提交于 2019-12-04 01:42:36
问题 I am trying following demo code of fyne: package main import ( "fyne.io/fyne/app" "fyne.io/fyne/widget" ) func main() { a := app.New() w := a.NewWindow("Hello") w.SetContent( widget.NewVBox( widget.NewLabel("Hello Fyne!"), widget.NewButton("Quit", func(){a.Quit()} ), ), ) w.ShowAndRun() } It runs all right but I want to change color of label to blue and that of button to green. I see there is theme but that seems to be for entire application and not for individual elements. How can different