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) (side-by-side diff)
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)
painter->drawRect(0, 0, w, h);
painter->setPen(pen);
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());
+ }
+ */
}
void
KDateTable::keyPressEvent( QKeyEvent *e )
@@ -312,11 +316,17 @@ KDateTable::setFontSize(int size)
}
// ----- compare with a real wide number and add some space:
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 ");
+ }
}
void
KDateTable::contentsMousePressEvent(QMouseEvent *e)
@@ -442,9 +452,9 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
// -----
activeCol = -1;
activeRow = -1;
font=KGlobalSettings::generalFont();
- font.setPointSize(fontsize);
+ //font.setPointSize(fontsize);
setFont(font);
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
setFrameStyle(QFrame::NoFrame);
@@ -760,9 +770,9 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
// -----
activeCol = -1;
activeRow = -1;
font=KGlobalSettings::generalFont();
- font.setPointSize(fontsize);
+ //font.setPointSize(fontsize);
setFont(font);
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
setFrameStyle(QFrame::NoFrame);
@@ -781,9 +791,13 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
rect=metrics.boundingRect(QString::number( i ));
if(max.width()<rect.width()) max.setWidth(rect.width());
if(max.height()<rect.height()) max.setHeight(rect.height());
}
-
+ if ( QApplication::desktop()->width() > 640 ) {
+
+ max.setWidth(max.width()+6);
+ max.setHeight(max.height()+8);
+ }
}
QSize
KDateInternalWeekPicker::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()
{
int size = 12;
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" );
}
QRect KGlobalSettings::desktopGeometry( QWidget * )
{
@@ -33,9 +35,9 @@ QRect KGlobalSettings::desktopGeometry( QWidget * )
* see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
* @return true if single click mode, or false if double click mode.
**/
bool KGlobalSettings::singleClick()
-{
+{
KConfig *c = KGlobal::config();
KConfigGroupSaver cgs( c, "KDE" );
return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK);
}