diff --git a/css/equalizer-window.css b/css/equalizer-window.css index 1f95f44b..e27dda3a 100644 --- a/css/equalizer-window.css +++ b/css/equalizer-window.css @@ -15,29 +15,24 @@ height: 6px; width: 97px; background-position: 0 0; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-volume::-webkit-slider-thumb { height: 7px; width: 2px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-volume::-moz-range-thumb { height: 7px; width: 2px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-volume.center::-webkit-slider-thumb { width: 5px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-volume.center::-moz-range-thumb { width: 5px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-balance { @@ -47,29 +42,24 @@ height: 6px; width: 43px; background-position: 0 0; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-balance::-webkit-slider-thumb { height: 7px; width: 2px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-balance::-moz-range-thumb { height: 7px; width: 2px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-balance.center::-webkit-slider-thumb { width: 5px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-balance.center::-moz-range-thumb { width: 5px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js .equalizer-top { @@ -84,7 +74,6 @@ width: 9px; left: 264px; top: 3px; - cursor: url("../cursors/MAINMENU.PNG"), auto; } #winamp2-js #equalizer-shade { @@ -93,7 +82,6 @@ width: 9px; left: 254px; top: 3px; - cursor: url("../cursors/MAINMENU.PNG"), auto; } #winamp2-js #on { @@ -232,7 +220,6 @@ height: 51px; width: 14px; margin-top: 6px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js .band .rc-slider .rc-slider-handle { @@ -240,5 +227,4 @@ height: 11px; margin: -6px 0 0 1px; position: absolute; - cursor: url("../cursors/POSBAR.PNG"), auto; } diff --git a/css/main-window.css b/css/main-window.css index a05775db..e0efb8f6 100755 --- a/css/main-window.css +++ b/css/main-window.css @@ -3,7 +3,6 @@ position: absolute; height: 116px; width: 275px; - cursor: url("../cursors/MAINMENU.PNG"), auto; /* Ask the browser to scale showing large pixels if possible */ image-rendering: -moz-crisp-edges; /* Firefox */ image-rendering: -o-crisp-edges; /* Opera */ @@ -76,7 +75,6 @@ left: 0; height: 14px; width: 275px; - cursor: url("../cursors/TITLEBAR.PNG"), auto; } #winamp2-js #option-context, @@ -87,7 +85,6 @@ height: 9px; width: 9px; top: 3px; - cursor: url("../cursors/MAINMENU.PNG"), auto; } #winamp2-js #title-bar #option { @@ -106,7 +103,6 @@ } #winamp2-js #title-bar #close { left: 264px; - cursor: url("../cursors/CLOSE.PNG"), auto; } #winamp2-js #clutter-bar { position: absolute; @@ -289,19 +285,16 @@ height: 13px; width: 68px; background-position: 0 0; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #volume::-webkit-slider-thumb { top: 1px; height: 11px; width: 14px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #volume::-moz-range-thumb { top: 1px; height: 11px; width: 14px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #balance { @@ -311,20 +304,17 @@ height: 13px; width: 38px; background-position: 0 0; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #balance::-webkit-slider-thumb { top: 1px; height: 11px; width: 14px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #balance::-moz-range-thumb { top: 1px; height: 11px; width: 14px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js .windows { @@ -355,13 +345,11 @@ top: 72px; width: 248px; height: 10px; - cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #position::-webkit-slider-thumb { height: 10px; width: 29px; - cursor: url("../cursors/POSBAR.PNG"), auto; /* * Fix the strange bug in Safair/mobile-chrome * http://stackoverflow.com/questions/26727769/rendering-glitch-when-manipulating-range-input-value-via-javascript-in-webkit @@ -373,7 +361,6 @@ #winamp2-js #position::-moz-range-thumb { height: 10px; width: 29px; - cursor: url("../cursors/POSBAR.PNG"), auto; } /* For some reason, we can't use display: none here */ @@ -479,7 +466,6 @@ display: none; } #winamp2-js .shade #title-bar { - cursor: url("../cursors/MAINMENU.PNG"), auto; } #winamp2-js .shade .actions div { diff --git a/css/mini-time.css b/css/mini-time.css index c3429b38..9ef5bf7d 100644 --- a/css/mini-time.css +++ b/css/mini-time.css @@ -1,5 +1,4 @@ #winamp2-js .mini-time { - cursor: url("../cursors/MAINMENU.PNG"), auto; display: block; height: 6px; width: 25px; diff --git a/css/winamp.css b/css/winamp.css index 5fc9c0e7..0cfdf8ce 100644 --- a/css/winamp.css +++ b/css/winamp.css @@ -76,7 +76,6 @@ canvas { #winamp2-js .window { position: absolute; - cursor: url("../cursors/MAINMENU.PNG"), auto; /* Ask the browser to scale showing large pixels if possible */ image-rendering: -moz-crisp-edges; /* Firefox */ image-rendering: -o-crisp-edges; /* Opera */ diff --git a/cursors/CLOSE.PNG b/cursors/CLOSE.PNG deleted file mode 100644 index cbb7650a..00000000 Binary files a/cursors/CLOSE.PNG and /dev/null differ diff --git a/cursors/MAINMENU.PNG b/cursors/MAINMENU.PNG deleted file mode 100644 index 20661385..00000000 Binary files a/cursors/MAINMENU.PNG and /dev/null differ diff --git a/cursors/POSBAR.PNG b/cursors/POSBAR.PNG deleted file mode 100644 index c47e8128..00000000 Binary files a/cursors/POSBAR.PNG and /dev/null differ diff --git a/cursors/TITLEBAR.PNG b/cursors/TITLEBAR.PNG deleted file mode 100644 index 1ec16c01..00000000 Binary files a/cursors/TITLEBAR.PNG and /dev/null differ diff --git a/js/components/Skin.js b/js/components/Skin.js index 19421cb4..f3e82dff 100644 --- a/js/components/Skin.js +++ b/js/components/Skin.js @@ -243,7 +243,18 @@ const imageSelectors = { }; const cursorSelectors = { - PSIZE: ["#playlist-resize-target"] + PSIZE: ["#playlist-resize-target"], + CLOSE: ["#title-bar #close"], + MAINMENU: ["#main-window", "#main-window.shade #title-bar"], + TITLEBAR: ["#main-window #title-bar"], + POSBAR: ["#position"], + VOLBAL: ["#volume", "#balance"], + EQSLID: ["#equalizer-window .band"], + EQTITLE: [ + "#equalizer-window .title-bar", + "#equalizer-window.shade", + "#equalizer-window.shade input" + ] }; Object.keys(FONT_LOOKUP).forEach(character => { @@ -270,11 +281,11 @@ const Skin = props => { } }); Object.keys(cursorSelectors).map(cursorName => { - const imageUrl = props.skinCursors[cursorName]; - if (imageUrl) { + const cursorUrl = props.skinCursors[cursorName]; + if (cursorUrl) { cursorSelectors[cursorName].forEach(selector => { cssRules.push( - `#winamp2-js ${selector} {cursor: url(${imageUrl}), auto}` + `#winamp2-js ${selector} {cursor: url(${cursorUrl}), auto}` ); }); } diff --git a/js/reducers.js b/js/reducers.js index 63a2aea3..cc332456 100644 --- a/js/reducers.js +++ b/js/reducers.js @@ -151,7 +151,6 @@ const display = (state = defaultDisplayState, action) => { case CLOSE_WINAMP: return { ...state, closed: true }; case SET_SKIN_DATA: - console.log(action); return { ...state, loading: false, diff --git a/js/skinParser.js b/js/skinParser.js index 24ba8788..ffeb56f0 100644 --- a/js/skinParser.js +++ b/js/skinParser.js @@ -86,7 +86,7 @@ async function genSpriteUrisFromFilename(zip, fileName) { async function getCursorFromFilename(zip, fileName) { const base64 = await genFileFromZip(zip, fileName, "CUR", "base64"); - return `data:image/x-win-bitmap;base64,${base64}`; + return base64 && `data:image/x-win-bitmap;base64,${base64}`; } const defaultVisColors = [ diff --git a/skins/base-2.91.wsz b/skins/base-2.91.wsz index 10043bb1..d1e0a67f 100644 Binary files a/skins/base-2.91.wsz and b/skins/base-2.91.wsz differ diff --git a/skins/base-2.91/CLOSE.CUR b/skins/base-2.91/CLOSE.CUR new file mode 100644 index 00000000..5405ec01 Binary files /dev/null and b/skins/base-2.91/CLOSE.CUR differ diff --git a/skins/base-2.91/EQSLID.CUR b/skins/base-2.91/EQSLID.CUR new file mode 100644 index 00000000..e1c64ef9 Binary files /dev/null and b/skins/base-2.91/EQSLID.CUR differ diff --git a/skins/base-2.91/EQTITLE.CUR b/skins/base-2.91/EQTITLE.CUR new file mode 100644 index 00000000..8b73d0ed Binary files /dev/null and b/skins/base-2.91/EQTITLE.CUR differ diff --git a/skins/base-2.91/MAINMENU.CUR b/skins/base-2.91/MAINMENU.CUR new file mode 100644 index 00000000..926f057d Binary files /dev/null and b/skins/base-2.91/MAINMENU.CUR differ diff --git a/skins/base-2.91/POSBAR.CUR b/skins/base-2.91/POSBAR.CUR new file mode 100644 index 00000000..07a7161f Binary files /dev/null and b/skins/base-2.91/POSBAR.CUR differ diff --git a/skins/base-2.91/PSIZE.CUR b/skins/base-2.91/PSIZE.CUR new file mode 100644 index 00000000..107a4636 Binary files /dev/null and b/skins/base-2.91/PSIZE.CUR differ diff --git a/skins/base-2.91/TITLEBAR.CUR b/skins/base-2.91/TITLEBAR.CUR new file mode 100644 index 00000000..8b73d0ed Binary files /dev/null and b/skins/base-2.91/TITLEBAR.CUR differ diff --git a/skins/base-2.91/VOLBAL.CUR b/skins/base-2.91/VOLBAL.CUR new file mode 100644 index 00000000..07a7161f Binary files /dev/null and b/skins/base-2.91/VOLBAL.CUR differ