From 02bdd5a73feb7bd2431c5492c7bbf663f28efbd8 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 01 Apr 2005 22:32:18 +0000 Subject: nf --- (limited to 'korganizer/koagendaview.cpp') diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 1627dba..2b05d37 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -132,8 +132,12 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) int timeHeight = fm.ascent(); QFont nFont = p->font(); - if (!KGlobal::locale()->use12Clock()) - suffix = "00"; + if (!KGlobal::locale()->use12Clock()) { + if ( QApplication::desktop()->width() <= 320 ) + suffix = ""; + else + suffix = "00"; + } if ( timeHeight > mCellHeight ) { timeHeight = mCellHeight-1; @@ -159,7 +163,6 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) while (y < cy + ch) { p->drawLine(cx,y,cw,y); hour.setNum(cell); - // handle 24h and am/pm time formats if (KGlobal::locale()->use12Clock()) { if (cell > 11) suffix = "pm"; @@ -213,8 +216,12 @@ void TimeLabels::updateConfig() mMiniWidth = fontMetrics().width(test); if (KGlobal::locale()->use12Clock()) test = "pm"; - else - test = "00"; + else { + if ( QApplication::desktop()->width() <= 320 ) + test = ""; + else + test = "00"; + } QFont sFont = font(); sFont.setPointSize( sFont.pointSize()/2 ); QFontMetrics fmS( sFont ); @@ -725,7 +732,10 @@ void KOAgendaView::createDayLabels() dayLabel->setFont( dlf ); dayLabel->setNum( -1 ); //dayLabel->setAlignment(QLabel::AlignHCenter); - dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); + if ( QApplication::desktop()->width() <= 320 ) + dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ).left(2) ); + else + dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); dayLabel->show(); DateList::ConstIterator dit; bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); @@ -832,7 +842,6 @@ void KOAgendaView::createDayLabels() dayLabel = getNewDaylabel(); } //dayLabel->hide();//test only - qDebug("fremwidd %d ", mAgenda->frameWidth()); int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()- (mAgenda->frameWidth()*2) ) % mSelectedDates.count() ; if ( offset < 0 ) offset = 0; //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 ); @@ -842,6 +851,7 @@ void KOAgendaView::createDayLabels() dayLabel->show(); dayLabel->setNum( -2 ); dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset ); + //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2); //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2); if ( !appendLabels ) { -- cgit v0.9.0.2