Skip to content

Commit

Permalink
Don't use the fat icons for doctabs on mobile, that was apptabs only
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Nov 15, 2023
1 parent 4128839 commit ded5af8
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions container/doctabs.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (t *DocTabs) SetItems(items []*TabItem) {

// SetTabLocation sets the location of the tab bar
func (t *DocTabs) SetTabLocation(l TabLocation) {
t.location = tabsAdjustedLocation(l)
t.location = l
t.Refresh()
}

Expand Down Expand Up @@ -319,18 +319,7 @@ func (r *docTabsRenderer) buildTabButtons(count int, buttons *fyne.Container) {
buttons.Objects = nil

var iconPos buttonIconPosition
if fyne.CurrentDevice().IsMobile() {
cells := count
if cells == 0 {
cells = 1
}
if r.docTabs.location == TabLocationTop || r.docTabs.location == TabLocationBottom {
buttons.Layout = layout.NewGridLayoutWithColumns(cells)
} else {
buttons.Layout = layout.NewGridLayoutWithRows(cells)
}
iconPos = buttonIconTop
} else if r.docTabs.location == TabLocationLeading || r.docTabs.location == TabLocationTrailing {
if r.docTabs.location == TabLocationLeading || r.docTabs.location == TabLocationTrailing {
buttons.Layout = layout.NewVBoxLayout()
iconPos = buttonIconTop
} else {
Expand Down

0 comments on commit ded5af8

Please sign in to comment.