summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorrecurrence.cpp83
-rw-r--r--microkde/kdialog.cpp12
2 files changed, 32 insertions, 63 deletions
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index bedc75a..bf81b01 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -85,2 +85,3 @@ RecurDaily::RecurDaily( QWidget *parent, const char *name ) :
topLayout->setSpacing( KDialog::spacingHint() );
+ topLayout->setMargin( KDialog::marginHintSmall() );
@@ -103,4 +104,5 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
topLayout->setSpacing( KDialog::spacingHint() );
+ topLayout->setMargin( KDialog::marginHintSmall() );
- topLayout->addStretch( 1 );
+ //topLayout->addStretch( 1 );
@@ -121,9 +123,12 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
QString weekDayName = KGlobal::locale()->weekDayName( i + 1, true );
- if ( KOPrefs::instance()->mCompactDialogs ) {
- weekDayName = weekDayName.left( 1 );
+ int left = 1;
+ if ( QApplication::desktop()->width() > 480 ) {
+ ++left;
+ if ( QApplication::desktop()->width() > 640 )
+ ++left;
}
- mDayBoxes[ i ] = new QCheckBox( weekDayName, dayBox );
+ mDayBoxes[ i ] = new QCheckBox( weekDayName.left( left ), dayBox );
}
- topLayout->addStretch( 1 );
+ topLayout->addStretch( );
}
@@ -155,2 +160,3 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
topLayout->setSpacing( KDialog::spacingHint() );
+ topLayout->setMargin( KDialog::marginHintSmall() );
@@ -174,2 +180,3 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
buttonLayout->setSpacing( KDialog::spacingHint() );
+ buttonLayout->setMargin( KDialog::marginHintSmall() );
@@ -177,3 +184,3 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
QString recurOnText;
- if ( !KOPrefs::instance()->mCompactDialogs ) {
+ if ( QApplication::desktop()->width() > 320 ) {
recurOnText = i18n("Recur on the");
@@ -290,2 +297,3 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
topLayout->setSpacing( KDialog::spacingHint() );
+ topLayout->setMargin( KDialog::marginHintSmall() );
@@ -507,2 +515,3 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
rangeLayout->setSpacing( KDialog::spacingHint() );
+ rangeLayout->setMargin( KDialog::marginHintSmall() );
@@ -540,3 +549,3 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
- endDateLayout->addStretch( 1 );
+ //endDateLayout->addStretch( 1 );
@@ -653,5 +662,4 @@ RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) :
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ QBoxLayout *topLayout = new QVBoxLayout( this );
- if ( KOPrefs::instance()->mCompactDialogs ) {
mTypeCombo = new QComboBox( this );
@@ -665,23 +673,3 @@ RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) :
connect( mTypeCombo, SIGNAL( activated( int ) ), SLOT( emitChoice() ) );
- } else {
- mTypeCombo = 0;
-
- QButtonGroup *ruleButtonGroup = new QButtonGroup( 1, Horizontal, this );
- ruleButtonGroup->setFrameStyle( QFrame::NoFrame );
- topLayout->addWidget( ruleButtonGroup );
-
- mDailyButton = new QRadioButton( i18n("Daily"), ruleButtonGroup );
- mWeeklyButton = new QRadioButton( i18n("Weekly"), ruleButtonGroup );
- mMonthlyButton = new QRadioButton( i18n("Monthly"), ruleButtonGroup );
- mYearlyButton = new QRadioButton( i18n("Yearly"), ruleButtonGroup );
-
- connect( mDailyButton, SIGNAL( toggled( bool ) ),
- SLOT( emitChoice() ) );
- connect( mWeeklyButton, SIGNAL( toggled( bool ) ),
- SLOT( emitChoice() ) );
- connect( mMonthlyButton, SIGNAL( toggled( bool ) ),
- SLOT( emitChoice() ) );
- connect( mYearlyButton, SIGNAL( toggled( bool ) ),
- SLOT( emitChoice() ) );
- }
+
}
@@ -735,2 +723,3 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
topLayout->setSpacing( KDialog::spacingHint() );
+ topLayout->setMargin( KDialog::marginHintSmall() );
@@ -746,3 +735,3 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
- if ( KOPrefs::instance()->mCompactDialogs ) {
+ if ( QApplication::desktop()->width() <= 320) {
mTimeGroupBox->hide();
@@ -758,13 +747,5 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
- Qt::Orientation orientation;
- if ( KOPrefs::instance()->mCompactDialogs ) orientation = Horizontal;
- else orientation = Vertical;
-
- mRuleBox = new QGroupBox( 1, orientation, i18n("Recurrence Rule"), this );
- if ( KOPrefs::instance()->mCompactDialogs ) {
- topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 );
- } else {
- topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 );
- }
+ mRuleBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Rule"), this );
+ topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 );
mRecurrenceChooser = new RecurrenceChooser( mRuleBox );
@@ -773,6 +754,2 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
- if ( !KOPrefs::instance()->mCompactDialogs ) {
- QFrame *ruleSepFrame = new QFrame( mRuleBox );
- ruleSepFrame->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- }
@@ -793,4 +770,2 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
showCurrentRule( mRecurrenceChooser->type() );
-
- if ( KOPrefs::instance()->mCompactDialogs ) {
mRecurrenceRangeWidget = 0;
@@ -817,16 +792,2 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
SLOT( showExceptionsDialog() ) );
-
- } else {
- mRecurrenceRangeWidget = new RecurrenceRangeWidget( this );
- mRecurrenceRangeDialog = 0;
- mRecurrenceRange = mRecurrenceRangeWidget;
- mRecurrenceRangeButton = 0;
- topLayout->addWidget( mRecurrenceRangeWidget, 3, 0 );
-
- mExceptionsWidget = new ExceptionsWidget( this );
- mExceptionsDialog = 0;
- mExceptions = mExceptionsWidget;
- mExceptionsButton = 0;
- topLayout->addWidget( mExceptionsWidget, 3, 1 );
- }
}
diff --git a/microkde/kdialog.cpp b/microkde/kdialog.cpp
index 3d62cdd..961631e 100644
--- a/microkde/kdialog.cpp
+++ b/microkde/kdialog.cpp
@@ -11,3 +11,10 @@ KDialog::KDialog( QWidget *parent, const char *name, bool modal ) :
}
+#ifdef DESKTOP_VERSION
+int KDialog::spacingHint() { return 7; }
+int KDialog::marginHint() { return 7; }
+int KDialog::spacingHintSmall() { return 4; }
+int KDialog::marginHintSmall() { return 4; }
+
+#else
int KDialog::spacingHint() { return 3; }
@@ -15,3 +22,4 @@ int KDialog::marginHint() { return 3; }
-int KDialog::spacingHintSmall() { if (QApplication::desktop()->width() < 700 ) return 1;else return 3; }
-int KDialog::marginHintSmall() { if (QApplication::desktop()->width() < 700 ) return 1;else return 3; }
+int KDialog::spacingHintSmall() { return 1; }
+int KDialog::marginHintSmall() { return 1; }
+#endif