diff --git a/plasma/applets/pager/pager.cpp b/plasma/applets/pager/pager.cpp index 5c9d68fb..54be3b6a 100644 --- a/plasma/applets/pager/pager.cpp +++ b/plasma/applets/pager/pager.cpp @@ -349,7 +349,7 @@ void PagerApplet::createConfigurationInterface(KConfigDialog *parent) QGridLayout* widgetlayout = new QGridLayout(widget); QLabel* pagermodelabel = new QLabel(widget); pagermodelabel->setText(i18n("Text:")); - widgetlayout->addWidget(pagermodelabel, 0, 0, Qt::AlignRight); + widgetlayout->addWidget(pagermodelabel, 0, 0, Qt::AlignRight | Qt::AlignVCenter); m_pagermodebox = new QComboBox(widget); m_pagermodebox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); m_pagermodebox->addItem(i18n("Desktop number"), static_cast(PagerApplet::ShowNumber)); diff --git a/plasma/applets/system-monitor/system-monitor.cpp b/plasma/applets/system-monitor/system-monitor.cpp index 83271c1e..8afc9d4e 100644 --- a/plasma/applets/system-monitor/system-monitor.cpp +++ b/plasma/applets/system-monitor/system-monitor.cpp @@ -833,14 +833,14 @@ void SystemMonitor::createConfigurationInterface(KConfigDialog *parent) QGridLayout* widgetlayout = new QGridLayout(widget); QLabel* hostnamelabel = new QLabel(widget); hostnamelabel->setText(i18n("Hostname:")); - widgetlayout->addWidget(hostnamelabel, 0, 0, Qt::AlignRight); + widgetlayout->addWidget(hostnamelabel, 0, 0, Qt::AlignRight | Qt::AlignVCenter); m_hostnameedit = new KLineEdit(widget); m_hostnameedit->setText(m_hostname); widgetlayout->addWidget(m_hostnameedit, 0, 1); QLabel* portlabel = new QLabel(widget); portlabel->setText(i18n("Port:")); - widgetlayout->addWidget(portlabel, 1, 0, Qt::AlignRight); + widgetlayout->addWidget(portlabel, 1, 0, Qt::AlignRight | Qt::AlignVCenter); m_portbox = new KIntNumInput(widget); m_portbox->setMinimum(s_port); m_portbox->setMaximum(USHRT_MAX); @@ -850,7 +850,7 @@ void SystemMonitor::createConfigurationInterface(KConfigDialog *parent) QLabel* updatelabel = new QLabel(widget); updatelabel->setText(i18n("Update interval:")); - widgetlayout->addWidget(updatelabel, 2, 0, Qt::AlignRight); + widgetlayout->addWidget(updatelabel, 2, 0, Qt::AlignRight | Qt::AlignVCenter); m_updateedit = new KTimeEdit(widget); m_updateedit->setMinimumTime(QTime(0, 0, 1)); m_updateedit->setTime(QTime(0, 0, 0).addSecs(m_update)); @@ -858,7 +858,7 @@ void SystemMonitor::createConfigurationInterface(KConfigDialog *parent) QLabel* cpulabel = new QLabel(widget); cpulabel->setText(i18n("CPU color:")); - widgetlayout->addWidget(cpulabel, 3, 0, Qt::AlignRight); + widgetlayout->addWidget(cpulabel, 3, 0, Qt::AlignRight | Qt::AlignVCenter); const QColor defaultcpucolor = kCPUVisualizerColor(); QColor cpucolor = m_cpucolor; if (!cpucolor.isValid()) { @@ -871,7 +871,7 @@ void SystemMonitor::createConfigurationInterface(KConfigDialog *parent) QLabel* receiverlabel = new QLabel(widget); receiverlabel->setText(i18n("Receiver color:")); - widgetlayout->addWidget(receiverlabel, 4, 0, Qt::AlignRight); + widgetlayout->addWidget(receiverlabel, 4, 0, Qt::AlignRight | Qt::AlignVCenter); const QColor defaultreceivercolor = kNetReceiverVisualizerColor(); QColor receivercolor = m_receivercolor; if (!receivercolor.isValid()) { @@ -884,7 +884,7 @@ void SystemMonitor::createConfigurationInterface(KConfigDialog *parent) QLabel* transmitterlabel = new QLabel(widget); transmitterlabel->setText(i18n("Transmitter color:")); - widgetlayout->addWidget(transmitterlabel, 5, 0, Qt::AlignRight); + widgetlayout->addWidget(transmitterlabel, 5, 0, Qt::AlignRight | Qt::AlignVCenter); const QColor defaulttransmittercolor = kNetTransmitterVisualizerColor(); QColor transmittercolor = m_transmittercolor; if (!transmittercolor.isValid()) { diff --git a/plasma/applets/tasks/tasks.cpp b/plasma/applets/tasks/tasks.cpp index 9bfd6858..04ad9438 100644 --- a/plasma/applets/tasks/tasks.cpp +++ b/plasma/applets/tasks/tasks.cpp @@ -371,7 +371,7 @@ void TasksApplet::createConfigurationInterface(KConfigDialog *parent) QGridLayout* widgetlayout = new QGridLayout(widget); QLabel* tooltipmodelabel = new QLabel(widget); tooltipmodelabel->setText(i18n("Tooltip:")); - widgetlayout->addWidget(tooltipmodelabel, 0, 0, Qt::AlignRight); + widgetlayout->addWidget(tooltipmodelabel, 0, 0, Qt::AlignRight | Qt::AlignVCenter); m_tooltipmodebox = new QComboBox(widget); m_tooltipmodebox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); m_tooltipmodebox->addItem(i18n("Task name"), static_cast(TasksApplet::ToolTipPreview)); diff --git a/plasma/applets/weather/weather.cpp b/plasma/applets/weather/weather.cpp index 60d90119..c7e60b0d 100644 --- a/plasma/applets/weather/weather.cpp +++ b/plasma/applets/weather/weather.cpp @@ -784,7 +784,7 @@ void WeatherApplet::createConfigurationInterface(KConfigDialog *parent) QGridLayout* widgetlayout = new QGridLayout(widget); QLabel* tempunitlabel = new QLabel(widget); tempunitlabel->setText(i18n("Temperature unit:")); - widgetlayout->addWidget(tempunitlabel, 0, 0, Qt::AlignRight); + widgetlayout->addWidget(tempunitlabel, 0, 0, Qt::AlignRight | Qt::AlignVCenter); m_tempunitbox = new QComboBox(widget); m_tempunitbox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); for (int i = 0; i < KTemperature::UnitCount; i++) { @@ -795,7 +795,7 @@ void WeatherApplet::createConfigurationInterface(KConfigDialog *parent) widgetlayout->addWidget(m_tempunitbox, 0, 1); QLabel* locationlabel = new QLabel(widget); locationlabel->setText(i18n("Location:")); - widgetlayout->addWidget(locationlabel, 1, 0, Qt::AlignRight); + widgetlayout->addWidget(locationlabel, 1, 0, Qt::AlignRight | Qt::AlignVCenter); m_locationbox = new QComboBox(widget); m_locationbox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); QMap sortedzones; diff --git a/plasma/wallpapers/potd/potd.cpp b/plasma/wallpapers/potd/potd.cpp index 9a6742db..929ead18 100644 --- a/plasma/wallpapers/potd/potd.cpp +++ b/plasma/wallpapers/potd/potd.cpp @@ -22,7 +22,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -62,7 +63,8 @@ PoTD::PoTD(QObject *parent, const QVariantList &args) m_downloading(false), m_providerbox(nullptr), m_resizemethodbox(nullptr), - m_colorbutton(nullptr) + m_colorbutton(nullptr), + m_spacer(nullptr) { m_timer = new QTimer(this); m_timer->setInterval(10000); @@ -123,9 +125,12 @@ void PoTD::paint(QPainter *painter, const QRectF &exposedRect) QWidget* PoTD::createConfigurationInterface(QWidget *parent) { QWidget* potdconfigwidget = new QWidget(parent); - QHBoxLayout* potdconfiglayout = new QHBoxLayout(potdconfigwidget); + QGridLayout* potdconfiglayout = new QGridLayout(potdconfigwidget); potdconfigwidget->setLayout(potdconfiglayout); + QLabel* providerlabel = new QLabel(potdconfigwidget); + providerlabel->setText(i18n("Provider:")); + potdconfiglayout->addWidget(providerlabel, 0, 0, Qt::AlignRight | Qt::AlignVCenter); m_providerbox = new QComboBox(potdconfigwidget); m_providerbox->addItem(i18n("Pexels"), "pexels"); m_providerbox->addItem(i18n("Flickr"), "flickr"); @@ -139,8 +144,11 @@ QWidget* PoTD::createConfigurationInterface(QWidget *parent) m_providerbox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotProviderChanged(int)) ); - potdconfiglayout->addWidget(m_providerbox); + potdconfiglayout->addWidget(m_providerbox, 0, 1); + QLabel* resizemodelabel = new QLabel(potdconfigwidget); + resizemodelabel->setText(i18n("Positioning:")); + potdconfiglayout->addWidget(resizemodelabel, 1, 0, Qt::AlignRight | Qt::AlignVCenter); m_resizemethodbox = new QComboBox(potdconfigwidget); m_resizemethodbox->addItem(i18n("Scaled & Cropped"), Plasma::Wallpaper::ResizeMethod::ScaledAndCroppedResize); m_resizemethodbox->addItem(i18n("Scaled"), Plasma::Wallpaper::ResizeMethod::ScaledResize); @@ -158,12 +166,18 @@ QWidget* PoTD::createConfigurationInterface(QWidget *parent) m_resizemethodbox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotResizeMethodChanged(int)) ); - potdconfiglayout->addWidget(m_resizemethodbox); + potdconfiglayout->addWidget(m_resizemethodbox, 1, 1); + QLabel* colorlabel = new QLabel(potdconfigwidget); + colorlabel->setText(i18n("Color:")); + potdconfiglayout->addWidget(colorlabel, 2, 0, Qt::AlignRight | Qt::AlignVCenter); m_colorbutton = new KColorButton(potdconfigwidget); m_colorbutton->setColor(m_color); connect(m_colorbutton, SIGNAL(changed(QColor)), this, SLOT(slotColorChanged(QColor))); - potdconfiglayout->addWidget(m_colorbutton); + potdconfiglayout->addWidget(m_colorbutton, 2, 1); + + m_spacer = new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Expanding); + potdconfiglayout->addItem(m_spacer, 3, 0, 1, 2); connect(this, SIGNAL(settingsChanged(bool)), parent, SLOT(settingsChanged(bool))); return potdconfigwidget; diff --git a/plasma/wallpapers/potd/potd.h b/plasma/wallpapers/potd/potd.h index da1bdb93..ddeddd60 100644 --- a/plasma/wallpapers/potd/potd.h +++ b/plasma/wallpapers/potd/potd.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -71,6 +72,7 @@ private: QComboBox* m_providerbox; QComboBox* m_resizemethodbox; KColorButton* m_colorbutton; + QSpacerItem* m_spacer; }; K_EXPORT_PLASMA_WALLPAPER(potd, PoTD)