Skip to content

Commit

Permalink
fix(style): no padding between menu buttons on mobile
Browse files Browse the repository at this point in the history
Also fix the computation of the number of slots available

Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed Dec 21, 2023
1 parent 22aab6e commit 6c1ec51
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/Menu/ActionEntry.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
margin-right: 2px;
}

@media only screen and (max-width: 767px) {
.button-vue {
margin-right: 0;
}
}

.action-item__menutoggle.action-item__menutoggle--with-icon-slot {
opacity: 1;
}
Expand Down
5 changes: 4 additions & 1 deletion src/components/Menu/MenuBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ import { MENU_ID } from './MenuBar.provider.js'
import { DotsHorizontal, TranslateVariant } from '../icons.js'
import {
useEditorMixin,
useIsMobileMixin,
useIsRichEditorMixin,
useIsRichWorkspaceMixin,
} from '../Editor.provider.js'
Expand All @@ -119,6 +120,7 @@ export default {
extends: ToolBarLogic,
mixins: [
useEditorMixin,
useIsMobileMixin,
useIsRichEditorMixin,
useIsRichWorkspaceMixin,
],
Expand Down Expand Up @@ -204,7 +206,8 @@ export default {
// leave some buffer - this is necessary so the bar does not wrap during resizing
const spaceToFill = width - 4
const slots = Math.floor(spaceToFill / 44)
const spacePerSlot = this.$isMobile ? 44 : 46
const slots = Math.floor(spaceToFill / spacePerSlot)
// Leave one slot empty for the three dot menu
this.iconsLimit = slots - 1
Expand Down

0 comments on commit 6c1ec51

Please sign in to comment.