Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 1055dd4

Browse files
committed
Fix formatting buttons in edition
1 parent 479aa45 commit 1055dd4

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

res/css/views/rooms/wysiwyg_composer/_SendWysiwygComposer.pcss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ limitations under the License.
2525
margin-right: 6px;
2626
gap: 8px;
2727

28+
.mx_FormattingButtons {
29+
margin-left: 12px;
30+
}
31+
2832
.mx_WysiwygComposer_Editor {
2933
border: 1px solid;
3034
border-color: $quaternary-content;

res/css/views/rooms/wysiwyg_composer/components/_FormattingButtons.pcss

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
.mx_FormattingButtons {
1818
display: flex;
1919
justify-content: flex-start;
20+
gap: 8px;
2021

2122
.mx_FormattingButtons_Button {
2223
--size: 28px;
@@ -26,18 +27,9 @@ limitations under the License.
2627
line-height: var(--size);
2728
width: auto;
2829
padding-left: 22px;
29-
margin-right: 8px;
3030
background-color: transparent;
3131
border: none;
3232

33-
&:first-child {
34-
margin-left: 12px;
35-
}
36-
37-
&:last-child {
38-
margin-right: auto;
39-
}
40-
4133
&::before {
4234
content: '';
4335
position: absolute;

src/components/views/rooms/MessageComposer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import Stickerpicker from './Stickerpicker';
3131
import { makeRoomPermalink, RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks';
3232
import E2EIcon from './E2EIcon';
3333
import SettingsStore from "../../../settings/SettingsStore";
34-
import { aboveLeftOf, AboveLeftOf } from "../../structures/ContextMenu";
34+
import { aboveLeftOf } from "../../structures/ContextMenu";
3535
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
3636
import ReplyPreview from "./ReplyPreview";
3737
import { UPDATE_EVENT } from "../../../stores/AsyncStore";
@@ -428,7 +428,7 @@ export class MessageComposer extends React.Component<IProps, IState> {
428428
// Instead of doing a querySelector or pass a ref to find the compute the height formatting buttons
429429
// We are using an arbitrary value, the formatting buttons height doesn't change during the lifecycle of the component
430430
// It's easier to just use a constant here instead of an over-engineering way to find the height
431-
const heightToRemove = hasFormattingButtons ? 45 : 0;
431+
const heightToRemove = hasFormattingButtons ? 36 : 0;
432432
const fixedRect = new DOMRect(
433433
contentRect.x,
434434
contentRect.y + heightToRemove,

0 commit comments

Comments
 (0)