[vlc-devel] commit: Smaller Volume Slider due to popular request. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Sat Aug 9 00:34:28 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Aug 8 15:36:59 2008 -0700| [395b4334a44468a4ec077aae0e4ffb8871d9fcaf] | committer: Jean-Baptiste Kempf
Smaller Volume Slider due to popular request.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=395b4334a44468a4ec077aae0e4ffb8871d9fcaf
---
.../qt4/pixmaps/toolbar/volume-slider-inside.png | Bin 270 -> 341 bytes
.../qt4/pixmaps/toolbar/volume-slider-outside.png | Bin 1009 -> 988 bytes
modules/gui/qt4/pixmaps/toolbar/volume-slider.svg | 62 --------------------
modules/gui/qt4/util/input_slider.cpp | 13 ++--
4 files changed, 7 insertions(+), 68 deletions(-)
diff --git a/modules/gui/qt4/pixmaps/toolbar/volume-slider-inside.png b/modules/gui/qt4/pixmaps/toolbar/volume-slider-inside.png
index fc11897..1055720 100644
Binary files a/modules/gui/qt4/pixmaps/toolbar/volume-slider-inside.png and b/modules/gui/qt4/pixmaps/toolbar/volume-slider-inside.png differ
diff --git a/modules/gui/qt4/pixmaps/toolbar/volume-slider-outside.png b/modules/gui/qt4/pixmaps/toolbar/volume-slider-outside.png
index 3b04c55..fbbf892 100644
Binary files a/modules/gui/qt4/pixmaps/toolbar/volume-slider-outside.png and b/modules/gui/qt4/pixmaps/toolbar/volume-slider-outside.png differ
diff --git a/modules/gui/qt4/pixmaps/toolbar/volume-slider.svg b/modules/gui/qt4/pixmaps/toolbar/volume-slider.svg
deleted file mode 100644
index dc1d321..0000000
--- a/modules/gui/qt4/pixmaps/toolbar/volume-slider.svg
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="210mm"
- height="297mm"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.45.1"
- sodipodi:docbase="/home/jb/qt4/pixmaps"
- sodipodi:docname="volume-slider.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="13.875969"
- inkscape:cx="61.730437"
- inkscape:cy="105.28125"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- inkscape:window-width="1920"
- inkscape:window-height="1113"
- inkscape:window-x="0"
- inkscape:window-y="36" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Calque 1"
- inkscape:groupmode="layer"
- id="layer1">
- <path
- style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
- d="M 4.9060716,947.36898 C 7.4032988,948.61692 25.490978,949.7332 50.59458,949.24492 C 75.69819,948.75664 99.84796,949.12146 101.69321,946.71574 C 103.05319,944.94269 103.93351,926.805 101.30228,925.11492 C 95.570753,921.43345 64.21417,932.29736 52.39478,935.24695 C 34.336494,939.75348 12.033428,942.76998 5.4710246,943.40511 C 2.1357826,944.04023 2.4088446,946.12104 4.9060716,947.36898 z "
- id="path2168"
- sodipodi:nodetypes="csssscz"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90"
- inkscape:export-filename="/home/jb/qt4/pixmaps/volume-slider-outside.png" />
- </g>
-</svg>
diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp
index 07d149a..a6ea509 100644
--- a/modules/gui/qt4/util/input_slider.cpp
+++ b/modules/gui/qt4/util/input_slider.cpp
@@ -21,6 +21,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -110,8 +111,8 @@ void InputSlider::mouseMoveEvent(QMouseEvent *event)
- Mark Kretschmann
- Gábor Lehel
*/
-#define WLENGTH 90 // px
-#define WHEIGHT 25 // px
+#define WLENGTH 80 // px
+#define WHEIGHT 22 // px
#define SOUNDMIN 0 // %
#define SOUNDMAX 200 // % OR 400 ?
@@ -119,8 +120,8 @@ SoundSlider::SoundSlider( QWidget *_parent, int _i_step, bool b_hard,
char *psz_colors )
: QAbstractSlider( _parent )
{
- paddingL = 5;
- paddingR = 3;
+ paddingL = 3;
+ paddingR = 2;
f_step = ( _i_step * 100 ) / AOUT_VOLUME_MAX ;
setRange( SOUNDMIN, b_hard ? (2 * SOUNDMAX) : SOUNDMAX );
@@ -137,7 +138,7 @@ SoundSlider::SoundSlider( QWidget *_parent, int _i_step, bool b_hard,
pixGradient = QPixmap( mask.size() );
/* Gradient building from the preferences */
- QLinearGradient gradient( paddingL, 4, WLENGTH + paddingL , 4 );
+ QLinearGradient gradient( paddingL, 3, WLENGTH + paddingL , 3 );
QStringList colorList = qfu( psz_colors ).split( ";" );
free( psz_colors );
@@ -201,7 +202,7 @@ void SoundSlider::mouseMoveEvent( QMouseEvent *event )
if( b_sliding )
{
QRect rect( paddingL - 15, -1,
- WLENGTH + 15 * 2, WHEIGHT + 4 );
+ WLENGTH + 15 * 2, WHEIGHT + 5 );
if( !rect.contains( event->pos() ) )
{ /* We are outside */
if ( !b_outside )
More information about the vlc-devel
mailing list