From 42aef661e6f3cf5416591c28767a3852ca69cb01 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 24 Oct 2017 06:46:42 -0700 Subject: [PATCH] Move skin ; -}; + + render() { + const { skinImages, skinCursors } = this.props; + if (!skinImages) { + return null; + } + const cssRules = []; + Object.keys(imageSelectors).map(imageName => { + const imageUrl = skinImages[imageName]; + if (imageUrl) { + imageSelectors[imageName].forEach(selector => { + cssRules.push( + `#winamp2-js ${selector} {background-image: url(${imageUrl})}` + ); + }); + } + }); + Object.keys(cursorSelectors).map(cursorName => { + const cursorUrl = skinCursors[cursorName]; + if (cursorUrl) { + cursorSelectors[cursorName].forEach(selector => { + cssRules.push( + `#winamp2-js ${selector} {cursor: url(${cursorUrl}), auto}` + ); + }); + } + }); + + if (numExIsUsed(skinImages)) { + // This alternate number file requires that the minus sign be + // formatted differently. + cssRules.push( + "#winamp2-js .status #time #minus-sign { top: 0px; left: -1px; width: 9px; height: 13px; }" + ); + } + return createPortal(cssRules.join("\n"), this.style); + } +} export default connect(state => ({ skinImages: state.display.skinImages,