summaryrefslogtreecommitdiffabout
path: root/microkde
Side-by-side diff
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
@@ -199,6 +199,10 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
painter->drawText(0, 0, w, h, AlignCenter, text, -1, &rect);
}
- if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width());
- if(rect.height()>maxCell.height()) maxCell.setHeight(rect.height());
+ /*
+ if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width());
+ if(rect.height()>maxCell.height()) {
+ maxCell.setHeight(rect.height());
+ }
+ */
}
@@ -314,7 +318,13 @@ KDateTable::setFontSize(int size)
rect=metrics.boundingRect(QString::fromLatin1("88"));
maxCell.setWidth(QMAX(maxCell.width()+2, rect.width()));
+#ifdef DESKTOP_VERSION
+ maxCell.setHeight(QMAX(maxCell.height()+8, rect.height()));
+#else
maxCell.setHeight(QMAX(maxCell.height()+4, rect.height()));
- if ( maxCell.width() * 1000 / maxCell.height() > 1900 )
+#endif
+ if ( maxCell.width() * 1000 / maxCell.height() > 1900 ) {
maxCell.setHeight(maxCell.width() * 1000 / 1900 );
+ qDebug("setmax ");
+ }
}
@@ -444,5 +454,5 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
activeRow = -1;
font=KGlobalSettings::generalFont();
- font.setPointSize(fontsize);
+ //font.setPointSize(fontsize);
setFont(font);
setHScrollBarMode(AlwaysOff);
@@ -762,5 +772,5 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
activeRow = -1;
font=KGlobalSettings::generalFont();
- font.setPointSize(fontsize);
+ //font.setPointSize(fontsize);
setFont(font);
setHScrollBarMode(AlwaysOff);
@@ -783,5 +793,9 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
if(max.height()<rect.height()) max.setHeight(rect.height());
}
-
+ if ( QApplication::desktop()->width() > 640 ) {
+
+ max.setWidth(max.width()+6);
+ max.setHeight(max.height()+8);
+ }
}
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index 2fff8fc..30e793f 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -11,14 +11,16 @@ QFont KGlobalSettings::generalFont()
if (QApplication::desktop()->width() < 480 )
size = 10;
- return QFont("helvetica",size);
+ QFont f = QApplication::font();
+ f.setPointSize( size );
+ return f;
}
QFont KGlobalSettings::toolBarFont()
{
- return QFont("helevetica",12);
+ return QApplication::font();
}
QColor KGlobalSettings::toolBarHighlightColor()
{
- return QColor("black");
+ return QColor( "black" );
}
@@ -35,5 +37,5 @@ QRect KGlobalSettings::desktopGeometry( QWidget * )
**/
bool KGlobalSettings::singleClick()
-{
+{
KConfig *c = KGlobal::config();
KConfigGroupSaver cgs( c, "KDE" );