summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-10-08 20:53:19 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-10-10 15:19:48 +0200
commitdf8441fe2b03bf177ee49fd47736056f0b563efb (patch)
treef87a8146a07ba81f0e6b18d1215645b0ae870d7b /gui
parent33ae84987208aa026cdc18436fabd9d833db04bf (diff)
downloadmullvadvpn-df8441fe2b03bf177ee49fd47736056f0b563efb.tar.xz
mullvadvpn-df8441fe2b03bf177ee49fd47736056f0b563efb.zip
Translate Img width and height to WebkitMaskSize
Diffstat (limited to 'gui')
-rw-r--r--gui/packages/desktop/src/renderer/components/Img.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/gui/packages/desktop/src/renderer/components/Img.js b/gui/packages/desktop/src/renderer/components/Img.js
index f2835a9751..c39244b9c8 100644
--- a/gui/packages/desktop/src/renderer/components/Img.js
+++ b/gui/packages/desktop/src/renderer/components/Img.js
@@ -29,11 +29,14 @@ export default class Img extends Component<Props, State> {
let image;
if (tintColor) {
+ const maskWidth = typeof width === 'number' ? `${width}px` : 'auto';
+ const maskHeight = typeof height === 'number' ? `${height}px` : 'auto';
image = (
<div
style={{
WebkitMaskImage: `url('${url}')`,
WebkitMaskRepeat: 'no-repeat',
+ WebkitMaskSize: `${maskWidth} ${maskHeight}`,
backgroundColor: tintColor,
lineHeight: 0,
}}>