56 lines
1.3 KiB
Go
56 lines
1.3 KiB
Go
package main
|
|
|
|
import (
|
|
"fyne.io/fyne/v2"
|
|
"fyne.io/fyne/v2/container"
|
|
"fyne.io/fyne/v2/widget"
|
|
)
|
|
|
|
func (a *App) buildUI() {
|
|
a.statusLabel = widget.NewLabel("Готов к работе")
|
|
a.statusLabel.TextStyle = fyne.TextStyle{Bold: true}
|
|
|
|
a.fileInfo = widget.NewLabel("Файл не выбран")
|
|
a.version = widget.NewLabel("2603-01.8")
|
|
a.progressBar = widget.NewProgressBar()
|
|
a.progressBar.Hide()
|
|
|
|
a.serverTab = container.NewAppTabs()
|
|
a.platformTab = container.NewAppTabs()
|
|
|
|
// a.contentArea = container.NewHBox()
|
|
|
|
uploadBtnServer := widget.NewButton("🖥 server", a.onUploadServer)
|
|
// uploadBtnServer.Importance = widget.HighImportance
|
|
uploadBtnPlatform := widget.NewButton("🖧 platform", a.onUploadPlatform)
|
|
|
|
// Панель инструментов
|
|
toolbar := container.NewHBox(
|
|
uploadBtnServer,
|
|
uploadBtnPlatform,
|
|
widget.NewSeparator(),
|
|
a.progressBar,
|
|
)
|
|
|
|
// Основной контент
|
|
mainContent := container.NewBorder(
|
|
container.NewHBox(
|
|
toolbar,
|
|
widget.NewSeparator(),
|
|
a.statusLabel,
|
|
),
|
|
container.NewHBox(
|
|
widget.NewSeparator(),
|
|
a.fileInfo,
|
|
a.version,
|
|
),
|
|
nil, nil,
|
|
container.NewAppTabs(
|
|
container.NewTabItem("Server", a.serverTab),
|
|
container.NewTabItem("Platform", a.platformTab),
|
|
),
|
|
)
|
|
|
|
a.window.SetContent(mainContent)
|
|
}
|