New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tab button layout on mobile #1962
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, but not quite the complete solution - 2 cases seem wrong.
Mobile, Portrait, Leading - tabs appear at bottom (should be top)
Mobile, Landscape, Bottom - tabs appear at left (leading), but should be right
Where are you getting these expectations from? From the ticket (#1310), AppTabs is a combination of two Material Design components;
|
From how it worked before? |
I don't think that is true, Fyne v2.0.0 AppTab on Mobile always moved Leading & Trailing to Bottom (https://github.com/fyne-io/fyne/blob/master/container/apptabs.go#L323): func (r *appTabsRenderer) adaptedLocation() TabLocation {
tabLocation := r.container.tabLocation
if fyne.CurrentDevice().IsMobile() && (tabLocation == TabLocationLeading || tabLocation == TabLocationTrailing) {
return TabLocationBottom
}
return r.container.tabLocation
} And does not have different behaviour for Mobile Portrait vs Mobile Landscape |
Strange, seems I misremembered how it was previously working. |
I misremembered how it used to work, needs re-testing
This is not the expected state (see fyne-io#1962). This helps to recognize the difference between the current state and the fixed layout.
This is not the expected state (see fyne-io#1962). This helps to recognize the difference between the current state and the fixed layout.
Picked from Stuart's commit from PR fyne-io#1962
Description:
Tab buttons were always rendered in a grid of columns, this PR uses a grid of rows when the tab location is leading or trailing
Checklist: