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

Commit c317094

Browse files
authored
Merge branch 'develop' into AccessSecretStorageDialog
2 parents f3b2ff9 + e980c14 commit c317094

File tree

11 files changed

+45
-81
lines changed

11 files changed

+45
-81
lines changed

res/css/_common.scss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,15 +386,22 @@ legend {
386386
color: $alert;
387387
}
388388

389-
.mx_Dialog_cancelButton {
389+
@define-mixin customisedCancelButton {
390390
mask: url('$(res)/img/feather-customised/cancel.svg');
391391
mask-repeat: no-repeat;
392392
mask-position: center;
393393
mask-size: cover;
394-
width: 14px;
395-
height: 14px;
396394
background-color: $dialog-close-fg-color;
397395
cursor: pointer;
396+
position: unset;
397+
width: unset;
398+
height: unset;
399+
}
400+
401+
.mx_Dialog_cancelButton {
402+
@mixin customisedCancelButton;
403+
width: 14px;
404+
height: 14px;
398405
position: absolute;
399406
top: 10px;
400407
right: 0;

res/css/structures/auth/_CompleteSecurity.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,9 @@ limitations under the License.
3434
}
3535

3636
.mx_CompleteSecurity_skip {
37-
mask: url('$(res)/img/feather-customised/cancel.svg');
38-
mask-repeat: no-repeat;
39-
mask-position: center;
40-
mask-size: cover;
37+
@mixin customisedCancelButton;
4138
width: 18px;
4239
height: 18px;
43-
background-color: $dialog-close-fg-color;
44-
cursor: pointer;
4540
position: absolute;
4641
right: 24px;
4742
}

res/css/views/dialogs/_CompoundDialog.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,9 @@ limitations under the License.
3838
}
3939

4040
.mx_CompoundDialog_cancelButton {
41-
mask: url('$(res)/img/feather-customised/cancel.svg');
42-
mask-repeat: no-repeat;
43-
mask-position: center;
44-
mask-size: cover;
41+
@mixin customisedCancelButton;
4542
width: 20px;
4643
height: 20px;
47-
background-color: $dialog-close-fg-color;
48-
cursor: pointer;
4944

5045
// Align with middle of title, 34px from right edge
5146
position: absolute;

res/css/views/elements/_EditableItemList.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ limitations under the License.
2525
}
2626

2727
.mx_EditableItem_delete {
28+
@mixin customisedCancelButton;
2829
order: 3;
2930
margin-right: 5px;
30-
cursor: pointer;
3131
vertical-align: middle;
3232
width: 14px;
3333
height: 14px;
34-
mask-image: url('$(res)/img/feather-customised/cancel.svg');
35-
mask-repeat: no-repeat;
3634
background-color: $alert;
3735
mask-size: 100%;
3836
}

res/css/views/right_panel/_VerificationPanel.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,10 @@ limitations under the License.
2525

2626
.mx_UserInfo {
2727
.mx_EncryptionPanel_cancel {
28-
mask: url('$(res)/img/feather-customised/cancel.svg');
29-
mask-repeat: no-repeat;
30-
mask-position: center;
31-
mask-size: cover;
28+
@mixin customisedCancelButton;
3229
width: 14px;
3330
height: 14px;
3431
background-color: $settings-subsection-fg-color;
35-
cursor: pointer;
3632
position: absolute;
3733
z-index: 100;
3834
top: 14px;

res/css/views/rooms/_MessageComposer.scss

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,6 @@ limitations under the License.
178178
}
179179
}
180180

