summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-24 11:39:34 (UTC)
committer zautrix <zautrix>2005-03-24 11:39:34 (UTC)
commita9e8535fd6960f454ab7009cfa996973291502a2 (patch) (side-by-side diff)
treebcef1497b415a0b1a667c896f1fe7a4d4a764425
parentb9e83e4536ee4fc34b882fb88b8e5fd00bfdf929 (diff)
downloadkdepimpi-a9e8535fd6960f454ab7009cfa996973291502a2.zip
kdepimpi-a9e8535fd6960f454ab7009cfa996973291502a2.tar.gz
kdepimpi-a9e8535fd6960f454ab7009cfa996973291502a2.tar.bz2
layout fix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kdatenavigator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 1474e4b..d62402f 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -90,64 +90,65 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
// Create the weeknumber labels
for( i = 0; i < 6; i++ ) {
weeknos[i] = new QLabel(this);
weeknos[i]->setAlignment(AlignCenter);
//weeknos[i]->setFont(QFont("Arial", 10));
if(!m_bShowWeekNums) {
weeknos[i]->hide();
}
weeknos[i]->installEventFilter(this);
topLayout->addWidget(weeknos[i],i+2,0);
}
daymatrix = new KODayMatrix( this, "KDateNavigator::DayMatrix");
daymatrix->setFrameStyle(QFrame::Panel|QFrame::Sunken);
daymatrix->setLineWidth(1);
connect( daymatrix, SIGNAL( selected( const KCal::DateList & ) ),
SIGNAL( datesSelected( const KCal::DateList & ) ) );
connect( daymatrix, SIGNAL( eventDropped( Event * ) ),
SIGNAL( eventDropped( Event * ) ) );
topLayout->addMultiCellWidget(daymatrix,2,7,1,7);
// read settings from configuration file.
updateConfig();
enableRollover(FollowMonth);
mySizeHint = sizeHintTwoButtons();
myFullSizeHint = sizeHintTwoButtons( 4 );
mFontChanged = false;
+ resize ( mySizeHint );
}
void KDateNavigator::changeFont ( QFont fo )
{
setFont( fo );
mNavigatorBar->resetFont( fo );
}
QFont KDateNavigator::yourFontHint( QSize si , bool *b)
{
QFont fo = KOPrefs::instance()->mDateNavigatorFont;
*b = false;
int fontPoint = fo.pointSize();
while ( fontPoint > 5 ) {
--fontPoint;
fo.setPointSize( fontPoint );
setFont( fo );
mFontChanged = true;
mNavigatorBar->resetFont( fo );
QSize sh = sizeHintTwoButtons( 2 );
//qDebug("fp %d %d %d %d %d", fontPoint, si.width() , sh.width() , si.height() , sh.height() );
if ( si.width() > sh.width() && si.height() > sh.height()) {
if ( si.width() / sh.width() == 1 ) {
if ( si.width() < sizeHintTwoButtons( 4 ).width())
continue;
}
*b = true;
//qDebug("fooooooooooooooooooooooouuuuund ");
break;
}
}
//qDebug("returnnnnnnnnnnnnnnnnnnn %d", fo.pointSize() );
return fo;
}