summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/background/bgdialog.cpp2
-rw-r--r--kcontrol/icons/icons.cpp72
-rw-r--r--kcontrol/icons/icons.h6
3 files changed, 77 insertions, 3 deletions
diff --git a/kcontrol/background/bgdialog.cpp b/kcontrol/background/bgdialog.cpp
index 34cff9f53..6a7e44234 100644
--- a/kcontrol/background/bgdialog.cpp
+++ b/kcontrol/background/bgdialog.cpp
@@ -98,7 +98,6 @@ BGDialog::BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop)
delete m_kwin;
m_desk = m_multidesktop ? KWin::currentDesktop() : 1;
- //m_desk = m_multidesktop ? (m_useViewports ? (m_desk * m_numViewports) : m_desk) : m_desk;
m_desk = m_multidesktop ? (m_useViewports ? (((m_desk - 1) * m_numViewports) + t_eViewport) : m_desk) : m_desk;
m_numDesks = m_multidesktop ? (m_useViewports ? (m_numDesks * m_numViewports) : m_numDesks) : m_numDesks;
@@ -320,7 +319,6 @@ void BGDialog::load( bool useDefaults )
for (unsigned screen = 0; screen < m_renderer[desk].size(); ++screen)
{
unsigned eScreen = screen>1 ? screen-2 : 0;
-// m_renderer[desk][screen]->load( eDesk, eScreen, (screen>0) );
m_renderer[desk][screen]->load( eDesk, eScreen, (screen>0), useDefaults );
}
}
diff --git a/kcontrol/icons/icons.cpp b/kcontrol/icons/icons.cpp
index 85a72e075..8ad71540e 100644
--- a/kcontrol/icons/icons.cpp
+++ b/kcontrol/icons/icons.cpp
@@ -35,7 +35,7 @@ KIconConfig::KIconConfig(QWidget *parent, const char *name)
: KCModule(parent, name)
{
- QGridLayout *top = new QGridLayout(this, 2, 2,
+ QGridLayout *top = new QGridLayout(this, 4, 2,
KDialog::marginHint(),
KDialog::spacingHint());
top->setColStretch(0, 1);
@@ -95,6 +95,36 @@ KIconConfig::KIconConfig(QWidget *parent, const char *name)
top->activate();
+ KSeparator *panelsep = new KSeparator( KSeparator::HLine, this );
+ top->addMultiCellWidget ( panelsep, 3, 3, 0, 1);
+
+ QGroupBox *gboxpnl = new QGroupBox(i18n("Panel Settings"), this);
+ //top->addMultiCellWidget(gboxpnl, 4, 4, 0, 1);
+ top->addMultiCellWidget(gboxpnl, 4, 4, 0, 0);
+ QGridLayout *gpnl_lay = new QGridLayout(gboxpnl, 3, 3, KDialog::marginHint(), KDialog::spacingHint());
+ gpnl_lay->addRowSpacing(0, fontMetrics().lineSpacing());
+
+ QLabel *lbl2 = new QLabel(i18n("System tray icon size:"), gboxpnl);
+ lbl2->setFixedSize(lbl2->sizeHint());
+ gpnl_lay->addWidget(lbl2, 1, 0, Qt::AlignLeft);
+ mpSysTraySizeBox = new QComboBox(gboxpnl);
+ connect(mpSysTraySizeBox, SIGNAL(activated(int)), SLOT(changed()));
+ lbl2->setBuddy(mpSysTraySizeBox);
+ gpnl_lay->addWidget(mpSysTraySizeBox, 1, 1, Qt::AlignCenter);
+
+ QLabel *lbl3 = new QLabel(i18n("Quick launch icon size:"), gboxpnl);
+ lbl3->setFixedSize(lbl3->sizeHint());
+ gpnl_lay->addWidget(lbl3, 2, 0, Qt::AlignLeft);
+ mpQuickLaunchSizeBox = new QComboBox(gboxpnl);
+ connect(mpQuickLaunchSizeBox, SIGNAL(activated(int)), SLOT(changed()));
+ lbl3->setBuddy(mpQuickLaunchSizeBox);
+ gpnl_lay->addWidget(mpQuickLaunchSizeBox, 2, 1, Qt::AlignCenter);
+
+ mQLSizeLocked = new QCheckBox(i18n("Lock to panel size"), gboxpnl);
+ mQLSizeLocked->setFixedSize(mQLSizeLocked->sizeHint());
+ connect(mQLSizeLocked, SIGNAL(toggled(bool)), SLOT(QLSizeLockedChanged(bool)));
+ gpnl_lay->addWidget(mQLSizeLocked, 2, 2, Qt::AlignRight);
+
init();
read();
apply();
@@ -265,6 +295,39 @@ void KIconConfig::read()
mEffects[i][j].transparant = mpConfig->readBoolEntry(*it2 + "SemiTransparent");
}
}
+
+ mpSysTraySizeBox->clear();
+ mpQuickLaunchSizeBox->clear();
+ mpSysTraySizeBox->insertItem(QString().setNum(16));
+ mpQuickLaunchSizeBox->insertItem(QString().setNum(16));
+ mpSysTraySizeBox->insertItem(QString().setNum(22));
+ mpQuickLaunchSizeBox->insertItem(QString().setNum(22));
+ mpSysTraySizeBox->insertItem(QString().setNum(32));
+ mpQuickLaunchSizeBox->insertItem(QString().setNum(32));
+ mpSysTraySizeBox->insertItem(QString().setNum(48));
+ mpQuickLaunchSizeBox->insertItem(QString().setNum(48));
+ mpSysTraySizeBox->insertItem(QString().setNum(64));
+ mpQuickLaunchSizeBox->insertItem(QString().setNum(64));
+
+ // FIXME
+ // For now, disable mpQuickLaunchSizeBox as the required backend code does not exist yet
+ // This will change in the near future however
+ mpQuickLaunchSizeBox->setEnabled(false);
+ mQLSizeLocked->setEnabled(false);
+ mQLSizeLocked->setChecked(true);
+
+ // FIXME
+ // Due to issues with the system tray handling code, mpSysTraySizeBox also needs to be disabled
+ // This should be fixed ASAP
+ mpSysTraySizeBox->setEnabled(false);
+
+ mpConfig->setGroup("System Tray");
+ mSysTraySize = mpConfig->readNumEntry("systrayIconWidth", 22);
+ for (i=0;i<(mpSysTraySizeBox->count());i++) {
+ if (mpSysTraySizeBox->text(i) == QString().setNum(mSysTraySize)) {
+ mpSysTraySizeBox->setCurrentItem(i);
+ }
+ }
}
void KIconConfig::apply()
@@ -387,6 +450,9 @@ void KIconConfig::save()
}
}
+ mpConfig->setGroup("System Tray");
+ mpConfig->writeEntry("systrayIconWidth", mpSysTraySizeBox->currentText());
+
mpConfig->sync();
emit changed(false);
@@ -407,6 +473,10 @@ void KIconConfig::defaults()
load( true );
}
+void KIconConfig::QLSizeLockedChanged(bool checked) {
+ emit changed();
+}
+
void KIconConfig::slotUsage(int index)
{
mUsage = index;
diff --git a/kcontrol/icons/icons.h b/kcontrol/icons/icons.h
index 93171f6d1..b1f167066 100644
--- a/kcontrol/icons/icons.h
+++ b/kcontrol/icons/icons.h
@@ -75,6 +75,7 @@ private slots:
void slotSize(int index);
void slotDPCheck(bool check);
void slotAnimatedCheck(bool check);
+ void QLSizeLockedChanged(bool checked);
private:
void preview(int i);
@@ -96,6 +97,8 @@ private:
int mUsage;
QString mTheme, mExample;
QStringList mGroups, mStates;
+ int mSysTraySize;
+ int mQuickLaunchSize;
KIconEffect *mpEffect;
KIconTheme *mpTheme;
@@ -107,6 +110,9 @@ private:
QListBox *mpUsageList;
QComboBox *mpSizeBox;
+ QComboBox *mpSysTraySizeBox;
+ QComboBox *mpQuickLaunchSizeBox;
+ QCheckBox *mQLSizeLocked;
QCheckBox *mpDPCheck, *wordWrapCB, *underlineCB, *mpAnimatedCheck;
QTabWidget *m_pTabWidget;
QWidget *m_pTab1;