summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp31
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/komonthview.cpp5
-rw-r--r--korganizer/koprefs.cpp28
-rw-r--r--korganizer/ktimeedit.cpp6
-rw-r--r--korganizer/mainwindow.cpp27
-rw-r--r--korganizer/navigatorbar.cpp3
-rw-r--r--libkdepim/kdatepicker.cpp10
-rw-r--r--microkde/kdatetbl.cpp22
-rw-r--r--microkde/kglobalsettings.cpp6
10 files changed, 91 insertions, 48 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 0fbaa9a..a9de65a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2457,23 +2457,13 @@ void CalendarView::beamDone( Ir *ir )
2457 topLevelWidget()->raise(); 2457 topLevelWidget()->raise();
2458} 2458}
2459 2459
2460void CalendarView::moveIncidence(Incidence * inc ) 2460void CalendarView::moveIncidence(Incidence * inc )
2461{ 2461{
2462 if ( !inc ) return; 2462 if ( !inc ) return;
2463 // qDebug("showDatePickerForIncidence( ) "); 2463 showDatePickerPopup();
2464 if ( mDateFrame->isVisible() )
2465 mDateFrame->hide();
2466 else {
2467 int w =mDatePicker->sizeHint().width()+2*mDateFrame->lineWidth() ;
2468 int h = mDatePicker->sizeHint().height()+2*mDateFrame->lineWidth() ;
2469 int dw = QApplication::desktop()->width();
2470 int dh = QApplication::desktop()->height();
2471 mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2472 mDateFrame->show();
2473 }
2474 mDatePickerMode = 2; 2464 mDatePickerMode = 2;
2475 mMoveIncidence = inc ; 2465 mMoveIncidence = inc ;
2476 QDate da; 2466 QDate da;
2477 if ( mMoveIncidence->type() == "Todo" ) { 2467 if ( mMoveIncidence->type() == "Todo" ) {
2478 Todo * to = (Todo *) mMoveIncidence; 2468 Todo * to = (Todo *) mMoveIncidence;
2479 if ( to->hasDueDate() ) 2469 if ( to->hasDueDate() )
@@ -2484,25 +2474,38 @@ void CalendarView::moveIncidence(Incidence * inc )
2484 da = mMoveIncidence->dtStart().date(); 2474 da = mMoveIncidence->dtStart().date();
2485 } 2475 }
2486 //PENDING set date for recurring incidence to date of recurrence 2476 //PENDING set date for recurring incidence to date of recurrence
2487 //mMoveIncidenceOldDate; 2477 //mMoveIncidenceOldDate;
2488 mDatePicker->setDate( da ); 2478 mDatePicker->setDate( da );
2489} 2479}
2490void CalendarView::showDatePicker( ) 2480void CalendarView::showDatePickerPopup()
2491{ 2481{
2492 //qDebug("CalendarView::showDatePicker( ) ");
2493 if ( mDateFrame->isVisible() ) 2482 if ( mDateFrame->isVisible() )
2494 mDateFrame->hide(); 2483 mDateFrame->hide();
2495 else { 2484 else {
2485 int offX = 0, offY = 0;
2486#ifdef DESKTOP_VERSION
2487 int w =mDatePicker->sizeHint().width() ;
2488 int h = mDatePicker->sizeHint().height() ;
2489 int dw = topLevelWidget()->width();
2490 int dh = topLevelWidget()->height();
2491 offX = topLevelWidget()->x();
2492 offY = topLevelWidget()->y();
2493#else
2496 int w =mDatePicker->sizeHint().width() ; 2494 int w =mDatePicker->sizeHint().width() ;
2497 int h = mDatePicker->sizeHint().height() ; 2495 int h = mDatePicker->sizeHint().height() ;
2498 int dw = QApplication::desktop()->width(); 2496 int dw = QApplication::desktop()->width();
2499 int dh = QApplication::desktop()->height(); 2497 int dh = QApplication::desktop()->height();
2500 mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2498#endif
2499 mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h );
2501 mDateFrame->show(); 2500 mDateFrame->show();
2502 } 2501 }
2502}
2503void CalendarView::showDatePicker( )
2504{
2505 showDatePickerPopup();
2503 mDatePickerMode = 1; 2506 mDatePickerMode = 1;
2504 mDatePicker->setDate( mNavigator->selectedDates().first() ); 2507 mDatePicker->setDate( mNavigator->selectedDates().first() );
2505} 2508}
2506 2509
2507void CalendarView::showEventEditor() 2510void CalendarView::showEventEditor()
2508{ 2511{
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 731298d..e626ea3 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -439,12 +439,13 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
439 bool importQtopia( const QString &categoriesFile, 439 bool importQtopia( const QString &categoriesFile,
440 const QString &datebookFile, 440 const QString &datebookFile,
441 const QString &tasklistFile ); 441 const QString &tasklistFile );
442 void syncExternal( int mode ); 442 void syncExternal( int mode );
443 void slotSelectPickerDate( QDate ) ; 443 void slotSelectPickerDate( QDate ) ;
444 void showDatePicker( ) ; 444 void showDatePicker( ) ;
445 void showDatePickerPopup() ;
445 void moveIncidence(Incidence *) ; 446 void moveIncidence(Incidence *) ;
446 void beamIncidence(Incidence *) ; 447 void beamIncidence(Incidence *) ;
447 void beamCalendar() ; 448 void beamCalendar() ;
448 void beamFilteredCalendar() ; 449 void beamFilteredCalendar() ;
449 void beamIncidenceList(QPtrList<Incidence>) ; 450 void beamIncidenceList(QPtrList<Incidence>) ;
450 void manageCategories(); 451 void manageCategories();
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 6ae4c6f..02d2585 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -922,14 +922,17 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
922 else 922 else
923 mWidStack->raiseWidget( mMonthView ); 923 mWidStack->raiseWidget( mMonthView );
924 924
925 emit incidenceSelected( 0 ); 925 emit incidenceSelected( 0 );
926#ifndef DESKTOP_VERSION 926#ifndef DESKTOP_VERSION
927 resize( QApplication::desktop()->size() ); 927 resize( QApplication::desktop()->size() );
928 computeLayout(); 928#else
929 resize(640, 480 );
929#endif 930#endif
931 computeLayout();
932
930} 933}
931 934
932KOMonthView::~KOMonthView() 935KOMonthView::~KOMonthView()
933{ 936{
934 delete mContextMenu; 937 delete mContextMenu;
935} 938}
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 576c265..5bfe2a1 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -33,12 +33,13 @@
33#include <qfont.h> 33#include <qfont.h>
34#include <qcolor.h> 34#include <qcolor.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <stdlib.h> 36#include <stdlib.h>
37 37
38#include <kglobal.h> 38#include <kglobal.h>
39#include <kglobalsettings.h>
39#include <kconfig.h> 40#include <kconfig.h>
40#include <klocale.h> 41#include <klocale.h>
41#include <kdebug.h> 42#include <kdebug.h>
42#include <kemailsettings.h> 43#include <kemailsettings.h>
43#include <kstaticdeleter.h> 44#include <kstaticdeleter.h>
44#include <libkdepim/kpimglobalprefs.h> 45#include <libkdepim/kpimglobalprefs.h>
@@ -59,19 +60,22 @@ KOPrefs::KOPrefs() :
59 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); 60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255);
60 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); 61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128);
61 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); 62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160);
62 QColor defaultTodoDueTodayColor = QColor(255,220,100); 63 QColor defaultTodoDueTodayColor = QColor(255,220,100);
63 QColor defaultTodoOverdueColor = QColor(255,153,125); 64 QColor defaultTodoOverdueColor = QColor(255,153,125);
64 65
66 /*
65 mTimeBarFont = QFont("helvetica",10);//,QFont::Bold); 67 mTimeBarFont = QFont("helvetica",10);//,QFont::Bold);
66 mDefaultViewFont = QFont("helvetica",10); 68 mDefaultViewFont = QFont("helvetica",10);
67 mDefaultMonthViewFont = QFont("helvetica",8); 69 mDefaultMonthViewFont = QFont("helvetica",8);
68 mMarcusBainsFont= QFont("helvetica",10); 70 mMarcusBainsFont= QFont("helvetica",10);
69 mDateNavigatorFont= QFont("helvetica",10, QFont::Bold); 71 mDateNavigatorFont= QFont("helvetica",10, QFont::Bold);
70 mEditBoxFont = QFont("helvetica",12); 72 mEditBoxFont = QFont("helvetica",12);
71 mJornalViewFont = QFont("helvetica",12); 73 mJornalViewFont = QFont("helvetica",12);
74 */
75
72 76
73 KPrefs::setCurrentGroup("General"); 77 KPrefs::setCurrentGroup("General");
74 78
75 79
76 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 80 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
77 81
@@ -153,24 +157,24 @@ KOPrefs::KOPrefs() :
153 KPrefs::setCurrentGroup("Calendar"); 157 KPrefs::setCurrentGroup("Calendar");
154 158
155 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); 159 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar);
156 160
157 KPrefs::setCurrentGroup("Fonts"); 161 KPrefs::setCurrentGroup("Fonts");
158 // qDebug(" KPrefs::setCurrentGroup(Fonts); "); 162 // qDebug(" KPrefs::setCurrentGroup(Fonts); ");
159 addItemFont("TimeBar Font",&mTimeBarFont); 163 addItemFont("TimeBar Font",&mTimeBarFont,KGlobalSettings::generalFont() );
160 addItemFont("MonthView Font",&mMonthViewFont); 164 addItemFont("MonthView Font",&mMonthViewFont,KGlobalSettings::generalFont());
161 addItemFont("AgendaView Font",&mAgendaViewFont); 165 addItemFont("AgendaView Font",&mAgendaViewFont,KGlobalSettings::generalFont());
162 addItemFont("MarcusBains Font",&mMarcusBainsFont); 166 addItemFont("MarcusBains Font",&mMarcusBainsFont,KGlobalSettings::generalFont());
163 addItemFont("TimeLabels Font",&mTimeLabelsFont); 167 addItemFont("TimeLabels Font",&mTimeLabelsFont,KGlobalSettings::generalFont());
164 addItemFont("TodoView Font",&mTodoViewFont); 168 addItemFont("TodoView Font",&mTodoViewFont,KGlobalSettings::generalFont());
165 addItemFont("ListView Font",&mListViewFont); 169 addItemFont("ListView Font",&mListViewFont,KGlobalSettings::generalFont());
166 addItemFont("DateNavigator Font",&mDateNavigatorFont); 170 addItemFont("DateNavigator Font",&mDateNavigatorFont,KGlobalSettings::generalFont());
167 addItemFont("EditBox Font",&mEditBoxFont); 171 addItemFont("EditBox Font",&mEditBoxFont,KGlobalSettings::generalFont());
168 addItemFont("JournalView Font",&mJornalViewFont); 172 addItemFont("JournalView Font",&mJornalViewFont,KGlobalSettings::generalFont());
169 addItemFont("WhatsNextView Font",&mWhatsNextFont); 173 addItemFont("WhatsNextView Font",&mWhatsNextFont,KGlobalSettings::generalFont());
170 addItemFont("EventView Font",&mEventViewFont); 174 addItemFont("EventView Font",&mEventViewFont,KGlobalSettings::generalFont());
171 175
172 KPrefs::setCurrentGroup("RemoteSyncing"); 176 KPrefs::setCurrentGroup("RemoteSyncing");
173 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 177 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
174 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 178 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
175 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 179 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
176 addItemInt("LastSyncTime",&mLastSyncTime,0); 180 addItemInt("LastSyncTime",&mLastSyncTime,0);
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp
index 5222ac9..61a0931 100644
--- a/korganizer/ktimeedit.cpp
+++ b/korganizer/ktimeedit.cpp
@@ -46,15 +46,17 @@
46// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help. 46// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help.
47KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name) 47KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name)
48 : QComboBox(TRUE, parent, name) 48 : QComboBox(TRUE, parent, name)
49{ 49{
50 setInsertionPolicy(NoInsertion); 50 setInsertionPolicy(NoInsertion);
51 mFlagKeyPressed = false; 51 mFlagKeyPressed = false;
52 52 if ( QApplication::desktop()->height() <= 480 ) {
53 if ( QApplication::desktop()->width() < 650 )
54 setSizeLimit ( 6 ); 53 setSizeLimit ( 6 );
54 } else {
55 setSizeLimit ( 12 );
56 }
55 mTime = qt; 57 mTime = qt;
56 58
57// mNoTimeString = i18n("No Time"); 59// mNoTimeString = i18n("No Time");
58// insertItem( mNoTimeString ); 60// insertItem( mNoTimeString );
59 61
60 // Fill combo box with selection of times in localized format. 62 // Fill combo box with selection of times in localized format.
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 7810bf9..61c39f5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -2027,22 +2027,39 @@ void MainWindow::printCal()
2027#include "libkdepim/kdatepicker.h" 2027#include "libkdepim/kdatepicker.h"
2028#include <kdatetbl.h> 2028#include <kdatetbl.h>
2029void MainWindow::weekAction() 2029void MainWindow::weekAction()
2030{ 2030{
2031 int month; 2031 int month;
2032 KPopupFrame* popup = new KPopupFrame(this); 2032 KPopupFrame* popup = new KPopupFrame(this);
2033 int size = 12; 2033 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(10, popup);
2034 if ( QApplication::desktop()->width() >= 480 )
2035 size = 18;
2036 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(size, popup);
2037 // ----- 2034 // -----
2038 picker->resize(picker->sizeHint()); 2035 picker->resize(picker->sizeHint());
2039 popup->setMainWidget(picker); 2036 popup->setMainWidget(picker);
2040 picker->setFocus(); 2037 picker->setFocus();
2041 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 2038 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
2042 if(popup->exec(iconToolBar->mapToGlobal(QPoint(0, iconToolBar->height())))) 2039 int x = 0;
2040 int y = iconToolBar->height();
2041 int dX = 0;
2042 int dY = 0;
2043 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2044 if ( iconToolBar->y() > height()/2 ) {
2045 dY = iconToolBar->height()+picker->sizeHint().height();
2046 y = 0;
2047 }
2048 } else {
2049 if ( iconToolBar->x() > width()/2 ) { // right side
2050 x=0;
2051 dX= iconToolBar->width()+picker->sizeHint().width();
2052 y = 0;
2053 } else {
2054 x= iconToolBar->width();
2055 y = 0;
2056 }
2057 }
2058 qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2059 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))))
2043 { 2060 {
2044 month = picker->getResult(); 2061 month = picker->getResult();
2045 emit selectWeek ( month ); 2062 emit selectWeek ( month );
2046 //qDebug("weekSelected %d ", month); 2063 //qDebug("weekSelected %d ", month);
2047 } 2064 }
2048 delete popup; 2065 delete popup;
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index f05e6f6..4a31c77 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -37,12 +37,13 @@
37#include <kiconloader.h> 37#include <kiconloader.h>
38#include "libkdepim/kdatepicker.h" 38#include "libkdepim/kdatepicker.h"
39#include <knotifyclient.h> 39#include <knotifyclient.h>
40#include "kdatetbl.h" 40#include "kdatetbl.h"
41 41
42#include "koglobals.h" 42#include "koglobals.h"
43#include <kglobalsettings.h>
43#include "koprefs.h" 44#include "koprefs.h"
44#ifndef KORG_NOPLUGINS 45#ifndef KORG_NOPLUGINS
45#include "kocore.h" 46#include "kocore.h"
46#endif 47#endif
47 48
48#include <kcalendarsystem.h> 49#include <kcalendarsystem.h>
@@ -58,13 +59,13 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
58 mCtrlFrame = new QFrame( this ); 59 mCtrlFrame = new QFrame( this );
59 mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised); 60 mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised);
60 mCtrlFrame->setLineWidth(1); 61 mCtrlFrame->setLineWidth(1);
61 62
62 topLayout->addWidget( mCtrlFrame ); 63 topLayout->addWidget( mCtrlFrame );
63 64
64 QFont tfont = font(); 65 QFont tfont = KGlobalSettings::generalFont();//font();
65 if ( QApplication::desktop()->width() >= 480 ) 66 if ( QApplication::desktop()->width() >= 480 )
66 tfont.setPointSize(tfont.pointSize()+2); 67 tfont.setPointSize(tfont.pointSize()+2);
67 tfont.setBold(true); 68 tfont.setBold(true);
68 69
69 bool isRTL = KOGlobals::self()->reverseLayout(); 70 bool isRTL = KOGlobals::self()->reverseLayout();
70#ifndef DESKTOP_VERSION 71#ifndef DESKTOP_VERSION
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp
index d8bc9f5..2be9c9e 100644
--- a/libkdepim/kdatepicker.cpp
+++ b/libkdepim/kdatepicker.cpp
@@ -30,12 +30,13 @@
30#include <qfont.h> 30#include <qfont.h>
31#include <qapplication.h> 31#include <qapplication.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qvalidator.h> 33#include <qvalidator.h>
34#include <kdebug.h> 34#include <kdebug.h>
35#include <knotifyclient.h> 35#include <knotifyclient.h>
36#include <kglobalsettings.h>
36#include "kdatetbl.h" 37#include "kdatetbl.h"
37#include "kdateedit.h" 38#include "kdateedit.h"
38//#include "kdatepicker.moc" 39//#include "kdatepicker.moc"
39 40
40 41
41KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) 42KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name)
@@ -48,20 +49,15 @@ KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name)
48 selectYear(new QToolButton(this)), 49 selectYear(new QToolButton(this)),
49 //line(new QLineEdit(this)), 50 //line(new QLineEdit(this)),
50 val(new KDateValidator(this)) 51 val(new KDateValidator(this))
51 //table(new KDateTable(this)), 52 //table(new KDateTable(this)),
52 //fontsize(1) 53 //fontsize(1)
53{ 54{
54 // ----- 55 setFont ( KGlobalSettings::generalFont() );
55 int size = 12;
56 if ( QApplication::desktop()->width() >= 480 )
57 size = 18;
58 fontsize = size;
59 setFont ( QFont("helvetica",size) );
60 table = new KDateTable(this); 56 table = new KDateTable(this);
61 setFontSize(size); 57 setFontSize(font().pointSize()+2);
62 //line->setValidator(val); 58 //line->setValidator(val);
63 lineDate = new KDateEdit( this, "dateediipicker", true ); 59 lineDate = new KDateEdit( this, "dateediipicker", true );
64 yearForward->setPixmap(SmallIcon("2rightarrowB")); 60 yearForward->setPixmap(SmallIcon("2rightarrowB"));
65 yearBackward->setPixmap(SmallIcon("2leftarrowB")); 61 yearBackward->setPixmap(SmallIcon("2leftarrowB"));
66 monthForward->setPixmap(SmallIcon("1rightarrowB")); 62 monthForward->setPixmap(SmallIcon("1rightarrowB"));
67 monthBackward->setPixmap(SmallIcon("1leftarrowB")); 63 monthBackward->setPixmap(SmallIcon("1leftarrowB"));
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp
index fce0e5a..e827412 100644
--- a/microkde/kdatetbl.cpp
+++ b/microkde/kdatetbl.cpp
@@ -195,14 +195,18 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
195 } 195 }
196 } 196 }
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 /*
201 if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width()); 202 if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width());
202 if(rect.height()>maxCell.height()) maxCell.setHeight(rect.height()); 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 )
207{ 211{
208 /* 212 /*
@@ -310,15 +314,21 @@ KDateTable::setFontSize(int size)
310 maxCell.setWidth(QMAX(maxCell.width(), rect.width())); 314 maxCell.setWidth(QMAX(maxCell.width(), rect.width()));
311 maxCell.setHeight(QMAX(maxCell.height(), rect.height())); 315 maxCell.setHeight(QMAX(maxCell.height(), rect.height()));
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)
323{ 333{
324 if(e->type()!=QEvent::MouseButtonPress) 334 if(e->type()!=QEvent::MouseButtonPress)
@@ -440,13 +450,13 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
440 QRect rect; 450 QRect rect;
441 QFont font; 451 QFont font;
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);
451 setNumRows(4); 461 setNumRows(4);
452 setNumCols(3); 462 setNumCols(3);
@@ -758,13 +768,13 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
758 QRect rect; 768 QRect rect;
759 QFont font; 769 QFont font;
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);
769 setNumRows(13); 779 setNumRows(13);
770 setNumCols(4); 780 setNumCols(4);
@@ -779,13 +789,17 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
779 for(int i=1; i <= 52; ++i) 789 for(int i=1; i <= 52; ++i)
780 { 790 {
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 }
795 if ( QApplication::desktop()->width() > 640 ) {
785 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
790{ 804{
791 return QSize((max.width()+6)*numCols()+2*frameWidth(), 805 return QSize((max.width()+6)*numCols()+2*frameWidth(),
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index 2fff8fc..30e793f 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -7,17 +7,19 @@
7 7
8QFont KGlobalSettings::generalFont() 8QFont 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}