summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp8
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
@@ -667,22 +667,23 @@ void KOAgendaView::createDayLabels()
mDayLabelsFrame->setMaximumWidth( mUpcomingWidth );
if ( maxWid < 20 )
maxWid = 20;
QFont dlf = KOPrefs::instance()->mTimeLabelsFont;
QFontMetrics fm ( dlf );
+ dlf.setBold( true );
int selCount = mSelectedDates.count();
int widModulo = maxWid - (mAgenda->gridSpacingX() * selCount)+1;
QString dayTest = "Mon 20";
//QString dayTest = "Mon 20";
int wid = fm.width( dayTest );
//maxWid -= ( selCount * 3 ); //working for QLabels
if ( QApplication::desktop()->width() <= 320 )
maxWid -= ( selCount * 3 ); //working for QPushButton
else
- maxWid -= ( selCount * 3 ); //working for QPushButton
+ maxWid -= ( selCount * 4 ); //working for QPushButton
if ( maxWid < 0 )
maxWid = 20;
int needWid = wid * selCount;
//qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid );
//if ( needWid > maxWid )
// qDebug("DAYLABELS TOOOOOOO BIG ");
@@ -695,22 +696,23 @@ void KOAgendaView::createDayLabels()
int fontPoint = dlf.pointSize();
if ( maxLen < 2 ) {
int fontPoint = dlf.pointSize();
while ( fontPoint > 4 ) {
--fontPoint;
dlf.setPointSize( fontPoint );
- QFontMetrics f( dlf );
+ QFontMetrics f( dlf );
wid = f.width( "30" );
needWid = wid * selCount;
if ( needWid < maxWid )
break;
}
maxLen = 2;
}
//qDebug("Max len %d ", dayTest.length() );
-
+ if ( !KOPrefs::instance()->mTimeLabelsFont.bold() )
+ dlf.setBold( false );
QFontMetrics tempF( dlf );
newHight = tempF.height();
mDayLabels->setFont( dlf );
// mLayoutDayLabels = new QHBoxLayout(mDayLabels);;
// mLayoutDayLabels->addSpacing(mTimeLabels->width());
//mLayoutDayLabels->addSpacing( 2 );