author | zautrix <zautrix> | 2005-04-01 18:10:09 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-01 18:10:09 (UTC) |
commit | edc032c21ae3788d02a632ea8066e4ac5a4feedb (patch) (side-by-side diff) | |
tree | 8e59c8dcf1cc3021694025627d36e152f7adc389 /korganizer | |
parent | 5d88f92b76a760f100384ea5fa6ed143088d19bb (diff) | |
download | kdepimpi-edc032c21ae3788d02a632ea8066e4ac5a4feedb.zip kdepimpi-edc032c21ae3788d02a632ea8066e4ac5a4feedb.tar.gz kdepimpi-edc032c21ae3788d02a632ea8066e4ac5a4feedb.tar.bz2 |
fixes
-rw-r--r-- | korganizer/koagendaview.cpp | 28 | ||||
-rw-r--r-- | korganizer/kodaymatrix.cpp | 4 | ||||
-rw-r--r-- | korganizer/koeditordetails.cpp | 5 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 25 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 98 | ||||
-rw-r--r-- | korganizer/koprefsdialog.h | 2 | ||||
-rw-r--r-- | korganizer/navigatorbar.cpp | 2 |
7 files changed, 89 insertions, 75 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 218396d..072d464 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -115,15 +115,16 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) // bug: the parameters cx, cy, cw, ch are the areas that need to be // redrawn, not the area of the widget. unfortunately, this // code assumes the latter... // now, for a workaround... // these two assignments fix the weird redraw bug + mRedrawNeeded = true; if ( mRedrawNeeded ) { - cx = contentsX() + 2; - cw = contentsWidth() - 2; + cx = contentsX() + frameWidth()*2; + cw = contentsWidth() ; // end of workaround int cell = ((int)(cy/mCellHeight)); int y = cell * mCellHeight; QFontMetrics fm = fontMetrics(); QString hour; @@ -149,19 +150,19 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) -- pointS; } fm = QFontMetrics( nFont ); borderWidth = 4; timeHeight = fm.height(); } - timeHeight -= (timeHeight/4-2); + //timeHeight -= (timeHeight/4-2); QFont sFont = nFont; sFont.setPointSize( sFont.pointSize()/2+2 ); QFontMetrics fmS( sFont ); int sHei = fmS.height(); - sHei -= (sHei/4-2); - int startW = this->width() - frameWidth(); + //sHei -= (sHei/4-2); + int startW = this->width() - frameWidth()-1; while (y < cy + ch) { p->drawLine(cx,y,cx+tW,y); hour.setNum(cell); // handle 24h and am/pm time formats if (KGlobal::locale()->use12Clock()) { @@ -170,20 +171,20 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) suffix = "am"; if (cell == 0) hour.setNum(12); if (cell > 12) hour.setNum(cell - 12); } // center and draw the time label - int timeWidth = fm.width(hour+"i"); + int timeWidth = fm.width(hour); int tw2 = fm.width(suffix); int offset = startW - timeWidth - tw2 ; p->setFont( nFont ); - p->drawText(cx - borderWidth + offset, y+ timeHeight, hour); + p->drawText( offset, y+ timeHeight, hour); p->setFont( sFont ); - offset = startW - tw2-1; - p->drawText(cx - borderWidth + offset, y+ sHei, suffix); + offset = startW - tw2+1; + p->drawText( offset, y+ sHei, suffix); // increment indices y += mCellHeight; cell++; } } else { @@ -415,14 +416,13 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : mExpandButton = new QPushButton(mDummyAllDayLeft); mExpandButton->setPixmap( expandPix ); int widebut = mExpandButton->sizeHint().width()+4; int heibut = mExpandButton->sizeHint().height()+4; if ( heibut > widebut ) widebut = heibut ; - if ( QApplication::desktop()->width() < 480 ) - widebut = widebut*3/2; + //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, // QSizePolicy::Fixed ) ); mExpandButton->setFixedSize( widebut, widebut); connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); mExpandButton->setFocusPolicy(NoFocus); mAllDayAgenda = new KOAgenda(1,mAllDayFrame); @@ -714,13 +714,13 @@ void KOAgendaView::createDayLabels() KOAgendaButton *dayLabel; dayLabel = mDayLabelsList.first(); if ( !dayLabel ) { appendLabels = true; dayLabel = getNewDaylabel(); } - dayLabel->setFixedWidth( mTimeLabels->width()+2 ); + dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() ); dayLabel->setFont( dlf ); dayLabel->setNum( -1 ); //dayLabel->setAlignment(QLabel::AlignHCenter); dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); dayLabel->show(); DateList::ConstIterator dit; @@ -825,14 +825,14 @@ void KOAgendaView::createDayLabels() appendLabels = true; } if ( appendLabels ) { dayLabel = getNewDaylabel(); } //dayLabel->hide();//test only - - int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ; + qDebug("fremwidd %d ", mAgenda->frameWidth()); + int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()- (mAgenda->frameWidth()*2) ) % mSelectedDates.count() ; if ( offset < 0 ) offset = 0; //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 ); dayLabel->setText(">");//QString::number ( mSelectedDates.first().month() ) ); dayLabel->setFont( dlf ); dayLabel->setAutoRepeat( true ); dayLabel->show(); diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index dfc6af7..c55f7d7 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -286,12 +286,13 @@ void KODayMatrix::addSelectedDaysTo(DateList& selDays) } } } bool KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end) { + mRedrawNeeded = true; bool noSel = (mSelEnd == NOSELECTION && mSelStart == NOSELECTION ); mSelStart = startdate.daysTo(start); if ( mSelStart < 0 ) mSelStart = 0; mSelEnd = startdate.daysTo(end); if ( mSelEnd > NUMDAYS-1 ) @@ -508,17 +509,19 @@ void KODayMatrix::mousePressEvent (QMouseEvent* e) if ( e->button() == LeftButton ) mouseDown = true; mSelStart = getDayIndexFrom(e->x(), e->y()); if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1; mSelInit = mSelStart; mSelEnd = mSelStart; + mRedrawNeeded = true; repaint(false); } void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) { + mRedrawNeeded = true; if ( e->button() == LeftButton ) if ( ! mouseDown ) { return; } else mouseDown = false; @@ -553,12 +556,13 @@ void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) void KODayMatrix::mouseMoveEvent (QMouseEvent* e) { if ( ! mouseDown ) { return; } + mRedrawNeeded = true; int tmp = getDayIndexFrom(e->x(), e->y()); if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; if (mSelInit > tmp) { mSelEnd = mSelInit; if (tmp != mSelStart) { diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index 2fd13bd..802261c 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp @@ -84,14 +84,15 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) mListView = new KListView(this,"mListView"); mListView->addColumn(i18n("Name"),180); mListView->addColumn(i18n("Email"),180); mListView->addColumn(i18n("Role"),60); mListView->addColumn(i18n("Status"),100); mListView->addColumn(i18n("RSVP"),35); - if ( KOPrefs::instance()->mCompactDialogs ) { - //mListView->setFixedHeight(78); + if ( QApplication::desktop()->width() <= 320 ) { + //mListView->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding) ); + mListView->setFixedHeight(80); } mListView->setAllColumnsShowFocus (true ); //mListView->setSingleClick( true ); connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), SLOT(updateAttendeeInput())); diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 97ab4e8..5879a2d 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -167,24 +167,25 @@ KOPrefs::KOPrefs() : KPrefs::setCurrentGroup("Calendar"); addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); KPrefs::setCurrentGroup("Fonts"); // qDebug(" KPrefs::setCurrentGroup(Fonts); "); - addItemFont("TimeBar Font",&mTimeBarFont,KGlobalSettings::generalFont() ); - addItemFont("MonthView Font",&mMonthViewFont,KGlobalSettings::generalFont()); - addItemFont("AgendaView Font",&mAgendaViewFont,KGlobalSettings::generalFont()); - addItemFont("MarcusBains Font",&mMarcusBainsFont,KGlobalSettings::generalFont()); - addItemFont("TimeLabels Font",&mTimeLabelsFont,KGlobalSettings::generalFont()); - addItemFont("TodoView Font",&mTodoViewFont,KGlobalSettings::generalFont()); - addItemFont("ListView Font",&mListViewFont,KGlobalSettings::generalFont()); - addItemFont("DateNavigator Font",&mDateNavigatorFont,KGlobalSettings::generalFont()); - addItemFont("EditBox Font",&mEditBoxFont,KGlobalSettings::generalFont()); - addItemFont("JournalView Font",&mJornalViewFont,KGlobalSettings::generalFont()); - addItemFont("WhatsNextView Font",&mWhatsNextFont,KGlobalSettings::generalFont()); - addItemFont("EventView Font",&mEventViewFont,KGlobalSettings::generalFont()); + QFont fon = KGlobalSettings::generalFont(); + addItemFont("TimeBar Font",&mTimeBarFont,fon ); + addItemFont("MonthView Font",&mMonthViewFont,fon); + addItemFont("AgendaView Font",&mAgendaViewFont,fon); + addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); + addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); + addItemFont("TodoView Font",&mTodoViewFont,fon); + addItemFont("ListView Font",&mListViewFont,fon); + addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); + addItemFont("EditBox Font",&mEditBoxFont,fon); + addItemFont("JournalView Font",&mJornalViewFont,fon); + addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); + addItemFont("EventView Font",&mEventViewFont,fon); KPrefs::setCurrentGroup("RemoteSyncing"); addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); addItemBool("ShowSyncEvents",&mShowSyncEvents,false); addItemInt("LastSyncTime",&mLastSyncTime,0); diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 74037e6..8439b81 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -50,12 +50,13 @@ #include <kfiledialog.h> #include <kmessagebox.h> #include <kcolordialog.h> #include <kiconloader.h> #include <kemailsettings.h> #include <kstandarddirs.h> +#include <kglobalsettings.h> #include <kurlrequester.h> #include <klineedit.h> #if defined(USE_SOLARIS) #include <sys/param.h> @@ -71,16 +72,23 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : KPrefsDialog(KOPrefs::instance(),parent,name,true) { + setFont( KGlobalSettings::generalFont() ); setCaption( i18n("Preferences - some settings need a restart (nr)")); mCategoryDict.setAutoDelete(true); KGlobal::locale()->insertCatalogue("timezones"); + mSpacingHint = spacingHintSmall(); + mMarginHint = marginHintSmall(); +#ifndef DESKTOP_VERSION + if ( QApplication::desktop()->height() == 480 ) + hideButtons(); +#endif setupGlobalTab(); setupMainTab(); // setupLocaleTab(); //setupTimeZoneTab(); setupTimeTab(); @@ -91,16 +99,13 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : //setupSyncTab(); //setupSyncAlgTab(); //setupPrinterTab(); //setupGroupSchedulingTab(); //setupGroupAutomationTab(); -#ifndef DESKTOP_VERSION - if ( QApplication::desktop()->height() == 480 ) - hideButtons(); -#endif + } KOPrefsDialog::~KOPrefsDialog() { } @@ -115,14 +120,14 @@ void KOPrefsDialog::setupGlobalTab() } void KOPrefsDialog::setupLocaleDateTab() { #if 0 QFrame *topFrame = addPage(i18n("Date Format"),0,0); QGridLayout *topLayout = new QGridLayout(topFrame,3,2); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); int iii = 0; KPrefsDialogWidRadios *syncPrefsGroup = addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); QString format; @@ -171,14 +176,14 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0); void KOPrefsDialog::setupLocaleTab() { #if 0 QFrame *topFrame = addPage(i18n("Locale"),0,0); QGridLayout *topLayout = new QGridLayout(topFrame,4,2); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); int iii = 0; KPrefsDialogWidRadios *syncPrefsGroup = addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); syncPrefsGroup->addRadio(i18n("English")); syncPrefsGroup->addRadio(i18n("German")); syncPrefsGroup->addRadio(i18n("French")); @@ -243,14 +248,14 @@ void KOPrefsDialog::setupSyncAlgTab() { #if 0 QLabel * lab; QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); mSetupSyncAlgTab = topFrame; QGridLayout *topLayout = new QGridLayout(topFrame,6,2); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); int iii = 0; KPrefsDialogWidBool *sb = addWidBool(i18n("Ask for preferences before syncing"), &(KOPrefs::instance()->mAskForPreferences),topFrame); topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); @@ -284,14 +289,14 @@ void KOPrefsDialog::setupSyncAlgTab() void KOPrefsDialog::setupSyncTab() { #if 0 QLabel * lab; QFrame *topFrame = addPage(i18n("Sync Network"),0,0); QGridLayout *topLayout = new QGridLayout(topFrame,6,2); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); int iii = 0; topLayout->addMultiCellWidget(lab , iii,iii,0,1); ++iii; mRemoteIPEdit = new QLineEdit(topFrame); @@ -334,14 +339,14 @@ void KOPrefsDialog::setupSyncTab() void KOPrefsDialog::setupMainTab() { QFrame *topFrame = addPage(i18n("General"),0,0); // DesktopIcon("identity",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,5,2); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); // KPrefsDialogWidBool *emailControlCenter = // addWidBool(i18n("&Use email settings from Control Center"), // &(KOPrefs::instance()->mEmailControlCenter),topFrame); // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), @@ -395,13 +400,13 @@ void KOPrefsDialog::setupMainTab() //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); // addWidBool(i18n("Enable automatic saving of calendar"), // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); QHBox *intervalBox = new QHBox(topFrame); - // intervalBox->setSpacing(spacingHint()); + // intervalBox->setSpacing(mSpacingHint); topLayout->addMultiCellWidget(intervalBox,6,6,0,1); QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); /* QHBox * agendasize = new QHBox ( topFrame ); @@ -485,14 +490,14 @@ void KOPrefsDialog::setupMainTab() void KOPrefsDialog::setupTimeTab() { QFrame *topFrame = addPage(i18n("Time"),0,0); // DesktopIcon("clock",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,4,2); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); QHBox *dummy = new QHBox(topFrame); KPrefsDialogWidTime *dayBegins = addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), dummy); //topLayout->addWidget(dayBegins->label(),2,0); @@ -558,14 +563,14 @@ void KOPrefsDialog::setupViewsTab() { QFrame *topFrame = addPage(i18n("Views"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,6,1); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); // QBoxLayout *dayBeginsLayout = new QHBoxLayout; // topLayout->addLayout(dayBeginsLayout,0,0); // KPrefsDialogWidTime *dayBegins = // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), @@ -603,14 +608,14 @@ void KOPrefsDialog::setupViewsTab() #if 0 topFrame = addPage(i18n("ViewChange"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,6,1); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); ii = 0; #endif dummy = addWidBool(i18n("Hold fullscreen on view change"), @@ -650,26 +655,26 @@ void KOPrefsDialog::setupViewsTab() KPrefsDialogWidBool *weeklyRecur = addWidBool(i18n("Show ev. that recur weekly in date nav."), &(KOPrefs::instance()->mWeeklyRecur),topFrame); topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); - +#ifdef DESKTOP_VERSION KPrefsDialogWidBool *enableToolTips = addWidBool(i18n("Enable tooltips displaying summary of ev."), &(KOPrefs::instance()->mEnableToolTips),topFrame); topLayout->addWidget(enableToolTips->checkBox(),ii++,0); - +#endif // ********************************************************* topFrame = addPage(i18n("Agenda View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,5,1); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); ii = 0; dummy = addWidBool(i18n("Show time in agenda items"), &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); @@ -709,14 +714,15 @@ void KOPrefsDialog::setupViewsTab() topFrame = addPage(i18n("Month View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,5,1); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); + qDebug("%d %d ",mSpacingHint, mMarginHint ); ii = 0; QLabel *lab; QHBox *habo = new QHBox( topFrame ); if ( QApplication::desktop()->width() <= 480 ) { lab = new QLabel ( i18n("Show events that recur "), topFrame ); topLayout->addMultiCellWidget(lab,ii, ii,0,1); @@ -803,25 +809,25 @@ void KOPrefsDialog::setupViewsTab() topLayout->addWidget(holidayColor->button(),ii++,1); // *********************** What'sNext View topFrame = addPage(i18n("What's Next View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,4,1); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); ii = 0; QHBox* hdummy = new QHBox(topFrame); new QLabel(i18n("Days in What's Next:"),hdummy); mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); topLayout->addWidget(hdummy,ii++,0); QHBox *prioBox = new QHBox(topFrame); - // intervalBox->setSpacing(spacingHint()); + // intervalBox->setSpacing(mSpacingHint); topLayout->addWidget(prioBox,ii++,0); QString messa = i18n("Show topmost todo prios in What's Next:"); if ( QApplication::desktop()->width() < 300 ) messa = i18n("Show topmost todo prios in What's N.:"); QLabel *prioLabel = new QLabel(messa, prioBox); @@ -859,14 +865,14 @@ void KOPrefsDialog::setupViewsTab() // *********************** Todo View topFrame = addPage(i18n("Todo View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,4,1); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); ii = 0; dummy = addWidBool(i18n("Hide not running Todos in To-do view"), &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); @@ -925,14 +931,14 @@ dummy = topLayout->addWidget(dummy->checkBox(),ii++,0); topFrame = addPage(i18n("View Options"),0,0); topLayout = new QGridLayout(topFrame,4,1); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); ii = 0; lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); topLayout->addWidget(lab ,ii++,0); dummy = addWidBool(i18n("Details"), &(KOPrefs::instance()->mEVshowDetails),topFrame); @@ -960,14 +966,14 @@ dummy = topFrame = addPage(i18n("Alarm"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,2,1); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); int iii = 0; dummy = addWidBool(i18n("Use internal alarm notification"), &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); topLayout->addWidget(dummy->checkBox(),iii++,0); @@ -1186,14 +1192,14 @@ void KOPrefsDialog::setupFontsTab() void KOPrefsDialog::setupColorsTab() { QFrame *topFrame = addPage(i18n("Colors"),0,0); // DesktopIcon("colorize",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,5,2); - // topLayout->setSpacing(spacingHint()); - // topLayout->setMargin(marginHint()); + // topLayout->setSpacing(mSpacingHint); + // topLayout->setMargin(mMarginHint); topLayout->setSpacing(2); topLayout->setMargin(3); int ii = 1; QGroupBox *categoryGroup ; @@ -1295,27 +1301,27 @@ void KOPrefsDialog::updateCategoryColor() void KOPrefsDialog::setupPrinterTab() { mPrinterTab = addPage(i18n("Printing"),0, DesktopIcon("fileprint",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); topLayout->setRowStretch(4,1); } void KOPrefsDialog::setupGroupSchedulingTab() { #if 0 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, DesktopIcon("personal",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,6,2); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); #if 0 KPrefsDialogWidRadios *schedulerGroup = addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), topFrame); schedulerGroup->addRadio("Dummy"); // Only for debugging @@ -1359,14 +1365,14 @@ void KOPrefsDialog::setupGroupAutomationTab() { return; QFrame *topFrame = addPage(i18n("Group Automation"),0, DesktopIcon("personal",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,5,1); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); KPrefsDialogWidRadios *autoRefreshGroup = addWidRadios(i18n("Auto Send Refresh"), &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); autoRefreshGroup->addRadio(i18n("Never")); autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); @@ -1658,14 +1664,14 @@ void KOPrefsDialog::setupTimeZoneTab() { #if 0 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); // DesktopIcon("clock",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,5,2); - topLayout->setSpacing(spacingHint()); - topLayout->setMargin(marginHint()); + topLayout->setSpacing(mSpacingHint); + topLayout->setMargin(mMarginHint); QHBox *timeZoneBox = new QHBox( topFrame ); topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); new QLabel( i18n("Timezone:"), timeZoneBox ); mTimeZoneCombo = new QComboBox( timeZoneBox ); diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h index e20969a..6892028 100644 --- a/korganizer/koprefsdialog.h +++ b/korganizer/koprefsdialog.h @@ -156,9 +156,11 @@ class KOPrefsDialog : public KPrefsDialog QSpinBox * mAlarmPlayBeeps; QSpinBox * mAlarmSuspendTime; QSpinBox * mAlarmSuspendCount; QSpinBox * mAlarmBeepInterval; QLineEdit * mDefaultAlarmFile; + int mSpacingHint; + int mMarginHint; }; #endif diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index 0610d55..b03870f 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp @@ -213,13 +213,13 @@ void NavigatorBar::resetFont ( QFont fo ) mPrevWeek->setFixedHeight( size ); mNextMonth->setFixedHeight( size ); mNextWeek->setFixedHeight( size ); mNextYear->setFixedHeight ( size ); mCurrentHei = size +2; mCurrentMinWid = maxwidth+2; - mCurrentButtonMinWid = mPrevYear->sizeHint().width()+2; + mCurrentButtonMinWid = mPrevYear->sizeHint().width(); } void NavigatorBar::showButtons( bool left, bool right ) { if ( left ) { mPrevYear->show(); |