]> git.sesse.net Git - vlc/commitdiff
luahttp: sprite buttons
authorFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 9 Sep 2011 11:37:47 +0000 (13:37 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 9 Sep 2011 11:41:56 +0000 (13:41 +0200)
Make them share a common palette and save 41K (78%)

20 files changed:
share/Makefile.am
share/lua/http/css/main.css
share/lua/http/images/button-equalizer-48.png [deleted file]
share/lua/http/images/button_eject-48.png [deleted file]
share/lua/http/images/button_ffw-48.png [deleted file]
share/lua/http/images/button_first-48.png [deleted file]
share/lua/http/images/button_full-48.png [deleted file]
share/lua/http/images/button_help-48.png [deleted file]
share/lua/http/images/button_last-48.png [deleted file]
share/lua/http/images/button_pause-48.png [deleted file]
share/lua/http/images/button_play-48.png [deleted file]
share/lua/http/images/button_rec-48.png [deleted file]
share/lua/http/images/button_repeat-48.png [deleted file]
share/lua/http/images/button_rew-48.png [deleted file]
share/lua/http/images/button_stop-48.png [deleted file]
share/lua/http/images/button_stream-48.png [deleted file]
share/lua/http/images/buttons.png [new file with mode: 0644]
share/lua/http/index.html
share/lua/http/js/controlers.js
share/lua/http/mobile.html

index 9886b5f53d2fa2b89ff41fcd7fd27e98bb3ada6c..dc28a9e7a595f8fd21f9369c7485a9343ec72dbd 100644 (file)
@@ -266,7 +266,7 @@ DIST_http_lua = \
        lua/http/flash.html \
        lua/http/vlm.html \
        lua/http/images/loop.png \
-       lua/http/images/button_pause-48.png \
+       lua/http/images/buttons.png \
        lua/http/images/speaker-32.png \
        lua/http/images/fullscreen.png \
        lua/http/images/vlc-48.png \
@@ -285,17 +285,10 @@ DIST_http_lua = \
        lua/http/images/info.png \
        lua/http/images/refresh.png \
        lua/http/images/sout.png \
-       lua/http/images/button_stop-48.png \
-       lua/http/images/button_help-48.png \
-       lua/http/images/button-equalizer-48.png \
-       lua/http/images/button_ffw-48.png \
        lua/http/images/sort.png \
-       lua/http/images/button_play-48.png \
        lua/http/images/white_cross_small.png \
-       lua/http/images/button_full-48.png \
        lua/http/images/shuffle.png \
        lua/http/images/Other-48.png \
-       lua/http/images/button_repeat-48.png \
        lua/http/images/repeat.png \
        lua/http/images/slow.png \
        lua/http/images/slider_left.png \
@@ -303,20 +296,14 @@ DIST_http_lua = \
        lua/http/images/stop.png \
        lua/http/images/sd.png \
        lua/http/images/speaker.png \
-       lua/http/images/button_first-48.png \
-       lua/http/images/button_stream-48.png \
-       lua/http/images/button_rew-48.png \
-       lua/http/images/button_rec-48.png \
        lua/http/images/delete.png \
        lua/http/images/Back-48.png \
-       lua/http/images/button_eject-48.png \
        lua/http/images/Video-48.png \
        lua/http/images/playlist_small.png \
        lua/http/images/eject.png \
        lua/http/images/playlist.png \
        lua/http/images/volume_up.png \
        lua/http/images/next.png \
-       lua/http/images/button_last-48.png \
        lua/http/images/volume_down.png \
        lua/http/images/slider_bar.png \
        lua/http/images/vlc16x16.png \
index b89c46f704b0f63c23874a120e248d01112bc465..fa72e0ff4a69c9c1838d0b2bb1d75f5c3eac1242 100644 (file)
@@ -85,37 +85,39 @@ body{
        border: none;
        display: inline-block;
        cursor: pointer;
+       background-image: url("../images/buttons.png");
+       background-repeat: no-repeat;
 }
 .button{
        cursor: pointer;
        display: inline-block;
 }
 #buttonOpen{
-       background-image: url("../images/button_eject-48.png");
+       background-position: 0px 0px;
 }
 #buttonStop{
