Skip to content

Commit

Permalink
Pull in unreleased Hyperlink truncation property from fyne-io/pull/4335
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Nov 23, 2023
1 parent 71b5fff commit 0d0cd3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions widget/hyperlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ type Hyperlink struct {
Alignment fyne.TextAlign // The alignment of the Text
Wrapping fyne.TextWrap // The wrapping of the Text
TextStyle fyne.TextStyle // The style of the hyperlink text
// The truncation mode of the hyperlink
//
// Since: 2.5
Truncation fyne.TextTruncation

// OnTapped overrides the default `fyne.OpenURL` call when the link is tapped
//
Expand Down Expand Up @@ -238,6 +242,7 @@ func (hl *Hyperlink) openURL() {

func (hl *Hyperlink) syncSegments() {
hl.provider.Wrapping = hl.Wrapping
hl.provider.Truncation = hl.Truncation
hl.provider.Segments = []RichTextSegment{&TextSegment{
Style: RichTextStyle{
Alignment: hl.Alignment,
Expand Down

0 comments on commit 0d0cd3f

Please sign in to comment.