summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-08 14:12:31 (UTC)
committer zautrix <zautrix>2005-02-08 14:12:31 (UTC)
commit41111b332c2a5f1b2ec152df309b9199f5e9c921 (patch) (unidiff)
tree3a2e5c5a25cdb52f542b2fe84a03f94599be2fe3 /korganizer
parent9927a063f34bb826a4b5f7f7029308c9c66acbce (diff)
downloadkdepimpi-41111b332c2a5f1b2ec152df309b9199f5e9c921.zip
kdepimpi-41111b332c2a5f1b2ec152df309b9199f5e9c921.tar.gz
kdepimpi-41111b332c2a5f1b2ec152df309b9199f5e9c921.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp33
-rw-r--r--korganizer/calendarview.h3
-rw-r--r--korganizer/komonthview.cpp5
-rw-r--r--korganizer/koprefs.cpp28
-rw-r--r--korganizer/ktimeedit.cpp8
-rw-r--r--korganizer/mainwindow.cpp27
-rw-r--r--korganizer/navigatorbar.cpp3
7 files changed, 69 insertions, 38 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 0fbaa9a..a9de65a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2461,15 +2461,5 @@ void 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 ;
@@ -2488,17 +2478,30 @@ void CalendarView::moveIncidence(Incidence * inc )
2488 mDatePicker->setDate( da ); 2478 mDatePicker->setDate( da );
2489} 2479}
2490void CalendarView::showDatePicker( ) 2480void CalendarView::showDatePickerPopup()
2491{ 2481{
2492 //qDebug("CalendarView::showDatePicker( ) "); 2482 if ( mDateFrame->isVisible() )
2493 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() );
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 731298d..e626ea3 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -442,5 +442,6 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
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 *) ;
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 6ae4c6f..02d2585 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -926,6 +926,9 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
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
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 576c265..5bfe2a1 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -37,4 +37,5 @@
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>
@@ -63,4 +64,5 @@ KOPrefs::KOPrefs() :
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);
@@ -70,4 +72,6 @@ KOPrefs::KOPrefs() :
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");
@@ -157,16 +161,16 @@ KOPrefs::KOPrefs() :
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");
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp
index 5222ac9..61a0931 100644
--- a/korganizer/ktimeedit.cpp
+++ b/korganizer/ktimeedit.cpp
@@ -50,8 +50,10 @@ KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name)
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 );
55 mTime = qt; 54 } else {
55 setSizeLimit ( 12 );
56 }
57 mTime = qt;
56 58
57// mNoTimeString = i18n("No Time"); 59// mNoTimeString = i18n("No Time");
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 7810bf9..61c39f5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -2031,8 +2031,5 @@ void MainWindow::weekAction()
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());
@@ -2040,5 +2037,25 @@ void MainWindow::weekAction()
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();
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index f05e6f6..4a31c77 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -41,4 +41,5 @@
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
@@ -62,5 +63,5 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
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);