-rw-r--r-- | korganizer/koagendaview.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 93ff55e..c851ab5 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -670,6 +670,7 @@ void KOAgendaView::createDayLabels() | |||
670 | 670 | ||
671 | QFont dlf = KOPrefs::instance()->mTimeLabelsFont; | 671 | QFont dlf = KOPrefs::instance()->mTimeLabelsFont; |
672 | QFontMetrics fm ( dlf ); | 672 | QFontMetrics fm ( dlf ); |
673 | dlf.setBold( true ); | ||
673 | int selCount = mSelectedDates.count(); | 674 | int selCount = mSelectedDates.count(); |
674 | int widModulo = maxWid - (mAgenda->gridSpacingX() * selCount)+1; | 675 | int widModulo = maxWid - (mAgenda->gridSpacingX() * selCount)+1; |
675 | QString dayTest = "Mon 20"; | 676 | QString dayTest = "Mon 20"; |
@@ -679,7 +680,7 @@ void KOAgendaView::createDayLabels() | |||
679 | if ( QApplication::desktop()->width() <= 320 ) | 680 | if ( QApplication::desktop()->width() <= 320 ) |
680 | maxWid -= ( selCount * 3 ); //working for QPushButton | 681 | maxWid -= ( selCount * 3 ); //working for QPushButton |
681 | else | 682 | else |
682 | maxWid -= ( selCount * 3 ); //working for QPushButton | 683 | maxWid -= ( selCount * 4 ); //working for QPushButton |
683 | if ( maxWid < 0 ) | 684 | if ( maxWid < 0 ) |
684 | maxWid = 20; | 685 | maxWid = 20; |
685 | int needWid = wid * selCount; | 686 | int needWid = wid * selCount; |
@@ -698,7 +699,7 @@ void KOAgendaView::createDayLabels() | |||
698 | while ( fontPoint > 4 ) { | 699 | while ( fontPoint > 4 ) { |
699 | --fontPoint; | 700 | --fontPoint; |
700 | dlf.setPointSize( fontPoint ); | 701 | dlf.setPointSize( fontPoint ); |
701 | QFontMetrics f( dlf ); | 702 | QFontMetrics f( dlf ); |
702 | wid = f.width( "30" ); | 703 | wid = f.width( "30" ); |
703 | needWid = wid * selCount; | 704 | needWid = wid * selCount; |
704 | if ( needWid < maxWid ) | 705 | if ( needWid < maxWid ) |
@@ -707,7 +708,8 @@ void KOAgendaView::createDayLabels() | |||
707 | maxLen = 2; | 708 | maxLen = 2; |
708 | } | 709 | } |
709 | //qDebug("Max len %d ", dayTest.length() ); | 710 | //qDebug("Max len %d ", dayTest.length() ); |
710 | 711 | if ( !KOPrefs::instance()->mTimeLabelsFont.bold() ) | |
712 | dlf.setBold( false ); | ||
711 | QFontMetrics tempF( dlf ); | 713 | QFontMetrics tempF( dlf ); |
712 | newHight = tempF.height(); | 714 | newHight = tempF.height(); |
713 | mDayLabels->setFont( dlf ); | 715 | mDayLabels->setFont( dlf ); |