summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (show whitespace changes)
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp12
-rw-r--r--microkde/kdialogbase.cpp2
2 files changed, 12 insertions, 2 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index ea3a329..d675517 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -669,42 +669,50 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
669 } else { 669 } else {
670 if ( opaqueOldPos >= 0 ) 670 if ( opaqueOldPos >= 0 )
671 paint.drawRect( r.x(), opaqueOldPos + sw/2 - rBord, 671 paint.drawRect( r.x(), opaqueOldPos + sw/2 - rBord,
672 r.width(), 2*rBord ); 672 r.width(), 2*rBord );
673 if ( p >= 0 ) 673 if ( p >= 0 )
674 paint.drawRect( r.x(), p + sw/2 - rBord, r.width(), 2*rBord ); 674 paint.drawRect( r.x(), p + sw/2 - rBord, r.width(), 2*rBord );
675 } 675 }
676 opaqueOldPos = p; 676 opaqueOldPos = p;
677#else 677#else
678 if ( !mRubberBand ) { 678 if ( !mRubberBand ) {
679 mRubberBand = new QFrame( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop); 679 mRubberBand = new QFrame( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop);
680 mRubberBand->setFrameStyle( Box | Raised ); 680 mRubberBand->setFrameStyle( Box | Raised );
681 mRubberBand->setPalette( QPalette ( Qt::green.light(),Qt::green.dark() ) ); 681 mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) );
682 } 682 }
683 QRect r = contentsRect(); 683 QRect r = contentsRect();
684 const int rBord = 5; //Themable???? 684 static int rBord = 0; //Themable????
685 if ( !rBord ) {
686 if (QApplication::desktop()->width() <= 320 )
687 rBord = 4;
688 else
689 rBord = 5;
690 }
685 int sw = style().splitterWidth(); 691 int sw = style().splitterWidth();
686 if ( orient == Horizontal ) { 692 if ( orient == Horizontal ) {
687 if ( p >= 0 ) { 693 if ( p >= 0 ) {
688 QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y())); 694 QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y()));
689 mRubberBand->setGeometry( geo.x(), geo.y(), 2*rBord, r.height() ); 695 mRubberBand->setGeometry( geo.x(), geo.y(), 2*rBord, r.height() );
690 } 696 }
691 } else { 697 } else {
692 if ( p >= 0 ) { 698 if ( p >= 0 ) {
693 QPoint geo = mapToGlobal (QPoint ( r.x(), p + sw/2 - rBord)); 699 QPoint geo = mapToGlobal (QPoint ( r.x(), p + sw/2 - rBord));
694 mRubberBand->setGeometry( geo.x(), geo.y(), r.width(), 2*rBord); 700 mRubberBand->setGeometry( geo.x(), geo.y(), r.width(), 2*rBord);
695 } 701 }
696 } 702 }
697 opaqueOldPos = p; 703 opaqueOldPos = p;
704 if ( ! mRubberBand->isVisible() ) {
698 mRubberBand->show(); 705 mRubberBand->show();
706 }
699#endif 707#endif
700} 708}
701 709
702 710
703/*! \reimp */ 711/*! \reimp */
704bool KDGanttMinimizeSplitter::event( QEvent *e ) 712bool KDGanttMinimizeSplitter::event( QEvent *e )
705{ 713{
706 if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) { 714 if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) {
707 recalc( isVisible() ); 715 recalc( isVisible() );
708 if ( e->type() == QEvent::Show ) 716 if ( e->type() == QEvent::Show )
709 data->firstShow = FALSE; 717 data->firstShow = FALSE;
710 } 718 }
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index f453331..e6144de 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -142,24 +142,26 @@ void KDialogBase::initLayout()
142 mTopLayout->addWidget( mMainWidget ); 142 mTopLayout->addWidget( mMainWidget );
143 143
144 QBoxLayout *buttonLayout = new QHBoxLayout; 144 QBoxLayout *buttonLayout = new QHBoxLayout;
145 mTopLayout->addLayout( buttonLayout ); 145 mTopLayout->addLayout( buttonLayout );
146 146
147 if ( mUser1Button ) buttonLayout->addWidget( mUser1Button ); 147 if ( mUser1Button ) buttonLayout->addWidget( mUser1Button );
148 if ( mUser2Button ) buttonLayout->addWidget( mUser2Button ); 148 if ( mUser2Button ) buttonLayout->addWidget( mUser2Button );
149 if ( mOkButton ) buttonLayout->addWidget( mOkButton ); 149 if ( mOkButton ) buttonLayout->addWidget( mOkButton );
150 if ( mApplyButton ) buttonLayout->addWidget( mApplyButton ); 150 if ( mApplyButton ) buttonLayout->addWidget( mApplyButton );
151 if ( mDefaultButton ) buttonLayout->addWidget( mDefaultButton ); 151 if ( mDefaultButton ) buttonLayout->addWidget( mDefaultButton );
152 if ( mCancelButton ) buttonLayout->addWidget( mCancelButton ); 152 if ( mCancelButton ) buttonLayout->addWidget( mCancelButton );
153 if ( mCloseButton ) buttonLayout->addWidget( mCloseButton ); 153 if ( mCloseButton ) buttonLayout->addWidget( mCloseButton );
154 buttonLayout->setMargin( 0 );
155 buttonLayout->setSpacing( spacingHint() );
154} 156}
155 157
156QFrame *KDialogBase::addPage( const QString &name ) 158QFrame *KDialogBase::addPage( const QString &name )
157{ 159{
158// kdDebug() << "KDialogBase::addPage(): " << name << endl; 160// kdDebug() << "KDialogBase::addPage(): " << name << endl;
159 QFrame *frame = new QFrame( tabWidget() ); 161 QFrame *frame = new QFrame( tabWidget() );
160 tabWidget()->addTab( frame, name ); 162 tabWidget()->addTab( frame, name );
161 return frame; 163 return frame;
162} 164}
163 165
164QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & ) 166QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & )
165{ 167{