Skip to content

Commit

Permalink
refactor: rework/uniformize layout for timer panel and buttons panel
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsquest committed Sep 29, 2024
1 parent c4a9f2e commit 52ce12d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func Display(app fyne.App, buildInfo BuildInfo) {
fyne.NewMenuItem("About", aboutWindow.Show))
desk.SetSystemTrayMenu(trayMenu)
}

mainWindow.ShowAndRun()
}

Expand Down Expand Up @@ -79,13 +80,13 @@ func MakeClassicLayout(myPomodoro *pomodoro.Pomodoro) fyne.CanvasObject {
timer.Label.TextSize = 60
timer.Label.TextStyle.Bold = true
timer.Label.Alignment = fyne.TextAlignCenter
timerPanel := timer
timerPanel := container.NewCenter(container.NewHBox(timer))

playButton := widget.NewButtonWithIcon("", theme.MediaPlayIcon(), nil)
stopButton := widget.NewButtonWithIcon("", theme.MediaStopIcon(), nil)
nextButton := widget.NewButtonWithIcon("", theme.MediaSkipNextIcon(), nil)
settingsButton := widget.NewButtonWithIcon("", theme.SettingsIcon(), nil)
buttons := container.NewHBox(layout.NewSpacer(), playButton, stopButton, nextButton, settingsButton, layout.NewSpacer())
buttons := container.NewCenter(container.NewHBox(playButton, stopButton, nextButton, settingsButton))

timer.OnTapped = func() {
if myPomodoro.Running {
Expand Down

0 comments on commit 52ce12d

Please sign in to comment.