author | zautrix <zautrix> | 2005-08-23 17:08:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-23 17:08:17 (UTC) |
commit | 789aec1acdf798aea32ab16219a8f19c6155250e (patch) (side-by-side diff) | |
tree | fad1651a18ef60d9a4640fd83fc2afad5bdd006c /korganizer | |
parent | e6d678229580cd712ff82ea989e7b151be546dbd (diff) | |
download | kdepimpi-789aec1acdf798aea32ab16219a8f19c6155250e.zip kdepimpi-789aec1acdf798aea32ab16219a8f19c6155250e.tar.gz kdepimpi-789aec1acdf798aea32ab16219a8f19c6155250e.tar.bz2 |
layout fix
-rw-r--r-- | korganizer/koagendaview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index d8a2134..c1b149f 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -704,32 +704,34 @@ void KOAgendaView::createDayLabels() return; // ### Before deleting and recreating we could check if mSelectedDates changed... // It would remove some flickering and gain speed (since this is called by // each updateView() call) int maxWid = mUpcomingWidth - mTimeLabels->width()- mAgenda->verticalScrollBar()->width() - mAgenda->frameWidth()*2; 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; + if ( widModulo < 0 || widModulo > selCount ) + widModulo = 0; 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 * 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 "); while ( needWid > maxWid ) { dayTest = dayTest.left( dayTest.length() - 1 ); |