-rw-r--r-- | korganizer/koagendaview.cpp | 8 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 93ff55e..c851ab5 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -667,22 +667,23 @@ void KOAgendaView::createDayLabels() | |||
667 | mDayLabelsFrame->setMaximumWidth( mUpcomingWidth ); | 667 | mDayLabelsFrame->setMaximumWidth( mUpcomingWidth ); |
668 | if ( maxWid < 20 ) | 668 | if ( maxWid < 20 ) |
669 | maxWid = 20; | 669 | maxWid = 20; |
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"; |
676 | //QString dayTest = "Mon 20"; | 677 | //QString dayTest = "Mon 20"; |
677 | int wid = fm.width( dayTest ); | 678 | int wid = fm.width( dayTest ); |
678 | //maxWid -= ( selCount * 3 ); //working for QLabels | 679 | //maxWid -= ( selCount * 3 ); //working for QLabels |
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; |
686 | //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid ); | 687 | //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid ); |
687 | //if ( needWid > maxWid ) | 688 | //if ( needWid > maxWid ) |
688 | // qDebug("DAYLABELS TOOOOOOO BIG "); | 689 | // qDebug("DAYLABELS TOOOOOOO BIG "); |
@@ -695,22 +696,23 @@ void KOAgendaView::createDayLabels() | |||
695 | int fontPoint = dlf.pointSize(); | 696 | int fontPoint = dlf.pointSize(); |
696 | if ( maxLen < 2 ) { | 697 | if ( maxLen < 2 ) { |
697 | int fontPoint = dlf.pointSize(); | 698 | int fontPoint = dlf.pointSize(); |
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 ) |
705 | break; | 706 | break; |
706 | } | 707 | } |
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 ); |
714 | // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; | 716 | // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; |
715 | // mLayoutDayLabels->addSpacing(mTimeLabels->width()); | 717 | // mLayoutDayLabels->addSpacing(mTimeLabels->width()); |
716 | //mLayoutDayLabels->addSpacing( 2 ); | 718 | //mLayoutDayLabels->addSpacing( 2 ); |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 35a56ca..7ba1392 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -271,13 +271,13 @@ void KOPrefsDialog::setupMainTab() | |||
271 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), | 271 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), |
272 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); | 272 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); |
273 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); | 273 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); |
274 | 274 | ||
275 | 275 | ||
276 | KPrefsDialogWidBool *verticalScreen = | 276 | KPrefsDialogWidBool *verticalScreen = |
277 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 277 | addWidBool(i18n("Vertical screen layout(Needs restart)"), |
278 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 278 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
279 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 279 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
280 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); | 280 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); |
281 | 281 | ||
282 | 282 | ||
283 | int iii = 5; | 283 | int iii = 5; |