Skip to content

Commit

Permalink
splash: show log open button only if it isnt empty
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Oct 31, 2023
1 parent 7917cee commit 7d0ef38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion splash/widgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ func (ui *Splash) buttons(gtx C, s layout.Spacing) D {
Spacing: s,
}.Layout(gtx,
layout.Rigid(func(gtx C) D {
btn := button(ui.Theme, &ui.openLogButton, "Open Log file")
if ui.LogPath == "" {
return D{}
}

btn := button(ui.Theme, &ui.openLogButton, "Show logs")
return btn.Layout(gtx)
}),
layout.Rigid(layout.Spacer{Width: unit.Dp(14)}.Layout),
Expand Down

0 comments on commit 7d0ef38

Please sign in to comment.