-rw-r--r-- | korganizer/koagendaview.cpp | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 8001c8f..acf43bd 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -367,13 +367,11 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
367 | mDayLabelsFrame = 0; | 367 | mDayLabelsFrame = 0; |
368 | mDayLabels = 0; | 368 | mDayLabels = 0; |
369 | bool isRTL = KOGlobals::self()->reverseLayout(); | 369 | bool isRTL = KOGlobals::self()->reverseLayout(); |
370 | 370 | QPixmap expandPix; | |
371 | if ( KOPrefs::instance()->mVerticalScreen ) { | 371 | if ( KOPrefs::instance()->mVerticalScreen ) { |
372 | mExpandedPixmap = SmallIcon( "1downarrow" ); | 372 | expandPix = SmallIcon( "1updownarrow" ); |
373 | mNotExpandedPixmap = SmallIcon( "1uparrow" ); | ||
374 | } else { | 373 | } else { |
375 | mExpandedPixmap = SmallIcon( isRTL ? "1leftarrow" : "1rightarrow" ); | 374 | expandPix = SmallIcon("1leftrightarrow" ); |
376 | mNotExpandedPixmap = SmallIcon( isRTL ? "1rightarrow" : "1leftarrow" ); | ||
377 | } | 375 | } |
378 | 376 | ||
379 | QBoxLayout *topLayout = new QVBoxLayout(this); | 377 | QBoxLayout *topLayout = new QVBoxLayout(this); |
@@ -393,12 +391,13 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
393 | mDummyAllDayLeft = new QVBox( mAllDayFrame ); | 391 | mDummyAllDayLeft = new QVBox( mAllDayFrame ); |
394 | 392 | ||
395 | mExpandButton = new QPushButton(mDummyAllDayLeft); | 393 | mExpandButton = new QPushButton(mDummyAllDayLeft); |
396 | mExpandButton->setPixmap( mNotExpandedPixmap ); | 394 | mExpandButton->setPixmap( expandPix ); |
397 | int widebut = mExpandButton->sizeHint().width(); | 395 | int widebut = mExpandButton->sizeHint().width()+4; |
396 | int heibut = mExpandButton->sizeHint().height()+4; | ||
397 | if ( heibut > widebut ) | ||
398 | widebut = heibut ; | ||
398 | if ( QApplication::desktop()->width() < 480 ) | 399 | if ( QApplication::desktop()->width() < 480 ) |
399 | widebut = widebut*2; | 400 | widebut = widebut*3/2; |
400 | else | ||
401 | widebut = (widebut*3) / 2; | ||
402 | //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, | 401 | //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, |
403 | // QSizePolicy::Fixed ) ); | 402 | // QSizePolicy::Fixed ) ); |
404 | mExpandButton->setFixedSize( widebut, widebut); | 403 | mExpandButton->setFixedSize( widebut, widebut); |
@@ -1456,15 +1455,6 @@ void KOAgendaView::setContentsPos(int y) | |||
1456 | mAgenda->setContentsPos(0,y); | 1455 | mAgenda->setContentsPos(0,y); |
1457 | } | 1456 | } |
1458 | 1457 | ||
1459 | void KOAgendaView::setExpandedButton( bool expanded ) | ||
1460 | { | ||
1461 | if ( expanded ) { | ||
1462 | mExpandButton->setPixmap( mExpandedPixmap ); | ||
1463 | } else { | ||
1464 | mExpandButton->setPixmap( mNotExpandedPixmap ); | ||
1465 | } | ||
1466 | } | ||
1467 | |||
1468 | void KOAgendaView::clearSelection() | 1458 | void KOAgendaView::clearSelection() |
1469 | { | 1459 | { |
1470 | mAgenda->deselectItem(); | 1460 | mAgenda->deselectItem(); |