From f50476dce52c856ed845dadca05cc52c173da256 Mon Sep 17 00:00:00 2001 From: coolo Date: Wed, 12 Dec 2007 06:53:03 +0000 Subject: [PATCH] _much_ nicer without this frame git-svn-id: http://svn.opensuse.org/svn/yast/trunk/qt4@43006 e0cc52ee-31ee-0310-8b87-e83c4596d67c --- src/YQDumbTab.cc | 21 +-------------------- src/YQDumbTab.h | 9 --------- src/YQWizard.cc | 2 +- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/YQDumbTab.cc b/src/YQDumbTab.cc index 0355335..b82e0b0 100644 --- a/src/YQDumbTab.cc +++ b/src/YQDumbTab.cc @@ -33,7 +33,7 @@ #include "YEvent.h" #define YQDumbTabSpacing 2 -#define YQDumbTabFrameMargin 4 +#define YQDumbTabFrameMargin 2 YQDumbTab::YQDumbTab( YWidget * parent ) @@ -156,25 +156,6 @@ YQDumbTab::preferredHeight() } -void -YQDumbTab::paintEvent( QPaintEvent * event ) -{ - QPainter painter( this ); - - int x_offset = 0; - int y_offset = _tabBar->height() + YQDumbTabSpacing; - int frameHeight = height() - y_offset; - int frameWidth = width(); - - qDrawWinPanel( &painter, - x_offset, y_offset, - frameWidth, frameHeight, - palette(), - false, // sunken - (const QBrush *) 0 ); // brush - don't fill interior -} - - void YQDumbTab::setSize( int newWidth, int newHeight ) { diff --git a/src/YQDumbTab.h b/src/YQDumbTab.h index 2ba1e25..4a5c9f0 100644 --- a/src/YQDumbTab.h +++ b/src/YQDumbTab.h @@ -99,15 +99,6 @@ public: **/ virtual void setSize( int newWidth, int newHeight ); -protected: - - /** - * Draw widget content. - * - * Reimplemented from QWidget. - **/ - virtual void paintEvent( QPaintEvent * ); - public slots: /** diff --git a/src/YQWizard.cc b/src/YQWizard.cc index 20cec05..4642d69 100644 --- a/src/YQWizard.cc +++ b/src/YQWizard.cc @@ -243,7 +243,7 @@ void YQWizard::addStep( const string & text, const string & id ) return; } - if ( _stepsList.last() && _stepsList.last()->name() == fromUTF8( text ) ) + if ( !_stepsList.empty() && _stepsList.last()->name() == fromUTF8( text ) ) { // Consecutive steps with the same name will be shown as one single step. // -- 2.39.2