Skip to content

Commit

Permalink
Fix a compilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Jan 6, 2024
1 parent a169aeb commit a6f1cc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions widget/hyperlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@ func (hl *Hyperlink) MouseOut() {

func (hl *Hyperlink) focusWidth() float32 {
innerPad := theme.InnerPadding()
return fyne.Min(hl.size.Width, hl.textSize.Width+innerPad+theme.Padding()*2) - innerPad
return fyne.Min(hl.size.Load().Width, hl.textSize.Width+innerPad+theme.Padding()*2) - innerPad
}

func (hl *Hyperlink) focusXPos() float32 {
switch hl.Alignment {
case fyne.TextAlignLeading:
return theme.InnerPadding() / 2
case fyne.TextAlignCenter:
return (hl.size.Width - hl.focusWidth()) / 2
return (hl.size.Load().Width - hl.focusWidth()) / 2
case fyne.TextAlignTrailing:
return (hl.size.Width - hl.focusWidth()) - theme.InnerPadding()/2
return (hl.size.Load().Width - hl.focusWidth()) - theme.InnerPadding()/2
default:
return 0 // unreached
}
Expand Down

0 comments on commit a6f1cc1

Please sign in to comment.