-
Notifications
You must be signed in to change notification settings - Fork 62
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
always try to show 4 buttons in toolbar #3184
Conversation
Pull Request Test Coverage Report for Build 8447778046Details
💛 - Coveralls |
if (maxButtonsInToolbar < internal.minimumToolbarButtonsInMainToolbar) { | ||
maxButtonsInToolbar = Math.floor( toolbar.width / internal.minimumToolbarButtonWidth ) | ||
if (maxButtonsInToolbar > internal.minimumToolbarButtonsInMainToolbar) { | ||
// we do not want to show more buttons than minimum even they would fit | ||
maxButtonsInToolbar = internal.minimumToolbarButtonsInMainToolbar | ||
} | ||
} |
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.
I was thinking about something like this - would that work? 🤔
if (maxButtonsInToolbar < internal.minimumToolbarButtonsInMainToolbar) { | |
maxButtonsInToolbar = Math.floor( toolbar.width / internal.minimumToolbarButtonWidth ) | |
if (maxButtonsInToolbar > internal.minimumToolbarButtonsInMainToolbar) { | |
// we do not want to show more buttons than minimum even they would fit | |
maxButtonsInToolbar = internal.minimumToolbarButtonsInMainToolbar | |
} | |
} | |
let maxButtonsInToolbar = Math.floor( toolbar.width / internal.preferredToolbarButtonWidth ) | |
if ( Screen.primaryOrientation === Qt.PortraitOrientation || Qt.InvertedPortraitOrientation ) { | |
maxButtonsInToolbar = Math.max( maxButtonsInToolbar, internal.minimumToolbarButtonsInMainToolbar) | |
} |
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.
this would work on mobiles , but when you will play with width on desktop it will be screwed... and we have windows production version at minimum
if screen size is >= 240px 4 buttons will be shown now (I hope there are no smaller mobile phones :) )
toolbarbuttons.mov