author | zautrix <zautrix> | 2005-03-15 11:10:36 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-15 11:10:36 (UTC) |
commit | 6b748e1b7b4213871a5866a9af50e99800d2a704 (patch) (unidiff) | |
tree | 16a34a9efab71fed5aea3b6c70a7a1ca3b974d49 | |
parent | f695ed8bf462bab5df0f6b41d3d3e6ed5b803484 (diff) | |
download | kdepimpi-6b748e1b7b4213871a5866a9af50e99800d2a704.zip kdepimpi-6b748e1b7b4213871a5866a9af50e99800d2a704.tar.gz kdepimpi-6b748e1b7b4213871a5866a9af50e99800d2a704.tar.bz2 |
daylabel width fix for one day
-rw-r--r-- | korganizer/koagendaview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index db66413..8448a4c 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -707,49 +707,49 @@ void KOAgendaView::createDayLabels() | |||
707 | dayLabel = getNewDaylabel(); | 707 | dayLabel = getNewDaylabel(); |
708 | } | 708 | } |
709 | dayLabel->setFixedWidth( mTimeLabels->width()+2 ); | 709 | dayLabel->setFixedWidth( mTimeLabels->width()+2 ); |
710 | dayLabel->setFont( dlf ); | 710 | dayLabel->setFont( dlf ); |
711 | dayLabel->setNum( -1 ); | 711 | dayLabel->setNum( -1 ); |
712 | //dayLabel->setAlignment(QLabel::AlignHCenter); | 712 | //dayLabel->setAlignment(QLabel::AlignHCenter); |
713 | dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); | 713 | dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); |
714 | dayLabel->show(); | 714 | dayLabel->show(); |
715 | DateList::ConstIterator dit; | 715 | DateList::ConstIterator dit; |
716 | bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); | 716 | bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); |
717 | int counter = -1; | 717 | int counter = -1; |
718 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { | 718 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { |
719 | ++counter; | 719 | ++counter; |
720 | QDate date = *dit; | 720 | QDate date = *dit; |
721 | // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); | 721 | // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); |
722 | if ( ! appendLabels ) { | 722 | if ( ! appendLabels ) { |
723 | dayLabel = mDayLabelsList.next(); | 723 | dayLabel = mDayLabelsList.next(); |
724 | if ( !dayLabel ) | 724 | if ( !dayLabel ) |
725 | appendLabels = true; | 725 | appendLabels = true; |
726 | } | 726 | } |
727 | if ( appendLabels ) { | 727 | if ( appendLabels ) { |
728 | dayLabel = getNewDaylabel(); | 728 | dayLabel = getNewDaylabel(); |
729 | } | 729 | } |
730 | dayLabel->setMinimumWidth( 1 ); | 730 | dayLabel->setMinimumWidth( 1 ); |
731 | dayLabel->setMaximumWidth( 1024 ); | 731 | dayLabel->setMaximumWidth( 10240 ); |
732 | dayLabel->setFont( dlf ); | 732 | dayLabel->setFont( dlf ); |
733 | dayLabel->show(); | 733 | dayLabel->show(); |
734 | dayLabel->setNum( counter ); | 734 | dayLabel->setNum( counter ); |
735 | QString str; | 735 | QString str; |
736 | int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); | 736 | int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); |
737 | QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); | 737 | QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); |
738 | switch ( maxLen ) { | 738 | switch ( maxLen ) { |
739 | case 2: | 739 | case 2: |
740 | str = QString::number( date.day() ); | 740 | str = QString::number( date.day() ); |
741 | break; | 741 | break; |
742 | 742 | ||
743 | case 3: | 743 | case 3: |
744 | str = dayName.left( 1 ) +QString::number( date.day()); | 744 | str = dayName.left( 1 ) +QString::number( date.day()); |
745 | 745 | ||
746 | break; | 746 | break; |
747 | case 4: | 747 | case 4: |
748 | str = dayName.left( 1 ) + " " +QString::number( date.day()); | 748 | str = dayName.left( 1 ) + " " +QString::number( date.day()); |
749 | 749 | ||
750 | break; | 750 | break; |
751 | case 5: | 751 | case 5: |
752 | str = dayName.left( 2 ) + " " +QString::number( date.day()); | 752 | str = dayName.left( 2 ) + " " +QString::number( date.day()); |
753 | 753 | ||
754 | break; | 754 | break; |
755 | case 6: | 755 | case 6: |