summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2005-02-08 14:12:31 (UTC)
committer zautrix <zautrix>2005-02-08 14:12:31 (UTC)
commit41111b332c2a5f1b2ec152df309b9199f5e9c921 (patch) (unidiff)
tree3a2e5c5a25cdb52f542b2fe84a03f94599be2fe3 /microkde
parent9927a063f34bb826a4b5f7f7029308c9c66acbce (diff)
downloadkdepimpi-41111b332c2a5f1b2ec152df309b9199f5e9c921.zip
kdepimpi-41111b332c2a5f1b2ec152df309b9199f5e9c921.tar.gz
kdepimpi-41111b332c2a5f1b2ec152df309b9199f5e9c921.tar.bz2
fixes
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdatetbl.cpp26
-rw-r--r--microkde/kglobalsettings.cpp10
2 files changed, 26 insertions, 10 deletions
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp
index fce0e5a..e827412 100644
--- a/microkde/kdatetbl.cpp
+++ b/microkde/kdatetbl.cpp
@@ -197,10 +197,14 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
197 painter->drawRect(0, 0, w, h); 197 painter->drawRect(0, 0, w, h);
198 painter->setPen(pen); 198 painter->setPen(pen);
199 painter->drawText(0, 0, w, h, AlignCenter, text, -1, &rect); 199 painter->drawText(0, 0, w, h, AlignCenter, text, -1, &rect);
200 } 200 }
201 if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width()); 201 /*
202 if(rect.height()>maxCell.height()) maxCell.setHeight(rect.height()); 202 if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width());
203 if(rect.height()>maxCell.height()) {
204 maxCell.setHeight(rect.height());
205 }
206 */
203} 207}
204 208
205void 209void
206KDateTable::keyPressEvent( QKeyEvent *e ) 210KDateTable::keyPressEvent( QKeyEvent *e )
@@ -312,11 +316,17 @@ KDateTable::setFontSize(int size)
312 } 316 }
313 // ----- compare with a real wide number and add some space: 317 // ----- compare with a real wide number and add some space:
314 rect=metrics.boundingRect(QString::fromLatin1("88")); 318 rect=metrics.boundingRect(QString::fromLatin1("88"));
315 maxCell.setWidth(QMAX(maxCell.width()+2, rect.width())); 319 maxCell.setWidth(QMAX(maxCell.width()+2, rect.width()));
320#ifdef DESKTOP_VERSION
321 maxCell.setHeight(QMAX(maxCell.height()+8, rect.height()));
322#else
316 maxCell.setHeight(QMAX(maxCell.height()+4, rect.height())); 323 maxCell.setHeight(QMAX(maxCell.height()+4, rect.height()));
317 if ( maxCell.width() * 1000 / maxCell.height() > 1900 ) 324#endif
325 if ( maxCell.width() * 1000 / maxCell.height() > 1900 ) {
318 maxCell.setHeight(maxCell.width() * 1000 / 1900 ); 326 maxCell.setHeight(maxCell.width() * 1000 / 1900 );
327 qDebug("setmax ");
328 }
319} 329}
320 330
321void 331void
322KDateTable::contentsMousePressEvent(QMouseEvent *e) 332KDateTable::contentsMousePressEvent(QMouseEvent *e)
@@ -442,9 +452,9 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
442 // ----- 452 // -----
443 activeCol = -1; 453 activeCol = -1;
444 activeRow = -1; 454 activeRow = -1;
445 font=KGlobalSettings::generalFont(); 455 font=KGlobalSettings::generalFont();
446 font.setPointSize(fontsize); 456 //font.setPointSize(fontsize);
447 setFont(font); 457 setFont(font);
448 setHScrollBarMode(AlwaysOff); 458 setHScrollBarMode(AlwaysOff);
449 setVScrollBarMode(AlwaysOff); 459 setVScrollBarMode(AlwaysOff);
450 setFrameStyle(QFrame::NoFrame); 460 setFrameStyle(QFrame::NoFrame);
@@ -760,9 +770,9 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
760 // ----- 770 // -----
761 activeCol = -1; 771 activeCol = -1;
762 activeRow = -1; 772 activeRow = -1;
763 font=KGlobalSettings::generalFont(); 773 font=KGlobalSettings::generalFont();
764 font.setPointSize(fontsize); 774 //font.setPointSize(fontsize);
765 setFont(font); 775 setFont(font);
766 setHScrollBarMode(AlwaysOff); 776 setHScrollBarMode(AlwaysOff);
767 setVScrollBarMode(AlwaysOff); 777 setVScrollBarMode(AlwaysOff);
768 setFrameStyle(QFrame::NoFrame); 778 setFrameStyle(QFrame::NoFrame);
@@ -781,9 +791,13 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
781 rect=metrics.boundingRect(QString::number( i )); 791 rect=metrics.boundingRect(QString::number( i ));
782 if(max.width()<rect.width()) max.setWidth(rect.width()); 792 if(max.width()<rect.width()) max.setWidth(rect.width());
783 if(max.height()<rect.height()) max.setHeight(rect.height()); 793 if(max.height()<rect.height()) max.setHeight(rect.height());
784 } 794 }
785 795 if ( QApplication::desktop()->width() > 640 ) {
796
797 max.setWidth(max.width()+6);
798 max.setHeight(max.height()+8);
799 }
786} 800}
787 801
788QSize 802QSize
789KDateInternalWeekPicker::sizeHint() const 803KDateInternalWeekPicker::sizeHint() const
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index 2fff8fc..30e793f 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -9,18 +9,20 @@ QFont KGlobalSettings::generalFont()
9{ 9{
10 int size = 12; 10 int size = 12;
11 if (QApplication::desktop()->width() < 480 ) 11 if (QApplication::desktop()->width() < 480 )
12 size = 10; 12 size = 10;
13 return QFont("helvetica",size); 13 QFont f = QApplication::font();
14 f.setPointSize( size );
15 return f;
14} 16}
15QFont KGlobalSettings::toolBarFont() 17QFont KGlobalSettings::toolBarFont()
16{ 18{
17 return QFont("helevetica",12); 19 return QApplication::font();
18} 20}
19 21
20QColor KGlobalSettings::toolBarHighlightColor() 22QColor KGlobalSettings::toolBarHighlightColor()
21{ 23{
22 return QColor("black"); 24 return QColor( "black" );
23} 25}
24 26
25QRect KGlobalSettings::desktopGeometry( QWidget * ) 27QRect KGlobalSettings::desktopGeometry( QWidget * )
26{ 28{
@@ -33,9 +35,9 @@ QRect KGlobalSettings::desktopGeometry( QWidget * )
33 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html 35 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
34 * @return true if single click mode, or false if double click mode. 36 * @return true if single click mode, or false if double click mode.
35 **/ 37 **/
36bool KGlobalSettings::singleClick() 38bool KGlobalSettings::singleClick()
37{ 39{
38 KConfig *c = KGlobal::config(); 40 KConfig *c = KGlobal::config();
39 KConfigGroupSaver cgs( c, "KDE" ); 41 KConfigGroupSaver cgs( c, "KDE" );
40 return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); 42 return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK);
41} 43}