-       background-image: url("../images/button_stop-48.png");
+       background-position: -576px 0px;
 }
-#buttonPlay{
-       background-image: url("../images/button_play-48.png") ;
+.playing {
+       background-position: -336px 0px;
 }
-#buttonPause{
-       background-image: url("../images/button_pause-48.png") ;
+.paused {
+       background-position: -384px 0px;
 }
 #buttonPrev{
-       background-image: url("../images/button_first-48.png") ;
+       background-position: -144px 0px;
 }
 #buttonNext{
-       background-image: url("../images/button_last-48.png") ;
+       background-position: -288px 0px;
 }
 #buttonFull{
-       background-image: url("../images/button_full-48.png") ;
+       background-position: -192px 0px;
 }
 #buttonSout{
-       background-image: url("../images/button_stream-48.png") ;
+       background-position: -624px 0px;
 }
 #buttonEQ{
-       background-image: url("../images/button-equalizer-48.png") ;
+       background-position: -48px 0px;
 }
 #window_browse ol{
        list-style-type: none;
diff --git a/share/lua/http/images/button-equalizer-48.png b/share/lua/http/images/button-equalizer-48.png
deleted file mode 100644 (file)
index 1574cd6..0000000
Binary files a/share/lua/http/images/button-equalizer-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_eject-48.png b/share/lua/http/images/button_eject-48.png
deleted file mode 100644 (file)
index 32391f4..0000000
Binary files a/share/lua/http/images/button_eject-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_ffw-48.png b/share/lua/http/images/button_ffw-48.png
deleted file mode 100644 (file)
index 52b7081..0000000
Binary files a/share/lua/http/images/button_ffw-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_first-48.png b/share/lua/http/images/button_first-48.png
deleted file mode 100644 (file)
index 8b4e0f5..0000000
Binary files a/share/lua/http/images/button_first-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_full-48.png b/share/lua/http/images/button_full-48.png
deleted file mode 100644 (file)
index fcd2483..0000000
Binary files a/share/lua/http/images/button_full-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_help-48.png b/share/lua/http/images/button_help-48.png
deleted file mode 100644 (file)
index 1cef07c..0000000
Binary files a/share/lua/http/images/button_help-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_last-48.png b/share/lua/http/images/button_last-48.png
deleted file mode 100644 (file)
index d7d367d..0000000
Binary files a/share/lua/http/images/button_last-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_pause-48.png b/share/lua/http/images/button_pause-48.png
deleted file mode 100644 (file)
index beccbca..0000000
Binary files a/share/lua/http/images/button_pause-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_play-48.png b/share/lua/http/images/button_play-48.png
deleted file mode 100644 (file)
index e6fec04..0000000
Binary files a/share/lua/http/images/button_play-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_rec-48.png b/share/lua/http/images/button_rec-48.png
deleted file mode 100644 (file)
index c104120..0000000
Binary files a/share/lua/http/images/button_rec-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_repeat-48.png b/share/lua/http/images/button_repeat-48.png
deleted file mode 100644 (file)
index a1a8ecf..0000000
Binary files a/share/lua/http/images/button_repeat-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_rew-48.png b/share/lua/http/images/button_rew-48.png
deleted file mode 100644 (file)
index 2bb63f6..0000000
Binary files a/share/lua/http/images/button_rew-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_stop-48.png b/share/lua/http/images/button_stop-48.png
deleted file mode 100644 (file)
index 987cc1a..0000000
Binary files a/share/lua/http/images/button_stop-48.png and /dev/null differ
diff --git a/share/lua/http/images/button_stream-48.png b/share/lua/http/images/button_stream-48.png
deleted file mode 100644 (file)
index 8c3dc5b..0000000
Binary files a/share/lua/http/images/button_stream-48.png and /dev/null differ
diff --git a/share/lua/http/images/buttons.png b/share/lua/http/images/buttons.png
new file mode 100644 (file)
index 0000000..7dee3a5
Binary files /dev/null and b/share/lua/http/images/buttons.png differ
index 8b4d273045ad2b9da24f528a4ac869e984ae26f4..0da414a7b62d5459f6a20a521bdffa756adfca59 100644 (file)
                                        <tr>
                                                <td id="controlButtons">
                                                        <div id="buttonPrev" class="button48  ui-corner-all" title="Previous"></div>
