mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-24 09:04:00 -05:00
Fix position of “expand” icon in media modal on glitch-soc (#1838)
This commit is contained in:
parent
0fece174f6
commit
156c6ea36c
@ -84,15 +84,21 @@ export default class IconButton extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
|
// Hack required for some icons which have an overriden size
|
||||||
|
let containerSize = '1.28571429em';
|
||||||
|
if (this.props.style?.fontSize) {
|
||||||
|
containerSize = `${this.props.size * 1.28571429}px`;
|
||||||
|
}
|
||||||
|
|
||||||
let style = {
|
let style = {
|
||||||
fontSize: `${this.props.size}px`,
|
fontSize: `${this.props.size}px`,
|
||||||
height: '1.28571429em',
|
height: containerSize,
|
||||||
lineHeight: `${this.props.size}px`,
|
lineHeight: `${this.props.size}px`,
|
||||||
...this.props.style,
|
...this.props.style,
|
||||||
...(this.props.active ? this.props.activeStyle : {}),
|
...(this.props.active ? this.props.activeStyle : {}),
|
||||||
};
|
};
|
||||||
if (!this.props.label) {
|
if (!this.props.label) {
|
||||||
style.width = '1.28571429em';
|
style.width = containerSize;
|
||||||
} else {
|
} else {
|
||||||
style.textAlign = 'left';
|
style.textAlign = 'left';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user