fix(markdown): align button order between layouts to avoid shifts

This commit is contained in:
Elian Doran
2026-04-17 19:09:08 +03:00
parent 98b92b7220
commit 1af2a07a57
2 changed files with 17 additions and 13 deletions

View File

@@ -48,8 +48,8 @@ export type FloatingButtonsList = ((context: FloatingButtonContext) => false | V
export const DESKTOP_FLOATING_BUTTONS: FloatingButtonsList = [
RefreshBackendLogButton,
SwitchSplitOrientationButton,
ToggleReadOnlyButton,
SwitchSplitOrientationButton,
DisplayModeSwitcher,
EditButton,
ShowTocWidgetButton,

View File

@@ -72,8 +72,8 @@ export default function NoteActionsCustom(props: NoteActionsCustomProps) {
>
<AddChildButton {...innerProps} />
<RunActiveNoteButton {...innerProps } />
<DisplayModeSwitcher {...innerProps} />
<SwitchSplitOrientationButton {...innerProps} />
<DisplayModeSwitcher {...innerProps} />
<SaveToNoteButton {...innerProps} />
<RefreshButton {...innerProps} />
<CopyReferenceToClipboardButton {...innerProps} />
@@ -232,17 +232,21 @@ function DisplayModeSwitcher({ note, isDefaultViewMode }: NoteActionsCustomInner
}
return (
<ButtonGroup size="sm">
{buttons.map(({ value, icon, text }) => (
<NoteAction
key={value}
icon={icon}
text={text}
active={mode === value}
onClick={() => setDisplayMode(value)}
/>
))}
</ButtonGroup>
<>
<div className="note-actions-custom-spacer" />
<ButtonGroup size="sm">
{buttons.map(({ value, icon, text }) => (
<NoteAction
key={value}
icon={icon}
text={text}
active={mode === value}
onClick={() => setDisplayMode(value)}
/>
))}
</ButtonGroup>
<div className="note-actions-custom-spacer" />
</>
);
}