summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp28
-rw-r--r--korganizer/kodaymatrix.cpp4
-rw-r--r--korganizer/koeditordetails.cpp5
-rw-r--r--korganizer/koprefs.cpp25
-rw-r--r--korganizer/koprefsdialog.cpp98
-rw-r--r--korganizer/koprefsdialog.h2
-rw-r--r--korganizer/navigatorbar.cpp2
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp2
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp12
-rw-r--r--microkde/kdialogbase.cpp2
10 files changed, 102 insertions, 78 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 218396d..072d464 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -120,5 +120,6 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
// 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
@@ -154,3 +155,3 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
}
- timeHeight -= (timeHeight/4-2);
+ //timeHeight -= (timeHeight/4-2);
QFont sFont = nFont;
@@ -159,4 +160,4 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
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) {
@@ -175,3 +176,3 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
// center and draw the time label
- int timeWidth = fm.width(hour+"i");
+ int timeWidth = fm.width(hour);
int tw2 = fm.width(suffix);
@@ -179,6 +180,6 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
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);
@@ -420,4 +421,3 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
widebut = heibut ;
- if ( QApplication::desktop()->width() < 480 )
- widebut = widebut*3/2;
+
//mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed,
@@ -719,3 +719,3 @@ void KOAgendaView::createDayLabels()
}
- dayLabel->setFixedWidth( mTimeLabels->width()+2 );
+ dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() );
dayLabel->setFont( dlf );
@@ -830,4 +830,4 @@ void KOAgendaView::createDayLabels()
//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;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index dfc6af7..c55f7d7 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -291,2 +291,3 @@ bool KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end)
{
+ mRedrawNeeded = true;
bool noSel = (mSelEnd == NOSELECTION && mSelStart == NOSELECTION );
@@ -513,2 +514,3 @@ void KODayMatrix::mousePressEvent (QMouseEvent* e)
mSelEnd = mSelStart;
+ mRedrawNeeded = true;
repaint(false);
@@ -518,2 +520,3 @@ void KODayMatrix::mouseReleaseEvent (QMouseEvent* e)
{
+ mRedrawNeeded = true;
if ( e->button() == LeftButton )
@@ -558,2 +561,3 @@ void KODayMatrix::mouseMoveEvent (QMouseEvent* e)
}
+ mRedrawNeeded = true;
int tmp = getDayIndexFrom(e->x(), e->y());
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 2fd13bd..802261c 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -89,4 +89,5 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
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);
}
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 97ab4e8..5879a2d 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -172,14 +172,15 @@ KOPrefs::KOPrefs() :
// 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);
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 74037e6..8439b81 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -55,2 +55,3 @@
#include <kstandarddirs.h>
+#include <kglobalsettings.h>
@@ -76,2 +77,3 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
+ setFont( KGlobalSettings::generalFont() );
setCaption( i18n("Preferences - some settings need a restart (nr)"));
@@ -80,2 +82,8 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
KGlobal::locale()->insertCatalogue("timezones");
+ mSpacingHint = spacingHintSmall();
+ mMarginHint = marginHintSmall();
+#ifndef DESKTOP_VERSION
+ if ( QApplication::desktop()->height() == 480 )
+ hideButtons();
+#endif
@@ -96,6 +104,3 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
-#ifndef DESKTOP_VERSION
- if ( QApplication::desktop()->height() == 480 )
- hideButtons();
-#endif
+
}
@@ -120,4 +125,4 @@ 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;
@@ -176,4 +181,4 @@ void KOPrefsDialog::setupLocaleTab()
QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
int iii = 0;
@@ -248,4 +253,4 @@ void KOPrefsDialog::setupSyncAlgTab()
QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
int iii = 0;
@@ -289,4 +294,4 @@ void KOPrefsDialog::setupSyncTab()
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);
@@ -339,4 +344,4 @@ void KOPrefsDialog::setupMainTab()
QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
@@ -400,3 +405,3 @@ void KOPrefsDialog::setupMainTab()
QHBox *intervalBox = new QHBox(topFrame);
- // intervalBox->setSpacing(spacingHint());
+ // intervalBox->setSpacing(mSpacingHint);
topLayout->addMultiCellWidget(intervalBox,6,6,0,1);
@@ -490,4 +495,4 @@ void KOPrefsDialog::setupTimeTab()
QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
@@ -563,4 +568,4 @@ void KOPrefsDialog::setupViewsTab()
QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
@@ -608,4 +613,4 @@ void KOPrefsDialog::setupViewsTab()
topLayout = new QGridLayout(topFrame,6,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
ii = 0;
@@ -655,3 +660,3 @@ void KOPrefsDialog::setupViewsTab()
-
+#ifdef DESKTOP_VERSION
KPrefsDialogWidBool *enableToolTips =
@@ -660,3 +665,3 @@ void KOPrefsDialog::setupViewsTab()
topLayout->addWidget(enableToolTips->checkBox(),ii++,0);
-
+#endif
// *********************************************************
@@ -667,4 +672,4 @@ void KOPrefsDialog::setupViewsTab()
topLayout = new QGridLayout(topFrame,5,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
ii = 0;
@@ -714,4 +719,5 @@ void KOPrefsDialog::setupViewsTab()
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;
@@ -808,4 +814,4 @@ void KOPrefsDialog::setupViewsTab()
topLayout = new QGridLayout(topFrame,4,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
ii = 0;
@@ -820,3 +826,3 @@ void KOPrefsDialog::setupViewsTab()
QHBox *prioBox = new QHBox(topFrame);
- // intervalBox->setSpacing(spacingHint());
+ // intervalBox->setSpacing(mSpacingHint);
topLayout->addWidget(prioBox,ii++,0);
@@ -864,4 +870,4 @@ void KOPrefsDialog::setupViewsTab()
topLayout = new QGridLayout(topFrame,4,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
ii = 0;
@@ -930,4 +936,4 @@ dummy =
topLayout = new QGridLayout(topFrame,4,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
ii = 0;
@@ -965,4 +971,4 @@ dummy =
topLayout = new QGridLayout(topFrame,2,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
int iii = 0;
@@ -1191,4 +1197,4 @@ void KOPrefsDialog::setupColorsTab()
QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
- // topLayout->setSpacing(spacingHint());
- // topLayout->setMargin(marginHint());
+ // topLayout->setSpacing(mSpacingHint);
+ // topLayout->setMargin(mMarginHint);
@@ -1300,4 +1306,4 @@ void KOPrefsDialog::setupPrinterTab()
QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
@@ -1313,4 +1319,4 @@ void KOPrefsDialog::setupGroupSchedulingTab()
QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
@@ -1364,4 +1370,4 @@ void KOPrefsDialog::setupGroupAutomationTab()
QGridLayout *topLayout = new QGridLayout(topFrame,5,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
@@ -1663,4 +1669,4 @@ void KOPrefsDialog::setupTimeZoneTab()
QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index e20969a..6892028 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -161,2 +161,4 @@ class KOPrefsDialog : public KPrefsDialog
QLineEdit * mDefaultAlarmFile;
+ int mSpacingHint;
+ int mMarginHint;
};
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index 0610d55..b03870f 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -218,3 +218,3 @@ void NavigatorBar::resetFont ( QFont fo )
mCurrentMinWid = maxwidth+2;
- mCurrentButtonMinWid = mPrevYear->sizeHint().width()+2;
+ mCurrentButtonMinWid = mPrevYear->sizeHint().width();
}
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 4fe1e66..d62d9f9 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -208,3 +208,3 @@ void KDEPIMConfigWidget::setupExternalAppTab()
QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
- mExternalAppGroupBox->layout()->setMargin(5);
+ mExternalAppGroupBox->layout()->setMargin(4);
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index ea3a329..d675517 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -680,6 +680,12 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
mRubberBand->setFrameStyle( Box | Raised );
- mRubberBand->setPalette( QPalette ( Qt::green.light(),Qt::green.dark() ) );
+ mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) );
}
QRect r = contentsRect();
- const int rBord = 5; //Themable????
+ static int rBord = 0; //Themable????
+ if ( !rBord ) {
+ if (QApplication::desktop()->width() <= 320 )
+ rBord = 4;
+ else
+ rBord = 5;
+ }
int sw = style().splitterWidth();
@@ -697,3 +703,5 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
opaqueOldPos = p;
+ if ( ! mRubberBand->isVisible() ) {
mRubberBand->show();
+ }
#endif
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index f453331..e6144de 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -153,2 +153,4 @@ void KDialogBase::initLayout()
if ( mCloseButton ) buttonLayout->addWidget( mCloseButton );
+ buttonLayout->setMargin( 0 );
+ buttonLayout->setSpacing( spacingHint() );
}