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

Introduce new copy icon #8942

Merged
merged 3 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion res/css/components/views/beacon/_ShareLatestLocation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,20 @@ limitations under the License.
color: $secondary-content;
}

.mx_ShareLatestLocation_copy {
// double class to be more specific than the general mx_CopyableText CSS rule
.mx_CopyableText.mx_ShareLatestLocation_copy {
// override copyable text style to make compact
.mx_CopyableText_copyButton {
height: 13px;
margin-left: $spacing-8 !important;
position: relative;
top: -1px;
width: 13px;

&::before {
background-color: $secondary-content;
height: 13px;
width: 13px;
}
}
}
5 changes: 5 additions & 0 deletions res/css/views/context_menus/_MessageContextMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ limitations under the License.
}

.mx_MessageContextMenu_iconCopy::before {
height: 12px;
left: 2px;
mask-image: url($copy-button-url);
position: relative;
width: 12px;
top: 3px;
}

.mx_MessageContextMenu_iconEdit::before {
Expand Down
17 changes: 12 additions & 5 deletions res/css/views/elements/_CopyableText.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.
*/

.mx_CopyableText {
align-items: flex-start;
display: flex;
justify-content: space-between;
width: max-content;
Expand All @@ -31,19 +32,25 @@ limitations under the License.

.mx_CopyableText_copyButton {
flex-shrink: 0;
width: 20px;
height: 20px;
// using em here to adapt to the local font size
width: 1em;
height: 1em;
cursor: pointer;
margin-left: 20px;
display: block;
// center to first line
position: relative;
top: .15em;

&::before {
content: "";

mask-image: url($copy-button-url);
mask-position: center center;
mask-repeat: no-repeat;
mask-size: contain;
background-color: $message-action-bar-fg-color;
width: 20px;
height: 20px;
width: 1em;
height: 1em;
display: block;
background-repeat: no-repeat;
}
Expand Down
14 changes: 10 additions & 4 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,16 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
mask-size: 75%;
}
}

.mx_EventTile_copyButton {
height: 17px;
mask-image: url($copy-button-url);
mask-position: center center;
mask-repeat: no-repeat;
mask-size: contain;
right: 9px;
width: 17px;
}
}
}

Expand All @@ -623,10 +633,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
cursor: pointer;
}

.mx_EventTile_copyButton {
mask-image: url($copy-button-url);
}

.mx_EventTile_collapseButton,
.mx_EventTile_expandButton {
mask-position: center;
Expand Down
3 changes: 3 additions & 0 deletions res/img/element-icons/copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions res/img/feather-customised/clipboard.svg

This file was deleted.

2 changes: 1 addition & 1 deletion res/themes/legacy-light/css/_legacy-light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ $event-highlight-bg-color: $yellow-background;
// event timestamp
$event-timestamp-color: #acacac;

$copy-button-url: "$(res)/img/feather-customised/clipboard.svg";
$copy-button-url: "$(res)/img/element-icons/copy.svg";

// e2e
$e2e-verified-color: #76cfa5; // N.B. *NOT* the same as $accent
Expand Down
2 changes: 1 addition & 1 deletion res/themes/light/css/_light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ $focus-brightness: 105%;

// Icon URLs
// ********************
$copy-button-url: "$(res)/img/feather-customised/clipboard.svg";
$copy-button-url: "$(res)/img/element-icons/copy.svg";
// ********************

// Location sharing
Expand Down