don't show tooltips on big icons
fixes: https://github.com/vector-im/riot-web/issues/12191
This commit is contained in:
parent
ec708b5e9b
commit
9649f2a2da
1 changed files with 3 additions and 1 deletions
|
@ -52,6 +52,8 @@ const legacyRoomTitles = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const E2EIcon = ({isUser, status, className, size, onClick}) => {
|
const E2EIcon = ({isUser, status, className, size, onClick}) => {
|
||||||
|
const sizeThreshold = 25; // the size of an avatar + 1
|
||||||
|
|
||||||
const [hover, setHover] = useState(false);
|
const [hover, setHover] = useState(false);
|
||||||
|
|
||||||
const classes = classNames({
|
const classes = classNames({
|
||||||
|
@ -82,7 +84,7 @@ const E2EIcon = ({isUser, status, className, size, onClick}) => {
|
||||||
const onMouseOut = () => setHover(false);
|
const onMouseOut = () => setHover(false);
|
||||||
|
|
||||||
let tip;
|
let tip;
|
||||||
if (hover) {
|
if (hover && (!size || size <= sizeThreshold)) {
|
||||||
tip = <Tooltip label={e2eTitle ? _t(e2eTitle) : ""} />;
|
tip = <Tooltip label={e2eTitle ? _t(e2eTitle) : ""} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue