Author: coolo
Date: Sun Dec 16 12:34:45 2007
New Revision: 43107
URL: http://svn.opensuse.org/viewcvs/yast?rev=43107&view=rev
Log:
tried svg themeing, but it's not faster and adds
another 700K of libs to the instsys
Modified:
trunk/qt/src/QY2Styler.cc
trunk/qt/theme/alpha_dummy-1.svg
trunk/qt/theme/rect2174.png
Modified: trunk/qt/src/QY2Styler.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/QY2Styler.cc?rev=43107&r1=43106&r2=43107&view=diff
==============================================================================
--- trunk/qt/src/QY2Styler.cc (original)
+++ trunk/qt/src/QY2Styler.cc Sun Dec 16 12:34:45 2007
@@ -5,6 +5,7 @@
#include <QApplication>
#include <QWidget>
#include <QPainter>
+#include <QSvgRenderer>
QY2Styler *QY2Styler::_self = 0;
@@ -82,9 +83,16 @@
result.fill( QColor( 0, 128, 0, 0 ) );
QPainter pain( &result );
- QImage scaled = _backgroundPx[name].scaled( wid->contentsRect().width(), wid->contentsRect().height() );
- pain.drawImage( wid->contentsRect().topLeft(), scaled, QRectF(QPointF(0,0), scaled.size()), Qt::OrderedAlphaDither);
-
+ if ( !_backgroundFn[ name ].endsWith( ".svg" ) )
+ {
+ QImage scaled = _backgroundPx[name].scaled( wid->contentsRect().width(), wid->contentsRect().height() );
+ pain.drawImage( wid->contentsRect().topLeft(), scaled, QRectF(QPointF(0,0), scaled.size()), Qt::OrderedAlphaDither);
+ } else {
+#if 0
+ QSvgRenderer rend( _backgroundFn[ name ] );
+ rend.render( &pain, wid->contentsRect() );
+#endif
+ }
QPalette p = wid->palette();
p.setBrush(QPalette::Window, result );
wid->setPalette( p );
Modified: trunk/qt/theme/alpha_dummy-1.svg
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/theme/alpha_dummy-1.svg?rev=43107&r1=43106&r2=43107&view=diff
==============================================================================
--- trunk/qt/theme/alpha_dummy-1.svg (original)
+++ trunk/qt/theme/alpha_dummy-1.svg Sun Dec 16 12:34:45 2007
@@ -15,7 +15,7 @@
sodipodi:version="0.32"
inkscape:version="0.45.1"
version="1.0"
- sodipodi:docbase="/home/coolo/prod/yast2/qt4/theme"
+ sodipodi:docbase="/home/col/prod/yast2/qt/theme"
sodipodi:docname="alpha_dummy-1.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">