app: use 'latestComic' to set comic fields in UI
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0b5559336e
commit
755a7c07b1
@ -7,7 +7,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
|
||||||
|
|
||||||
"fyne.io/fyne/v2"
|
"fyne.io/fyne/v2"
|
||||||
"fyne.io/fyne/v2/app"
|
"fyne.io/fyne/v2/app"
|
||||||
@ -125,17 +124,35 @@ func makeBrowseUI() *fyne.Container {
|
|||||||
layout.NewSpacer(),
|
layout.NewSpacer(),
|
||||||
container.NewCenter(
|
container.NewCenter(
|
||||||
container.NewVBox(
|
container.NewVBox(
|
||||||
&widget.Label{Text: "published on " + fmt.Sprint(time.Now().Date()), TextStyle: fyne.TextStyle{Italic: true}},
|
&widget.Label{
|
||||||
|
Text: "published on " +
|
||||||
|
fmt.Sprint(
|
||||||
|
latestComic.Year, "-",
|
||||||
|
latestComic.Month, "-",
|
||||||
|
latestComic.Day,
|
||||||
|
),
|
||||||
|
TextStyle: fyne.TextStyle{Italic: true},
|
||||||
|
},
|
||||||
container.NewHBox(
|
container.NewHBox(
|
||||||
&widget.Label{Text: "Comic Title", TextStyle: fyne.TextStyle{Bold: true}},
|
&widget.Label{
|
||||||
&widget.Label{Text: "(#1234)", TextStyle: fyne.TextStyle{Monospace: true}},
|
Text: latestComic.Title,
|
||||||
|
TextStyle: fyne.TextStyle{Bold: true},
|
||||||
|
},
|
||||||
|
&widget.Label{
|
||||||
|
Text: "(#" + fmt.Sprint(latestComic.Num) + ")",
|
||||||
|
TextStyle: fyne.TextStyle{Monospace: true},
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
imgC,
|
imgC,
|
||||||
layout.NewSpacer(),
|
layout.NewSpacer(),
|
||||||
container.NewCenter(
|
container.NewCenter(
|
||||||
&widget.Label{Text: "Comic 'title text'", TextStyle: fyne.TextStyle{Italic: true}},
|
// comic "alt text"
|
||||||
|
&widget.Label{
|
||||||
|
Text: latestComic.Alt,
|
||||||
|
TextStyle: fyne.TextStyle{Italic: true},
|
||||||
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user