summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-22 09:31:41 (UTC)
committer zautrix <zautrix>2005-03-22 09:31:41 (UTC)
commitd18536f758f4cf64d5c59d7a7c814e6ff12f9a3d (patch) (side-by-side diff)
tree326186e1a65db5a9ba174fa2bdbd3dffc7f23b9f
parent8888389a4511e0bda23774b993dcfdeb7f837c31 (diff)
downloadkdepimpi-d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d.zip
kdepimpi-d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d.tar.gz
kdepimpi-d18536f758f4cf64d5c59d7a7c814e6ff12f9a3d.tar.bz2
layout fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/datenavigatorcontainer.cpp9
-rw-r--r--korganizer/kdatenavigator.cpp11
-rw-r--r--korganizer/kdatenavigator.h6
-rw-r--r--korganizer/kodaymatrix.cpp7
-rw-r--r--korganizer/komonthview.cpp2
-rw-r--r--korganizer/navigatorbar.cpp4
-rw-r--r--korganizer/navigatorbar.h2
8 files changed, 30 insertions, 12 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 90b36ac..8100e25 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -316,2 +316,3 @@ void CalendarView::init()
}
+ mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
//QBoxLayout * leftFrameLayout;
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index b147427..ab0dd50 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -47,2 +47,3 @@ DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
connectNavigatorView( mNavigatorView );
+ //setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
}
@@ -177,2 +178,4 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
bool fontchange = false;
+ if ( horizontalCount == 1)
+ horizontalCount = size().width() / mNavigatorView->yourFullSizeHint().width();
QFont fo;
@@ -187,2 +190,7 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
// return;
+ int butt = 2;
+ horizontalCount = size().width() / mNavigatorView->sizeHintTwoButtons( ).width();
+ if ( horizontalCount <= 1 )
+ minSize = mNavigatorView->sizeHintTwoButtons( 4 );
+ else
minSize = mNavigatorView->sizeHintTwoButtons();
@@ -233,2 +241,3 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
}
+ //qDebug("COUNT %d ", mExtraViews.count());
int height = size().height() / verticalCount;
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index fe83e09..231095f 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -118,2 +118,3 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
mySizeHint = sizeHintTwoButtons();
+ myFullSizeHint = sizeHintTwoButtons( 4 );
mFontChanged = false;
@@ -136,5 +137,9 @@ QFont KDateNavigator::yourFontHint( QSize si , bool *b)
mNavigatorBar->resetFont( fo );
- QSize sh = sizeHintTwoButtons();
+ 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;
@@ -159,3 +164,3 @@ QSize KDateNavigator::sizeHint() const
}
-QSize KDateNavigator::sizeHintTwoButtons() const
+QSize KDateNavigator::sizeHintTwoButtons( int butnum ) const
{
@@ -163,3 +168,3 @@ QSize KDateNavigator::sizeHintTwoButtons() const
QSize day = daymatrix->sizeHint();
- QSize nav = mNavigatorBar->sizeHintTwoButtons();
+ QSize nav = mNavigatorBar->sizeHintTwoButtons( butnum );
int wid = fm.width( "30") + day.width()+3;
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 77b9b7c..10bc1be 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -66,3 +66,4 @@ class KDateNavigator: public QFrame
void setMonthSignalOffset ( int off ) { mMonthSignalOffset = off%12;}
- QSize yourSizeHint() { return mySizeHint; }
+ QSize yourSizeHint()const { return mySizeHint; };
+ QSize yourFullSizeHint() const { return myFullSizeHint;};
QFont yourFontHint( QSize , bool * b);
@@ -72,3 +73,3 @@ class KDateNavigator: public QFrame
QSize sizeHint() const;
- QSize sizeHintTwoButtons() const;
+ QSize sizeHintTwoButtons( int butnum = 2 ) const;
void changeFont ( QFont fo );
@@ -125,2 +126,3 @@ class KDateNavigator: public QFrame
QSize mySizeHint;
+ QSize myFullSizeHint;
bool mFontChanged;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 120bc89..a2e0ae0 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -416,3 +416,4 @@ void KODayMatrix::updateView(QDate actdate)
//mRepaintTimer->start( 100 );
- mUpdateTimer->start( 100 );
+ //updateViewTimed();
+ mUpdateTimer->start( 20 );
#else
@@ -845,4 +846,4 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
}
- if ( col == 0 )
- addCol = 1;
+
+ addCol += 1;
p.drawRect(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight+1);
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 76982b4..9fd1f68 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -307,3 +307,3 @@ void MonthViewItem::paint(QPainter *p)
int wid = fm.width( text() );
- p->drawLine( x, heihei/2 ,x+wid, heihei/2 );
+ p->drawLine( x, heihei/2-1 ,x+wid, heihei/2-1 );
}
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index 1b4ee52..06f5ef8 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -177,5 +177,5 @@ QSize NavigatorBar::sizeHint() const
}
-QSize NavigatorBar::sizeHintTwoButtons() const
+QSize NavigatorBar::sizeHintTwoButtons( int butNum ) const
{
- return QSize ( mCurrentMinWid + 2 * mCurrentButtonMinWid , mCurrentHei );
+ return QSize ( mCurrentMinWid + butNum * mCurrentButtonMinWid , mCurrentHei );
}
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index bf6d173..9ccef14 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -43,3 +43,3 @@ class NavigatorBar: public QWidget
QSize sizeHint() const;
- QSize sizeHintTwoButtons() const;
+ QSize sizeHintTwoButtons( int butNum = 2 ) const;