diff --git a/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-video-toast-checked-linux.png b/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-video-toast-checked-linux.png index d25b9467d08..f3abb3442d3 100644 Binary files a/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-video-toast-checked-linux.png and b/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-video-toast-checked-linux.png differ diff --git a/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-video-toast-unchecked-linux.png b/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-video-toast-unchecked-linux.png index 78a31d1662b..069ef66fe18 100644 Binary files a/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-video-toast-unchecked-linux.png and b/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-video-toast-unchecked-linux.png differ diff --git a/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-voice-toast-linux.png b/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-voice-toast-linux.png index 29cf843d7be..6703827c6d5 100644 Binary files a/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-voice-toast-linux.png and b/playwright/snapshots/voip/element-call.spec.ts/incoming-call-group-voice-toast-linux.png differ diff --git a/res/css/views/dialogs/security/_CreateSecretStorageDialog.pcss b/res/css/views/dialogs/security/_CreateSecretStorageDialog.pcss index 727558d274e..b056e959b86 100644 --- a/res/css/views/dialogs/security/_CreateSecretStorageDialog.pcss +++ b/res/css/views/dialogs/security/_CreateSecretStorageDialog.pcss @@ -48,18 +48,6 @@ Please see LICENSE files in the repository root for full details. margin-bottom: 1em; } -.mx_CreateSecretStorageDialog_titleWithIcon::before { - content: ""; - display: inline-block; - width: 24px; - height: 24px; - margin-right: 8px; - position: relative; - top: 5px; - background-color: $primary-content; - mask-image: url("@vector-im/compound-design-tokens/icons/key-solid.svg"); -} - .mx_CreateSecretStorageDialog_centeredTitle, .mx_CreateSecretStorageDialog_centeredBody { text-align: center; diff --git a/res/css/views/elements/_ImageView.pcss b/res/css/views/elements/_ImageView.pcss index 9e82446ae1d..c0254561576 100644 --- a/res/css/views/elements/_ImageView.pcss +++ b/res/css/views/elements/_ImageView.pcss @@ -7,8 +7,7 @@ Please see LICENSE files in the repository root for full details. */ $button-size: 32px; -$icon-size: 24px; -$button-gap: 24px; +$button-gap: var(--cpd-space-3x); :root { --image-view-panel-height: 68px; @@ -82,6 +81,8 @@ $button-gap: 24px; } .mx_ImageView_toolbar { + --icon-size: 24px; + padding-right: 16px; pointer-events: initial; display: flex; @@ -89,60 +90,30 @@ $button-gap: 24px; flex-grow: 1; flex-basis: 0; justify-content: flex-end; - gap: calc($button-gap - ($button-size - $icon-size)); + gap: $button-gap; } .mx_ImageView_button { - padding: calc(($button-size - $icon-size) / 2); + padding: calc(($button-size - var(--icon-size)) / 2); + width: var(--icon-size); + height: var(--icon-size); display: block; - &::before { - content: ""; - height: $icon-size; - width: $icon-size; - mask-repeat: no-repeat; - mask-size: contain; - mask-position: center; + svg { + height: inherit; + width: inherit; display: block; - background-color: $icon-button-color; + color: $icon-button-color; } } -.mx_ImageView_button_rotateCW::before { - mask-image: url("@vector-im/compound-design-tokens/icons/rotate-right.svg"); -} - -.mx_ImageView_button_rotateCCW::before { - mask-image: url("@vector-im/compound-design-tokens/icons/rotate-left.svg"); -} - -.mx_ImageView_button_zoomOut::before { - mask-image: url("@vector-im/compound-design-tokens/icons/zoom-out.svg"); -} - -.mx_ImageView_button_zoomIn::before { - mask-image: url("@vector-im/compound-design-tokens/icons/zoom-in.svg"); -} - -.mx_ImageView_button_download::before { - mask-image: url("@vector-im/compound-design-tokens/icons/download.svg"); -} - -.mx_ImageView_button_more::before { - mask-image: url("@vector-im/compound-design-tokens/icons/overflow-horizontal.svg"); - mask-size: 28px; +.mx_ImageView_button_more { + --icon-size: 28px; } .mx_ImageView_button_close { - padding: calc($button-size - $button-size); border-radius: 100%; background: #21262c; /* same on all themes */ - &::before { - width: $button-size; - height: $button-size; - mask-image: url("@vector-im/compound-design-tokens/icons/close.svg"); - mask-size: 24px; - } } @media (prefers-reduced-motion) { diff --git a/res/css/views/messages/_CallEvent.pcss b/res/css/views/messages/_CallEvent.pcss index dd260189d8b..1733fd86389 100644 --- a/res/css/views/messages/_CallEvent.pcss +++ b/res/css/views/messages/_CallEvent.pcss @@ -46,13 +46,10 @@ Please see LICENSE files in the repository root for full details. line-height: 24px; /* in px to match the avatar */ } -.mx_CallEvent_inactive .mx_CallEvent_title::before { +.mx_CallEvent_inactive .mx_CallEvent_title svg { display: inline-block; vertical-align: middle; - content: ""; - background-color: $secondary-content; - mask-image: url("@vector-im/compound-design-tokens/icons/video-call-solid.svg"); - mask-size: 16px; + color: $secondary-content; width: 16px; height: 16px; margin-right: $spacing-8; diff --git a/res/css/views/rooms/_LegacyRoomListHeader.pcss b/res/css/views/rooms/_LegacyRoomListHeader.pcss index fd6d7b3b290..ec93c4e746d 100644 --- a/res/css/views/rooms/_LegacyRoomListHeader.pcss +++ b/res/css/views/rooms/_LegacyRoomListHeader.pcss @@ -31,26 +31,17 @@ Please see LICENSE files in the repository root for full details. background-color: $quinary-content; } - &::before { - content: ""; + svg { width: 20px; height: 20px; top: 3px; right: 0; position: absolute; - mask-position: center; - mask-size: contain; - mask-repeat: no-repeat; - background-color: $tertiary-content; - mask-image: url("@vector-im/compound-design-tokens/icons/chevron-down.svg"); + color: $tertiary-content; } &[aria-expanded="true"] { background-color: $quinary-content; - - &::before { - transform: rotate(180deg); - } } } @@ -66,23 +57,18 @@ Please see LICENSE files in the repository root for full details. box-sizing: border-box; flex-shrink: 0; - &::before { - content: ""; + svg { width: 16px; height: 16px; position: absolute; - mask-position: center; - mask-size: contain; - mask-repeat: no-repeat; - background-color: $secondary-content; - mask-image: url("@vector-im/compound-design-tokens/icons/plus.svg"); + color: $secondary-content; } &:hover { background-color: $tertiary-content; - &::before { - background-color: $background; + svg { + color: $background; } } } diff --git a/res/css/views/rooms/_LiveContentSummary.pcss b/res/css/views/rooms/_LiveContentSummary.pcss index 04704c6a1a9..be0c9d14fe5 100644 --- a/res/css/views/rooms/_LiveContentSummary.pcss +++ b/res/css/views/rooms/_LiveContentSummary.pcss @@ -10,41 +10,28 @@ Please see LICENSE files in the repository root for full details. color: $secondary-content; .mx_LiveContentSummary_text { - &::before { + svg { display: inline-block; vertical-align: text-bottom; - content: ""; - background-color: $secondary-content; - mask-size: 16px; + color: $secondary-content; width: 16px; height: 16px; margin-right: 4px; } - &.mx_LiveContentSummary_text_video::before { - mask-image: url("@vector-im/compound-design-tokens/icons/video-call-solid.svg"); - } - - &.mx_LiveContentSummary_text_voice::before { - mask-image: url("@vector-im/compound-design-tokens/icons/voice-call-solid.svg"); - } - &.mx_LiveContentSummary_text_active { color: $accent; - &::before { - background-color: $accent; + svg { + color: $accent; } } } - .mx_LiveContentSummary_participants::before { + .mx_LiveContentSummary_participants svg { display: inline-block; - vertical-align: text-bottom; - content: ""; - background-color: $secondary-content; - mask-image: url("@vector-im/compound-design-tokens/icons/group.svg"); - mask-size: 16px; + vertical-align: middle; + color: $secondary-content; width: 16px; height: 16px; margin-right: 2px; diff --git a/res/css/views/rooms/_RoomCallBanner.pcss b/res/css/views/rooms/_RoomCallBanner.pcss index f4fd14c2fa4..8e49f6c1269 100644 --- a/res/css/views/rooms/_RoomCallBanner.pcss +++ b/res/css/views/rooms/_RoomCallBanner.pcss @@ -31,16 +31,12 @@ Please see LICENSE files in the repository root for full details. font-weight: var(--cpd-font-weight-semibold); padding-right: $spacing-8; - &::before { + svg { display: inline-block; vertical-align: middle; - content: ""; - background-color: $secondary-content; - mask-size: 16px; - mask-position: center; + color: $secondary-content; width: 16px; - height: 1.2em; /* to match line height */ + height: 16px; margin-right: 8px; - mask-image: url("@vector-im/compound-design-tokens/icons/video-call-solid.svg"); } } diff --git a/res/css/views/rooms/_RoomSublist.pcss b/res/css/views/rooms/_RoomSublist.pcss index 3361bce4bbf..b6aa7e8ecd3 100644 --- a/res/css/views/rooms/_RoomSublist.pcss +++ b/res/css/views/rooms/_RoomSublist.pcss @@ -100,23 +100,19 @@ Please see LICENSE files in the repository root for full details. height: 24px; border-radius: 8px; - &::before { - content: ""; + svg { width: 16px; height: 16px; position: absolute; top: 4px; left: 4px; - mask-position: center; - mask-size: contain; - mask-repeat: no-repeat; - background: var(--cpd-color-icon-secondary); + color: var(--cpd-color-icon-secondary); } } - .mx_RoomSublist_auxButton:hover, - .mx_RoomSublist_menuButton:hover { - background: $panel-actions; + .mx_RoomSublist_auxButton:hover svg, + .mx_RoomSublist_menuButton:hover svg { + color: $panel-actions; } /* Hide the menu button by default */ @@ -126,14 +122,6 @@ Please see LICENSE files in the repository root for full details. margin: 0; } - .mx_RoomSublist_auxButton::before { - mask-image: url("@vector-im/compound-design-tokens/icons/plus.svg"); - } - - .mx_RoomSublist_menuButton::before { - mask-image: url("@vector-im/compound-design-tokens/icons/overflow-horizontal.svg"); - } - .mx_RoomSublist_headerText { flex: 1; max-width: calc(100% - 16px); /* 16px is the badge width */ @@ -151,20 +139,11 @@ Please see LICENSE files in the repository root for full details. height: 14px; margin-right: 6px; - &::before { - content: ""; + svg { width: 18px; height: 18px; position: absolute; - mask-position: center; - mask-size: contain; - mask-repeat: no-repeat; - background-color: var(--cpd-color-icon-secondary); - mask-image: url("@vector-im/compound-design-tokens/icons/chevron-down.svg"); - } - - &.mx_RoomSublist_collapseBtn_collapsed::before { - transform: rotate(-90deg); + color: var(--cpd-color-icon-secondary); } } } @@ -320,7 +299,7 @@ Please see LICENSE files in the repository root for full details. background-color: $panel-actions; margin-top: 8px; - &::before { + svg { top: 8px; left: 8px; } @@ -359,7 +338,7 @@ Please see LICENSE files in the repository root for full details. /* to occlude the sublist title */ background-color: $roomlist-bg-color; - &::before { + svg { top: 0; left: 0; } diff --git a/res/css/views/settings/_ImageSizePanel.pcss b/res/css/views/settings/_ImageSizePanel.pcss index 174f5a262ad..9112c5cdfe6 100644 --- a/res/css/views/settings/_ImageSizePanel.pcss +++ b/res/css/views/settings/_ImageSizePanel.pcss @@ -17,20 +17,10 @@ Please see LICENSE files in the repository root for full details. } .mx_ImageSizePanel_size { - background-color: $quinary-content; - mask-repeat: no-repeat; - mask-size: 221px; - mask-position: center; + display: block; + color: $quinary-content; width: 221px; height: 148px; margin-bottom: 14px; /* move radio button away from bottom edge a bit */ - - &.mx_ImageSizePanel_sizeDefault { - mask: url("$(res)/img/element-icons/settings/img-size-normal.svg"); - } - - &.mx_ImageSizePanel_sizeLarge { - mask: url("$(res)/img/element-icons/settings/img-size-large.svg"); - } } } diff --git a/res/css/views/toasts/_IncomingCallToast.pcss b/res/css/views/toasts/_IncomingCallToast.pcss index d13a4eb61af..95359a5fade 100644 --- a/res/css/views/toasts/_IncomingCallToast.pcss +++ b/res/css/views/toasts/_IncomingCallToast.pcss @@ -29,11 +29,6 @@ Please see LICENSE files in the repository root for full details. font-weight: var(--cpd-font-weight-semibold); } - .mx_LiveContentSummary_participants::before { - width: 15px; - height: 15px; - } - .mx_IncomingCallToast_buttons { display: flex; gap: var(--cpd-space-2x); diff --git a/res/css/views/toasts/_NonUrgentEchoFailureToast.pcss b/res/css/views/toasts/_NonUrgentEchoFailureToast.pcss index 9a4afb98abf..af4637750a6 100644 --- a/res/css/views/toasts/_NonUrgentEchoFailureToast.pcss +++ b/res/css/views/toasts/_NonUrgentEchoFailureToast.pcss @@ -7,15 +7,11 @@ Please see LICENSE files in the repository root for full details. */ .mx_NonUrgentEchoFailureToast { - .mx_NonUrgentEchoFailureToast_icon { + svg { display: inline-block; width: $font-18px; height: $font-18px; - mask-position: center; - mask-size: contain; - mask-repeat: no-repeat; - background-color: #fff; /* we know that non-urgent toasts are always styled the same */ - mask-image: url("@vector-im/compound-design-tokens/icons/offline.svg"); + color: #fff; /* we know that non-urgent toasts are always styled the same */ margin-right: 8px; } diff --git a/res/css/views/voip/_LegacyCallViewHeader.pcss b/res/css/views/voip/_LegacyCallViewHeader.pcss index 234ecba41fa..e9d81ce0f3e 100644 --- a/res/css/views/voip/_LegacyCallViewHeader.pcss +++ b/res/css/views/voip/_LegacyCallViewHeader.pcss @@ -46,34 +46,12 @@ Please see LICENSE files in the repository root for full details. vertical-align: middle; cursor: pointer; - &::before { - content: ""; + svg { display: inline-block; height: 20px; width: 20px; vertical-align: middle; - background-color: $secondary-content; - mask-repeat: no-repeat; - mask-size: contain; - mask-position: center; - } - - &.mx_LegacyCallViewHeader_button_fullscreen { - &::before { - mask-image: url("@vector-im/compound-design-tokens/icons/expand.svg"); - } - } - - &.mx_LegacyCallViewHeader_button_pin { - &::before { - mask-image: url("@vector-im/compound-design-tokens/icons/pin-solid.svg"); - } - } - - &.mx_LegacyCallViewHeader_button_expand { - &::before { - mask-image: url("@vector-im/compound-design-tokens/icons/pop-out.svg"); - } + color: $secondary-content; } } @@ -105,17 +83,12 @@ Please see LICENSE files in the repository root for full details. width: 16px; vertical-align: middle; - &::before { - content: ""; + svg { display: inline-block; vertical-align: top; height: 16px; width: 16px; - background-color: $secondary-content; - mask-repeat: no-repeat; - mask-size: contain; - mask-position: center; - mask-image: url("@vector-im/compound-design-tokens/icons/voice-call-solid.svg"); + color: $secondary-content; } } diff --git a/res/img/element-icons/settings/img-size-large.svg b/res/img/element-icons/settings/img-size-large.svg index 749a5c7ecbf..64046e515a2 100644 --- a/res/img/element-icons/settings/img-size-large.svg +++ b/res/img/element-icons/settings/img-size-large.svg @@ -7,9 +7,9 @@ - - - - - + + + + + diff --git a/res/img/element-icons/settings/img-size-normal.svg b/res/img/element-icons/settings/img-size-normal.svg index 96d8fd3fb4f..3c741169206 100644 --- a/res/img/element-icons/settings/img-size-normal.svg +++ b/res/img/element-icons/settings/img-size-normal.svg @@ -7,14 +7,14 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx b/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx index 9abb4d147dd..dc7d77dbe65 100644 --- a/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx +++ b/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx @@ -692,13 +692,6 @@ export default class CreateSecretStorageDialog extends React.PureComponent = ({ roomId, call }) => return (
- {_t("voip|video_call")} + + + {_t("voip|video_call")} +
diff --git a/src/components/views/elements/ImageView.tsx b/src/components/views/elements/ImageView.tsx index e88a1c066ea..ac13f04bc3c 100644 --- a/src/components/views/elements/ImageView.tsx +++ b/src/components/views/elements/ImageView.tsx @@ -11,6 +11,15 @@ Please see LICENSE files in the repository root for full details. import React, { type JSX, createRef, type CSSProperties, useEffect } from "react"; import FocusLock from "react-focus-lock"; import { type MatrixEvent } from "matrix-js-sdk/src/matrix"; +import { + CloseIcon, + DownloadIcon, + OverflowHorizontalIcon, + RotateLeftIcon, + RotateRightIcon, + ZoomInIcon, + ZoomOutIcon, +} from "@vector-im/compound-design-tokens/assets/web/icons"; import { _t } from "../../../languageHandler"; import MemberAvatar from "../avatars/MemberAvatar"; @@ -501,25 +510,12 @@ export default class ImageView extends React.Component { onClick={this.onOpenContextMenu} ref={this.contextMenuButton} isExpanded={this.state.contextMenuDisplayed} - /> + > + + ); } - const zoomOutButton = ( - - ); - const zoomInButton = ( - - ); - let title: JSX.Element | undefined; if (this.props.mxEvent?.getContent()) { title = ( @@ -544,18 +540,34 @@ export default class ImageView extends React.Component { {info} {title}
- {zoomOutButton} - {zoomInButton} + + + + + + + > + + + > + + { className="mx_ImageView_button mx_ImageView_button_close" title={_t("action|close")} onClick={this.props.onFinished} - /> + > + + {this.renderContextMenu()}
@@ -612,10 +626,12 @@ export const DownloadButton: React.FC = ({ url, fileName, m return ( + > + + ); }; diff --git a/src/components/views/messages/CallEvent.tsx b/src/components/views/messages/CallEvent.tsx index 2bdd0a82452..b7eb0be699f 100644 --- a/src/components/views/messages/CallEvent.tsx +++ b/src/components/views/messages/CallEvent.tsx @@ -7,6 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React, { type Ref, useCallback, useContext, useMemo, type JSX } from "react"; +import { VideoCallSolidIcon } from "@vector-im/compound-design-tokens/assets/web/icons"; import type { MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix"; import { ConnectionState, type ElementCall } from "../../../models/Call"; @@ -166,7 +167,10 @@ export const CallEvent = ({ mxEvent, ref }: CallEventProps): JSX.Element => {
- {_t("timeline|m.call|video_call_ended")} + + + {_t("timeline|m.call|video_call_ended")} +
diff --git a/src/components/views/rooms/LegacyRoomList.tsx b/src/components/views/rooms/LegacyRoomList.tsx index aa5b1b2398b..0876d6ae990 100644 --- a/src/components/views/rooms/LegacyRoomList.tsx +++ b/src/components/views/rooms/LegacyRoomList.tsx @@ -192,7 +192,9 @@ const DmAuxButton: React.FC = ({ tabIndex, dispatcher = default title={_t("action|add_people")} isExpanded={menuDisplayed} ref={handle} - /> + > + + {contextMenu} @@ -208,7 +210,9 @@ const DmAuxButton: React.FC = ({ tabIndex, dispatcher = default className="mx_RoomSublist_auxButton" aria-label={_t("action|start_chat")} title={_t("action|start_chat")} - /> + > + + ); } @@ -375,7 +379,9 @@ const UntaggedAuxButton: React.FC = ({ tabIndex }) => { title={_t("room_list|add_room_label")} isExpanded={menuDisplayed} ref={handle} - /> + > + + {contextMenu} diff --git a/src/components/views/rooms/LegacyRoomListHeader.tsx b/src/components/views/rooms/LegacyRoomListHeader.tsx index 57093144b19..bf389c4b0c0 100644 --- a/src/components/views/rooms/LegacyRoomListHeader.tsx +++ b/src/components/views/rooms/LegacyRoomListHeader.tsx @@ -15,6 +15,8 @@ import { SearchIcon, UserAddIcon, VideoCallSolidIcon, + ChevronDownIcon, + ChevronUpIcon, } from "@vector-im/compound-design-tokens/assets/web/icons"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; @@ -131,7 +133,7 @@ const LegacyRoomListHeader: React.FC = ({ onVisibilityChange }) => { const elementCallVideoRoomsEnabled = useFeatureEnabled("feature_element_call_video_rooms"); const pendingActions = usePendingActions(); - const canShowMainMenu = activeSpace || spaceKey === MetaSpace.Home; + const canShowMainMenu = !!activeSpace || spaceKey === MetaSpace.Home; useEffect(() => { if (mainMenuDisplayed && !canShowMainMenu) { @@ -392,7 +394,11 @@ const LegacyRoomListHeader: React.FC = ({ onVisibilityChange }) => { onClick: openMainMenu, isExpanded: mainMenuDisplayed, className: "mx_LegacyRoomListHeader_contextMenuButton", - children: title, + children: ( + <> + {title} {mainMenuDisplayed ? : } + + ), }; if (!!activeSpace) { @@ -422,7 +428,9 @@ const LegacyRoomListHeader: React.FC = ({ onVisibilityChange }) => { isExpanded={plusMenuDisplayed} className="mx_LegacyRoomListHeader_plusButton" title={_t("action|add")} - /> + > + + )} {contextMenu} diff --git a/src/components/views/rooms/LiveContentSummary.tsx b/src/components/views/rooms/LiveContentSummary.tsx index ada3209f076..1e283d9cd32 100644 --- a/src/components/views/rooms/LiveContentSummary.tsx +++ b/src/components/views/rooms/LiveContentSummary.tsx @@ -8,6 +8,7 @@ Please see LICENSE files in the repository root for full details. import React, { type FC } from "react"; import classNames from "classnames"; +import { GroupIcon, VideoCallSolidIcon, VoiceCallSolidIcon } from "@vector-im/compound-design-tokens/assets/web/icons"; import { _t } from "../../../languageHandler"; @@ -30,11 +31,10 @@ export const LiveContentSummary: FC = ({ type, text, active, participantC + {type === LiveContentType.Video ? : } {text} {participantCount > 0 && ( @@ -44,6 +44,7 @@ export const LiveContentSummary: FC = ({ type, text, active, participantC className="mx_LiveContentSummary_participants" aria-label={_t("voip|n_people_joined", { count: participantCount })} > + {participantCount} diff --git a/src/components/views/rooms/RoomSublist.tsx b/src/components/views/rooms/RoomSublist.tsx index e5fd061b190..53c2f6782d9 100644 --- a/src/components/views/rooms/RoomSublist.tsx +++ b/src/components/views/rooms/RoomSublist.tsx @@ -13,6 +13,11 @@ import classNames from "classnames"; import { type Enable, Resizable } from "re-resizable"; import { type Direction } from "re-resizable/lib/resizer"; import React, { type JSX, type ComponentType, createRef, type ReactComponentElement, type ReactNode } from "react"; +import { + ChevronDownIcon, + ChevronRightIcon, + OverflowHorizontalIcon, +} from "@vector-im/compound-design-tokens/assets/web/icons"; import { polyfillTouchEvent } from "../../../@types/polyfill"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; @@ -608,7 +613,9 @@ export default class RoomSublist extends React.Component { onClick={this.onOpenMenuClick} title={_t("room_list|sublist_options")} isExpanded={!!this.state.contextMenuPosition} - /> + > + + {contextMenu} ); @@ -642,11 +649,7 @@ export default class RoomSublist extends React.Component { addRoomButton = ; } - const collapseClasses = classNames({ - mx_RoomSublist_collapseBtn: true, - mx_RoomSublist_collapseBtn_collapsed: !this.state.isExpanded && !this.props.forceExpanded, - }); - + const collapsed = !this.state.isExpanded && !this.props.forceExpanded; const classes = classNames({ mx_RoomSublist_headerContainer: true, mx_RoomSublist_headerContainer_withAux: !!addRoomButton, @@ -682,7 +685,9 @@ export default class RoomSublist extends React.Component { onContextMenu={this.onContextMenu} title={this.props.isMinimized ? this.props.label : undefined} > - + + {collapsed ? : } + {this.props.label} {this.renderMenu()} diff --git a/src/components/views/settings/ImageSizePanel.tsx b/src/components/views/settings/ImageSizePanel.tsx index fea7ec362e1..1b4e5e711fc 100644 --- a/src/components/views/settings/ImageSizePanel.tsx +++ b/src/components/views/settings/ImageSizePanel.tsx @@ -15,6 +15,8 @@ import { _t } from "../../../languageHandler"; import { SettingLevel } from "../../../settings/SettingLevel"; import { ImageSize } from "../../../settings/enums/ImageSize"; import { SettingsSubsection } from "./shared/SettingsSubsection"; +import { Icon as ImgSizeNormalIcon } from "../../../../res/img/element-icons/settings/img-size-normal.svg"; +import { Icon as ImgSizeLargeIcon } from "../../../../res/img/element-icons/settings/img-size-large.svg"; interface IState { size: ImageSize; @@ -42,7 +44,7 @@ export default class ImageSizePanel extends React.Component