Skip to content

Commit

Permalink
Fix Asset tooltip scrollbars on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaglumac committed Mar 12, 2021
1 parent f88cef4 commit 0d45d30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 3 additions & 8 deletions source/renderer/app/components/widgets/AssetToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,7 @@ export default class AssetToken extends Component<Props, State> {
);
}

assetItemRenderer = (
assetId: string,
assetItem: string,
value: string,
singleline?: boolean
) => {
assetItemRenderer = (assetId: string, assetItem: string, value: string) => {
const { itemCopied } = this.state;
const icon = itemCopied === assetId ? copyCheckmarkIcon : copyIcon;
const iconClassnames = classnames([
Expand All @@ -177,10 +172,10 @@ export default class AssetToken extends Component<Props, State> {
return (
<CopyToClipboard text={value} onCopy={onCopy}>
<div className={styles.assetItem}>
<em className={singleline ? styles.singleline : null}>
<div className={styles.value}>
{value}
<SVGInline svg={icon} className={iconClassnames} />
</em>
</div>
{assetId === 'assetName' && (
<div className={styles.assetASCIIName}>
(ASCII: {hexToString(value)})
Expand Down
4 changes: 2 additions & 2 deletions source/renderer/app/components/widgets/AssetToken.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
line-height: 16px;
margin: 10px -20px 0 10px;
max-height: 48px;
overflow-x: auto;
overflow-y: auto;
padding-right: 20px;
position: relative;
width: calc(100% - 77px);
Expand All @@ -119,7 +119,7 @@
opacity: 0.4;
}

em {
.value {
cursor: pointer;

&:not(.singleline) {
Expand Down

0 comments on commit 0d45d30

Please sign in to comment.