summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/datenavigatorcontainer.cpp13
-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, 32 insertions, 14 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()
316 } 316 }
317 mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
317 //QBoxLayout * leftFrameLayout; 318 //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,
47 connectNavigatorView( mNavigatorView ); 47 connectNavigatorView( mNavigatorView );
48 //setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
48} 49}
@@ -177,2 +178,4 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
177 bool fontchange = false; 178 bool fontchange = false;
179 if ( horizontalCount == 1)
180 horizontalCount = size().width() / mNavigatorView->yourFullSizeHint().width();
178 QFont fo; 181 QFont fo;
@@ -183,3 +186,3 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
183 bool ok; 186 bool ok;
184 fo = mNavigatorView->yourFontHint( size() , &ok); 187 fo = mNavigatorView->yourFontHint( size() , &ok );
185 //mNavigatorView->resize( size() ); 188 //mNavigatorView->resize( size() );
@@ -187,3 +190,8 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
187 // return; 190 // return;
188 minSize = mNavigatorView->sizeHintTwoButtons(); 191 int butt = 2;
192 horizontalCount = size().width() / mNavigatorView->sizeHintTwoButtons( ).width();
193 if ( horizontalCount <= 1 )
194 minSize = mNavigatorView->sizeHintTwoButtons( 4 );
195 else
196 minSize = mNavigatorView->sizeHintTwoButtons();
189 verticalCount = size().height() / minSize.height(); 197 verticalCount = size().height() / minSize.height();
@@ -233,2 +241,3 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
233 } 241 }
242 //qDebug("COUNT %d ", mExtraViews.count());
234 int height = size().height() / verticalCount; 243 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 )
118 mySizeHint = sizeHintTwoButtons(); 118 mySizeHint = sizeHintTwoButtons();
119 myFullSizeHint = sizeHintTwoButtons( 4 );
119 mFontChanged = false; 120 mFontChanged = false;
@@ -136,5 +137,9 @@ QFont KDateNavigator::yourFontHint( QSize si , bool *b)
136 mNavigatorBar->resetFont( fo ); 137 mNavigatorBar->resetFont( fo );
137 QSize sh = sizeHintTwoButtons(); 138 QSize sh = sizeHintTwoButtons( 2 );
138 //qDebug("fp %d %d %d %d %d", fontPoint, si.width() , sh.width() , si.height() , sh.height() ); 139 //qDebug("fp %d %d %d %d %d", fontPoint, si.width() , sh.width() , si.height() , sh.height() );
139 if ( si.width() > sh.width() && si.height() > sh.height()) { 140 if ( si.width() > sh.width() && si.height() > sh.height()) {
141 if ( si.width() / sh.width() == 1 ) {
142 if ( si.width() < sizeHintTwoButtons( 4 ).width())
143 continue;
144 }
140 *b = true; 145 *b = true;
@@ -159,3 +164,3 @@ QSize KDateNavigator::sizeHint() const
159} 164}
160QSize KDateNavigator::sizeHintTwoButtons() const 165QSize KDateNavigator::sizeHintTwoButtons( int butnum ) const
161{ 166{
@@ -163,3 +168,3 @@ QSize KDateNavigator::sizeHintTwoButtons() const
163 QSize day = daymatrix->sizeHint(); 168 QSize day = daymatrix->sizeHint();
164 QSize nav = mNavigatorBar->sizeHintTwoButtons(); 169 QSize nav = mNavigatorBar->sizeHintTwoButtons( butnum );
165 int wid = fm.width( "30") + day.width()+3; 170 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
66 void setMonthSignalOffset ( int off ) { mMonthSignalOffset = off%12;} 66 void setMonthSignalOffset ( int off ) { mMonthSignalOffset = off%12;}
67 QSize yourSizeHint() { return mySizeHint; } 67 QSize yourSizeHint()const { return mySizeHint; };
68 QSize yourFullSizeHint() const { return myFullSizeHint;};
68 QFont yourFontHint( QSize , bool * b); 69 QFont yourFontHint( QSize , bool * b);
@@ -72,3 +73,3 @@ class KDateNavigator: public QFrame
72 QSize sizeHint() const; 73 QSize sizeHint() const;
73 QSize sizeHintTwoButtons() const; 74 QSize sizeHintTwoButtons( int butnum = 2 ) const;
74 void changeFont ( QFont fo ); 75 void changeFont ( QFont fo );
@@ -125,2 +126,3 @@ class KDateNavigator: public QFrame
125 QSize mySizeHint; 126 QSize mySizeHint;
127 QSize myFullSizeHint;
126 bool mFontChanged; 128 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)
416 //mRepaintTimer->start( 100 ); 416 //mRepaintTimer->start( 100 );
417 mUpdateTimer->start( 100 ); 417 //updateViewTimed();
418 mUpdateTimer->start( 20 );
418#else 419#else
@@ -845,4 +846,4 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
845 } 846 }
846 if ( col == 0 ) 847
847 addCol = 1; 848 addCol += 1;
848 p.drawRect(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight+1); 849 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)
307 int wid = fm.width( text() ); 307 int wid = fm.width( text() );
308 p->drawLine( x, heihei/2 ,x+wid, heihei/2 ); 308 p->drawLine( x, heihei/2-1 ,x+wid, heihei/2-1 );
309 } 309 }
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
177} 177}
178QSize NavigatorBar::sizeHintTwoButtons() const 178QSize NavigatorBar::sizeHintTwoButtons( int butNum ) const
179{ 179{
180 return QSize ( mCurrentMinWid + 2 * mCurrentButtonMinWid , mCurrentHei ); 180 return QSize ( mCurrentMinWid + butNum * mCurrentButtonMinWid , mCurrentHei );
181} 181}
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
43 QSize sizeHint() const; 43 QSize sizeHint() const;
44 QSize sizeHintTwoButtons() const; 44 QSize sizeHintTwoButtons( int butNum = 2 ) const;
45 45