181-
.mx_ContextualMenu {
182-
.mx_MessageComposer_button {
183-
padding-left: calc(var(--size) + 6px);
184-
}
185-
}
186-
187181
.mx_MessageComposer_button {
188182
--size: 26px;
189183
position: relative;
@@ -192,20 +186,16 @@ limitations under the License.
192186
line-height: var(--size);
193187
width: auto;
194188
padding-left: var(--size);
189+
border-radius: 50%;
190+
margin-right: 6px;
195191

196-
&:not(.mx_CallContextMenu_item) {
197-
border-radius: 50%;
198-
margin-right: 6px;
199-
200-
&:last-child {
201-
margin-right: auto;
202-
}
192+
&:last-child {
193+
margin-right: auto;
203194
}
204195

205196
&::before {
206197
content: '';
207198
position: absolute;
208-
209199
top: 3px;
210200
left: 3px;
211201
height: 20px;
@@ -399,18 +389,3 @@ limitations under the License.
399389
left: 0;
400390
}
401391
}
402-
403-
.mx_MessageComposer_Menu .mx_CallContextMenu_item {
404-
display: flex;
405-
align-items: center;
406-
max-width: unset;
407-
margin: 7px 7px 7px 16px; // space out the buttons
408-
}
409-
410-
.mx_MessageComposer_Menu .mx_ContextualMenu {
411-
min-width: 150px;
412-
width: max-content;
413-
padding: 5px 10px 5px 0;
414-
box-shadow: 0px 2px 9px rgba(0, 0, 0, 0.25);
415-
border-radius: 8px;
416-
}

res/css/views/voip/_DialPadContextMenu.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,10 @@ limitations under the License.
3535
}
3636

3737
.mx_DialPadContextMenu_cancel {
38+
@mixin customisedCancelButton;
3839
float: right;
39-
mask: url('$(res)/img/feather-customised/cancel.svg');
40-
mask-repeat: no-repeat;
41-
mask-position: center;
42-
mask-size: cover;
4340
width: 14px;
4441
height: 14px;
45-
background-color: $dialog-close-fg-color;
46-
cursor: pointer;
4742
}
4843

4944
.mx_DialPadContextMenu_header:focus-within {

res/css/views/voip/_DialPadModal.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,10 @@ limitations under the License.
4545
}
4646

4747
.mx_DialPadModal_cancel {
48+
@mixin customisedCancelButton;
4849
float: right;
49-
mask: url('$(res)/img/feather-customised/cancel.svg');
50-
mask-repeat: no-repeat;
51-
mask-position: center;
52-
mask-size: cover;
5350
width: 14px;
5451
height: 14px;
55-
background-color: $dialog-close-fg-color;
56-
cursor: pointer;
5752
margin-right: 16px;
5853
}
5954

src/components/views/location/LocationButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export const LocationButton: React.FC<IProps> = ({ roomId, sender, menuPosition,
5858

5959
const className = classNames(
6060
"mx_MessageComposer_button",
61-
"mx_MessageComposer_location",
6261
{
6362
"mx_MessageComposer_button_highlight": menuDisplayed,
6463
},
@@ -67,6 +66,7 @@ export const LocationButton: React.FC<IProps> = ({ roomId, sender, menuPosition,
6766
return <React.Fragment>
6867
<CollapsibleButton
6968
className={className}
69+
iconClassName="mx_MessageComposer_location"
7070
onClick={openMenu}
7171
title={_t("Location")}
7272
/>

src/components/views/rooms/CollapsibleButton.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ import classNames from 'classnames';
2020
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
2121
import { MenuItem } from "../../structures/ContextMenu";
2222
import { OverflowMenuContext } from './MessageComposerButtons';
23+
import { IconizedContextMenuOption } from '../context_menus/IconizedContextMenu';
2324

2425
interface ICollapsibleButtonProps extends ComponentProps<typeof MenuItem> {
2526
title: string;
27+
iconClassName: string;
2628
}
2729

28-
export const CollapsibleButton = ({ title, children, className, ...props }: ICollapsibleButtonProps) => {
30+
export const CollapsibleButton = ({ title, children, className, iconClassName, ...props }: ICollapsibleButtonProps) => {
2931
const inOverflowMenu = !!useContext(OverflowMenuContext);
3032
if (inOverflowMenu) {
31-
return <MenuItem
33+
return <IconizedContextMenuOption
3234
{...props}
33-
className={classNames("mx_CallContextMenu_item", className)}
34-
>
35-
{ title }
36-
{ children }
37-
</MenuItem>;
35+
iconClassName={iconClassName}
36+
label={title}
37+
/>;
3838
}
3939

4040
return <AccessibleTooltipButton
4141
{...props}
4242
title={title}
43-
className={className}
43+
className={classNames(className, iconClassName)}
4444
>
4545
{ children }
4646
</AccessibleTooltipButton>;

0 commit comments

Comments
 (0)