author | zautrix <zautrix> | 2005-03-26 13:36:19 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-26 13:36:19 (UTC) |
commit | 98444f8937b151a3deb71b7ae0da495872c52855 (patch) (unidiff) | |
tree | 26856e27b5d9aca9d428142cbbd15fef030957a7 /korganizer/koagendaview.cpp | |
parent | 93d1be2c6eead07300e7f90f3b417fcef0f109d3 (diff) | |
download | kdepimpi-98444f8937b151a3deb71b7ae0da495872c52855.zip kdepimpi-98444f8937b151a3deb71b7ae0da495872c52855.tar.gz kdepimpi-98444f8937b151a3deb71b7ae0da495872c52855.tar.bz2 |
icons added
-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 | |||
@@ -364,19 +364,17 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
364 | mSelectedDates.append(QDate::currentDate()); | 364 | mSelectedDates.append(QDate::currentDate()); |
365 | 365 | ||
366 | mLayoutDayLabels = 0; | 366 | mLayoutDayLabels = 0; |
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); |
380 | 378 | ||
381 | // Create day name labels for agenda columns | 379 | // Create day name labels for agenda columns |
382 | // Create agenda splitter | 380 | // Create agenda splitter |
@@ -390,18 +388,19 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
390 | agendaFrame->setFocusPolicy(NoFocus); | 388 | agendaFrame->setFocusPolicy(NoFocus); |
391 | 389 | ||
392 | // Create all-day agenda widget | 390 | // Create all-day agenda widget |
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); |
405 | connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); | 404 | connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); |
406 | mExpandButton->setFocusPolicy(NoFocus); | 405 | mExpandButton->setFocusPolicy(NoFocus); |
407 | mAllDayAgenda = new KOAgenda(1,mAllDayFrame); | 406 | mAllDayAgenda = new KOAgenda(1,mAllDayFrame); |
@@ -1453,21 +1452,12 @@ void KOAgendaView::setHolidayMasks() | |||
1453 | 1452 | ||
1454 | void KOAgendaView::setContentsPos(int y) | 1453 | void KOAgendaView::setContentsPos(int y) |
1455 | { | 1454 | { |
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(); |
1471 | mAllDayAgenda->deselectItem(); | 1461 | mAllDayAgenda->deselectItem(); |
1472 | } | 1462 | } |
1473 | 1463 | ||