summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
authorzautrix <zautrix>2005-04-01 19:05:18 (UTC)
committer zautrix <zautrix>2005-04-01 19:05:18 (UTC)
commit1022d8763a5185c74d1fb1fba9857d6e3afd9ff5 (patch) (unidiff)
tree116b7ac7aef10e27c20ce30f3bae548ebde84da0 /korganizer/koagendaview.cpp
parentedc032c21ae3788d02a632ea8066e4ac5a4feedb (diff)
downloadkdepimpi-1022d8763a5185c74d1fb1fba9857d6e3afd9ff5.zip
kdepimpi-1022d8763a5185c74d1fb1fba9857d6e3afd9ff5.tar.gz
kdepimpi-1022d8763a5185c74d1fb1fba9857d6e3afd9ff5.tar.bz2
fixes
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 072d464..99f547a 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -131,6 +131,3 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
131 QString suffix; 131 QString suffix;
132 int tW = fm.width("24:00i"); 132 int timeHeight = fm.ascent();
133 int timeHeight = fm.height();
134 //timeHeight -= (timeHeight/4-2);
135 int borderWidth = 0;
136 QFont nFont = p->font(); 133 QFont nFont = p->font();
@@ -139,4 +136,3 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
139 suffix = "00"; 136 suffix = "00";
140 else 137
141 borderWidth = 0;
142 if ( timeHeight > mCellHeight ) { 138 if ( timeHeight > mCellHeight ) {
@@ -147,3 +143,3 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
147 fm = QFontMetrics( nFont ); 143 fm = QFontMetrics( nFont );
148 if ( fm.height() < mCellHeight ) 144 if ( fm.ascent() < mCellHeight )
149 break; 145 break;
@@ -152,4 +148,3 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
152 fm = QFontMetrics( nFont ); 148 fm = QFontMetrics( nFont );
153 borderWidth = 4; 149 timeHeight = fm.ascent();
154 timeHeight = fm.height();
155 } 150 }
@@ -157,9 +152,10 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
157 QFont sFont = nFont; 152 QFont sFont = nFont;
158 sFont.setPointSize( sFont.pointSize()/2+2 ); 153 sFont.setPointSize( sFont.pointSize()/2 );
159 QFontMetrics fmS( sFont ); 154 QFontMetrics fmS( sFont );
160 int sHei = fmS.height(); 155 int sHei = fmS.ascent() ;
161 //sHei -= (sHei/4-2); 156 //sHei -= (sHei/4-2);
162 int startW = this->width() - frameWidth()-1; 157 int startW = this->width() - 2*frameWidth()-1;
158 int tw2 = fmS.width(suffix);
163 while (y < cy + ch) { 159 while (y < cy + ch) {
164 p->drawLine(cx,y,cx+tW,y); 160 p->drawLine(cx,y,cw,y);
165 hour.setNum(cell); 161 hour.setNum(cell);
@@ -173,2 +169,3 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
173 if (cell > 12) hour.setNum(cell - 12); 169 if (cell > 12) hour.setNum(cell - 12);
170 tw2 = fmS.width(suffix);
174 } 171 }
@@ -177,3 +174,2 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
177 int timeWidth = fm.width(hour); 174 int timeWidth = fm.width(hour);
178 int tw2 = fm.width(suffix);
179 int offset = startW - timeWidth - tw2 ; 175 int offset = startW - timeWidth - tw2 ;
@@ -213,8 +209,8 @@ void TimeLabels::updateConfig()
213 setFont(KOPrefs::instance()->mTimeBarFont); 209 setFont(KOPrefs::instance()->mTimeBarFont);
214 QString test = "88:88"; 210 QString test = "20oo";
215 if (KGlobal::locale()->use12Clock()) 211 if (KGlobal::locale()->use12Clock())
216 test += "i"; 212 test = "12mi";
217 mMiniWidth = fontMetrics().width(test) + frameWidth()*2 +1 ; 213 mMiniWidth = fontMetrics().width(test) + frameWidth()*2 +1 ;
218 // update geometry restrictions based on new settings 214 // update geometry restrictions based on new settings
219 setFixedWidth(minimumWidth()); 215 setFixedWidth( mMiniWidth );
220 216