Author: tgoettlicher
Date: Thu Oct 30 11:28:24 2008
New Revision: 52726
URL: http://svn.opensuse.org/viewcvs/yast?rev=52726&view=rev
Log:
Fixed QPainter warnings in YQBusyIndicator
Modified:
trunk/qt/package/yast2-qt.changes
trunk/qt/src/YQBusyIndicator.cc
trunk/qt/src/YQBusyIndicator.h
Modified: trunk/qt/package/yast2-qt.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/package/yast2-qt.changes?rev=52726&r1=52725&r2=52726&view=diff
==============================================================================
--- trunk/qt/package/yast2-qt.changes (original)
+++ trunk/qt/package/yast2-qt.changes Thu Oct 30 11:28:24 2008
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Thu Oct 30 11:04:26 CET 2008 - tgoettlicher@suse.de
+
+- Fixed QPainter warnings in YQBusyIndicator
+
+-------------------------------------------------------------------
Tue Oct 28 17:14:07 CET 2008 - sh@suse.de
- (coolo) Fixed bnc #427632: Steps in wizard not updated
Modified: trunk/qt/src/YQBusyIndicator.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQBusyIndicator.cc?rev=52726&r1=52725&r2=52726&view=diff
==============================================================================
--- trunk/qt/src/YQBusyIndicator.cc (original)
+++ trunk/qt/src/YQBusyIndicator.cc Thu Oct 30 11:28:24 2008
@@ -23,8 +23,8 @@
#include <QTimer>
#include <QVBoxLayout>
#include <QFrame>
-
#include <QPainter>
+#include
#define YUILogComponent "qt-ui"
#include "YUILog.h"
@@ -86,24 +86,26 @@
_alive=false;
}
-void BusyBar::paintEvent(QPaintEvent * e)
+void BusyBar::paintEvent( QPaintEvent * e )
{
QPalette palette = QApplication::palette();
- QColor foreground = palette.color(QPalette::Active, QPalette::Highlight);
- QColor background = palette.color(QPalette::Active, QPalette::Base);
+ QColor foreground = palette.color( QPalette::Active, QPalette::Highlight );
+ QColor background = palette.color( QPalette::Active, QPalette::Base );
QPainter painter(this);
- QLinearGradient gradient(0, 0, width()-1, 0);
- gradient.setColorAt( std::min(_position - STEP_SIZE, 0.0), background );
- gradient.setColorAt(_position, foreground );
- gradient.setColorAt( std::max(_position + STEP_SIZE, 1.0), background );
-
- painter.setBrush(gradient);
- painter.setPen(Qt::NoPen);
- painter.drawRect(rect());
+ QLinearGradient gradient(0, 0, width()-1, 0 );
+
+ gradient.setColorAt( 0.0, background );
+ gradient.setColorAt( _position, foreground );
+ gradient.setColorAt( 1.0, background );
+
+ painter.setBrush( gradient );
+ painter.setPen( Qt::NoPen );
+ painter.drawRect( rect() );
+ painter.end();
- QFrame::paintEvent(e);
+ QFrame::paintEvent( e );
}
Modified: trunk/qt/src/YQBusyIndicator.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQBusyIndicator.h?rev=52726&r1=52725&r2=52726&view=diff
==============================================================================
--- trunk/qt/src/YQBusyIndicator.h (original)
+++ trunk/qt/src/YQBusyIndicator.h Thu Oct 30 11:28:24 2008
@@ -146,7 +146,7 @@
void paintEvent(QPaintEvent *event);
private:
- float _position; // the position of the bar
+ double _position; // the position of the bar
bool _rightwards; // direction the bar moves
QTimer * _timer;
bool _alive;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org