-                                                       <div id="buttonPlay" class="button48  ui-corner-all" title="Play"></div>
+                                                       <div id="buttonPlay" class="button48  ui-corner-all paused" title="Play"></div>
                                                        <div id="buttonNext" class="button48  ui-corner-all" title="Next"></div>
                                                        <div id="buttonOpen" class="button48  ui-corner-all" title="Open Media"></div>
                                                        <div id="buttonStop" class="button48  ui-corner-all" title="Stop"></div>
index 6a7dd78ac855dcdbbbfbe44455b96e82e5821ab5..bc969b7617ac36095f7254da3a12b4f6428d2938 100644 (file)
@@ -23,13 +23,11 @@ function updateStatus(){
                                $('#buttonPlay').attr('state',$('state',data).text());
                                $('#buttonPlay').attr('mrl',$('[name="filename"]',data).text());
                                if($('state',data).text()=='playing'){
-                                       $('#buttonPlay').css({
-                                               'background-image':'url("images/button_pause-48.png")'
-                                       });
+                                       $('#buttonPlay').removeClass('paused');
+                                       $('#buttonPlay').addClass('playing');
                                }else{
-                                       $('#buttonPlay').css({
-                                               'background-image':'url("images/button_play-48.png")'
-                                       });
+                                       $('#buttonPlay').removeClass('playing');
+                                       $('#buttonPlay').addClass('paused');
                                }
                                if($('random',data).text()=='true'){
                                        $('#buttonShuffle').removeClass('ui-state-default');
@@ -313,13 +311,11 @@ function updateStreams(){
                                $('#seekSlider').attr('totalLength',$('[name="Current"] instance',data).attr('length')/1000000);
                                $('#buttonPlay').attr('state',$('[name="Current"] instance',data).length>0 ? $('[name="Current"] instance',data).attr('state') : 'stopped');
                                if($('[name="Current"] instance',data).attr('state')=='playing'){
-                                       $('#buttonPlay').css({
-                                               'background-image':'url("images/button_pause-48.png'
-                                       });
+                                       $('#buttonPlay').removeClass('paused');
+                                       $('#buttonPlay').addClass('playing');
                                }else{
-                                       $('#buttonPlay').css({
-                                               'background-image':'url("images/button_play-48.png'
-                                       });
+                                       $('#buttonPlay').removeClass('playing');
+                                       $('#buttonPlay').addClass('paused');
                                }
                                setTimeout( updateStreams, 1000 );
                        }
index 885c85c4f5ac8f004220bba9335c0de27ddbe052..d70a4affd40828bc18bec47ddc3a60f1a00f251e 100644 (file)
@@ -95,7 +95,7 @@
                                        <td id="controlButtons" colspan="2" valign="bottom" height="108px;" class="ui-widget-content">
                                                <div align="center">
                                                        <div id="buttonPrev" class="button48  ui-corner-all" title="Previous"></div>
-                                                       <div id="buttonPlay" class="button48  ui-corner-all" title="Play"></div>
+                                                       <div id="buttonPlay" class="button48  ui-corner-all paused" title="Play"></div>
                                                        <div id="buttonNext" class="button48  ui-corner-all" title="Next"></div>
                                                        <div id="buttonStop" class="button48  ui-corner-all" title="Stop"></div>
                                                </div>
        dialogs("stream_config_window.html");
        ?>
        </body>
-</html>
\ No newline at end of file
+</html>