-rw-r--r-- | microkde/KDGanttMinimizeSplitter.cpp | 10 | ||||
-rw-r--r-- | microkde/kdialogbase.cpp | 8 |
2 files changed, 7 insertions, 11 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp index 253175e..2a30346 100644 --- a/microkde/KDGanttMinimizeSplitter.cpp +++ b/microkde/KDGanttMinimizeSplitter.cpp | |||
@@ -260,52 +260,48 @@ QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions() | |||
260 | } | 260 | } |
261 | return list; | 261 | return list; |
262 | } | 262 | } |
263 | 263 | ||
264 | void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) | 264 | void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) |
265 | { | 265 | { |
266 | QPixmap buffer( size() ); | 266 | QPixmap buffer( size() ); |
267 | QPainter p( &buffer ); | 267 | QPainter p( &buffer ); |
268 | 268 | ||
269 | //LR | 269 | //LR |
270 | // Draw the splitter rectangle | 270 | // Draw the splitter rectangle |
271 | p.setBrush( colorGroup().background() ); | 271 | p.setBrush( colorGroup().background() ); |
272 | p.setPen( colorGroup().foreground() ); | 272 | p.setPen( colorGroup().foreground() ); |
273 | //p.drawRect( rect() ); | 273 | //p.drawRect( rect() ); |
274 | #ifndef DESKTOP_VERSION | 274 | #ifndef DESKTOP_VERSION |
275 | if ( mMouseDown ) | 275 | if ( mMouseDown ) |
276 | buffer.fill( QColor( 242,27,255 ) ); | 276 | buffer.fill( colorGroup().background().dark() ); |
277 | else | 277 | else |
278 | #endif | 278 | #endif |
279 | buffer.fill( colorGroup().background() ); | 279 | buffer.fill( colorGroup().background() ); |
280 | //buffer.fill( backgroundColor() ); | 280 | //buffer.fill( backgroundColor() ); |
281 | // parentWidget()->style().drawPrimitive( QStyle::PE_Panel, &p, rect(), parentWidget()->colorGroup()); | 281 | // parentWidget()->style().drawPrimitive( QStyle::PE_Panel, &p, rect(), parentWidget()->colorGroup()); |
282 | 282 | ||
283 | int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size | 283 | int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size |
284 | 284 | ||
285 | // arrow color | 285 | // arrow color |
286 | QColor col; | 286 | QColor col; |
287 | if ( _activeButton ) | 287 | if ( _activeButton ) |
288 | col = colorGroup().background().dark( 250 ); | 288 | col = colorGroup().background().dark( 250 ); |
289 | else { | 289 | else { |
290 | if ( mMouseDown ) | 290 | if ( mMouseDown ) |
291 | #ifndef DESKTOP_VERSION | 291 | col = Qt::white; |
292 | col = QColor( 178,18,188);//QColor( 242,27,255 );//Qt::white; | ||
293 | #else | ||
294 | col = Qt::white; | ||
295 | #endif | ||
296 | else | 292 | else |
297 | col = colorGroup().background().dark( 150 ); | 293 | col = colorGroup().background().dark( 150 ); |
298 | } | 294 | } |
299 | //QColor col = backgroundColor().dark( 130 ); | 295 | //QColor col = backgroundColor().dark( 130 ); |
300 | p.setBrush( col ); | 296 | p.setBrush( col ); |
301 | p.setPen( col ); | 297 | p.setPen( col ); |
302 | 298 | ||
303 | QValueList<QPointArray> list = buttonRegions(); | 299 | QValueList<QPointArray> list = buttonRegions(); |
304 | int index = 1; | 300 | int index = 1; |
305 | if ( mUseOffset ) | 301 | if ( mUseOffset ) |
306 | p.translate( 0, 1 ); | 302 | p.translate( 0, 1 ); |
307 | for ( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { | 303 | for ( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { |
308 | if ( index == _activeButton ) { | 304 | if ( index == _activeButton ) { |
309 | 305 | ||
310 | /* | 306 | /* |
311 | if ( ! _collapsed ) { | 307 | if ( ! _collapsed ) { |
@@ -675,33 +671,33 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) | |||
675 | 2*rBord, r.height() ); | 671 | 2*rBord, r.height() ); |
676 | if ( p >= 0 ) | 672 | if ( p >= 0 ) |
677 | paint.drawRect( p + sw/2 - rBord, r.y(), 2*rBord, r.height() ); | 673 | paint.drawRect( p + sw/2 - rBord, r.y(), 2*rBord, r.height() ); |
678 | } else { | 674 | } else { |
679 | if ( opaqueOldPos >= 0 ) | 675 | if ( opaqueOldPos >= 0 ) |
680 | paint.drawRect( r.x(), opaqueOldPos + sw/2 - rBord, | 676 | paint.drawRect( r.x(), opaqueOldPos + sw/2 - rBord, |
681 | r.width(), 2*rBord ); | 677 | r.width(), 2*rBord ); |
682 | if ( p >= 0 ) | 678 | if ( p >= 0 ) |
683 | paint.drawRect( r.x(), p + sw/2 - rBord, r.width(), 2*rBord ); | 679 | paint.drawRect( r.x(), p + sw/2 - rBord, r.width(), 2*rBord ); |
684 | } | 680 | } |
685 | opaqueOldPos = p; | 681 | opaqueOldPos = p; |
686 | #else | 682 | #else |
687 | if ( !mRubberBand ) { | 683 | if ( !mRubberBand ) { |
688 | mRubberBand = new QFrame( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop); | 684 | mRubberBand = new QFrame( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop); |
689 | mRubberBand->setFrameStyle( Box | Raised ); | 685 | mRubberBand->setFrameStyle( Box | Raised ); |
690 | //mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) ); | 686 | //mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) ); |
691 | mRubberBand->setPalette( QPalette ( QColor( 178,18,188), QColor( 242,27,255 ) )); | 687 | mRubberBand->setPalette( QPalette ( colorGroup().background().light(), colorGroup().background().dark() )); |
692 | } | 688 | } |
693 | QRect r = contentsRect(); | 689 | QRect r = contentsRect(); |
694 | static int rBord = 0; //Themable???? | 690 | static int rBord = 0; //Themable???? |
695 | if ( !rBord ) { | 691 | if ( !rBord ) { |
696 | if (QApplication::desktop()->width() <= 320 ) | 692 | if (QApplication::desktop()->width() <= 320 ) |
697 | rBord = 3; | 693 | rBord = 3; |
698 | else | 694 | else |
699 | rBord = 4; | 695 | rBord = 4; |
700 | } | 696 | } |
701 | int sw = style().splitterWidth(); | 697 | int sw = style().splitterWidth(); |
702 | if ( orient == Horizontal ) { | 698 | if ( orient == Horizontal ) { |
703 | if ( p >= 0 ) { | 699 | if ( p >= 0 ) { |
704 | QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y())); | 700 | QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y())); |
705 | mRubberBand->setGeometry( geo.x(), geo.y(), 2*rBord, r.height() ); | 701 | mRubberBand->setGeometry( geo.x(), geo.y(), 2*rBord, r.height() ); |
706 | } | 702 | } |
707 | } else { | 703 | } else { |
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp index e6144de..11635e1 100644 --- a/microkde/kdialogbase.cpp +++ b/microkde/kdialogbase.cpp | |||
@@ -123,49 +123,49 @@ QTabWidget *KDialogBase::tabWidget() | |||
123 | void KDialogBase::hideButtons() | 123 | void KDialogBase::hideButtons() |
124 | { | 124 | { |
125 | if ( mUser1Button ) mUser1Button->hide() ; | 125 | if ( mUser1Button ) mUser1Button->hide() ; |
126 | if ( mUser2Button ) mUser2Button->hide() ; | 126 | if ( mUser2Button ) mUser2Button->hide() ; |
127 | if ( mOkButton ) mOkButton->hide() ; | 127 | if ( mOkButton ) mOkButton->hide() ; |
128 | if ( mApplyButton ) mApplyButton->hide() ; | 128 | if ( mApplyButton ) mApplyButton->hide() ; |
129 | if ( mDefaultButton ) mDefaultButton->hide(); | 129 | if ( mDefaultButton ) mDefaultButton->hide(); |
130 | if ( mCancelButton ) mCancelButton->hide() ; | 130 | if ( mCancelButton ) mCancelButton->hide() ; |
131 | if ( mCloseButton ) mCloseButton->hide() ; | 131 | if ( mCloseButton ) mCloseButton->hide() ; |
132 | 132 | ||
133 | } | 133 | } |
134 | void KDialogBase::initLayout() | 134 | void KDialogBase::initLayout() |
135 | { | 135 | { |
136 | 136 | ||
137 | delete mTopLayout; | 137 | delete mTopLayout; |
138 | mTopLayout = new QVBoxLayout( this ); | 138 | mTopLayout = new QVBoxLayout( this ); |
139 | mTopLayout->setMargin( marginHint() ); | 139 | mTopLayout->setMargin( marginHintSmall() ); |
140 | mTopLayout->setSpacing( spacingHint() ); | 140 | mTopLayout->setSpacing( spacingHintSmall() ); |
141 | 141 | ||
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 ); | 154 | buttonLayout->setMargin( marginHintSmall() ); |
155 | buttonLayout->setSpacing( spacingHint() ); | 155 | buttonLayout->setSpacing( spacingHintSmall() ); |
156 | } | 156 | } |
157 | 157 | ||
158 | QFrame *KDialogBase::addPage( const QString &name ) | 158 | QFrame *KDialogBase::addPage( const QString &name ) |
159 | { | 159 | { |
160 | // kdDebug() << "KDialogBase::addPage(): " << name << endl; | 160 | // kdDebug() << "KDialogBase::addPage(): " << name << endl; |
161 | QFrame *frame = new QFrame( tabWidget() ); | 161 | QFrame *frame = new QFrame( tabWidget() ); |
162 | tabWidget()->addTab( frame, name ); | 162 | tabWidget()->addTab( frame, name ); |
163 | return frame; | 163 | return frame; |
164 | } | 164 | } |
165 | 165 | ||
166 | QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & ) | 166 | QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & ) |
167 | { | 167 | { |
168 | return addPage( name ); | 168 | return addPage( name ); |
169 | } | 169 | } |
170 | 170 | ||
171 | 171 | ||