[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/shells/screensaver
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2008-11-17 23:19:52
Message-ID: 1226963992.590788.19535.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 885818 by aseigo:
clean up the dialog in time for the string freeze
M +177 -211 BackgroundDialog.ui
M +18 -6 backgrounddialog.cpp
--- trunk/KDE/kdebase/workspace/plasma/shells/screensaver/BackgroundDialog.ui #885817:885818
@@ -5,37 +5,186 @@
<rect>
<x>0</x>
<y>0</y>
- <width>603</width>
- <height>371</height>
+ <width>519</width>
+ <height>173</height>
</rect>
</property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
<property name="baseSize" >
<size>
<width>200</width>
<height>700</height>
</size>
</property>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" colspan="4" >
- <widget class="QLabel" name="label_5" >
- <property name="font" >
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text" >
- <string>Background Settings</string>
- </property>
- </widget>
+ <layout class="QGridLayout" name="gridLayout_2" >
+ <item row="0" column="0" >
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" colspan="2" >
+ <widget class="QLabel" name="m_wallpaperLabel_2" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font" >
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Widget Translucency</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <spacer name="horizontalSpacer_2" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>13</width>
+ <height>17</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>User Activity:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QSlider" name="activeSlider" >
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ <property name="maximum" >
+ <number>10</number>
+ </property>
+ <property name="pageStep" >
+ <number>1</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>While Idle:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2" >
+ <widget class="QSlider" name="idleSlider" >
+ <property name="maximum" >
+ <number>10</number>
+ </property>
+ <property name="pageStep" >
+ <number>1</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <spacer name="verticalSpacer_3" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>17</width>
+ <height>13</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="0" colspan="2" >
+ <widget class="QLabel" name="m_wallpaperLabel" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font" >
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Wallpaper</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <spacer name="horizontalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>13</width>
+ <height>17</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="5" column="1" >
+ <widget class="QLabel" name="m_wallpaperTypeLabel" >
+ <property name="text" >
+ <string>Type:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy" >
+ <cstring>m_wallpaperMode</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2" >
+ <widget class="QComboBox" name="m_wallpaperMode" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
- <item rowspan="4" row="1" column="3" >
+ <item rowspan="3" row="0" column="1" >
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<widget class="QLabel" name="m_monitor" >
@@ -68,213 +217,30 @@
</item>
</layout>
</item>
- <item row="3" column="0" colspan="3" >
- <widget class="QWidget" native="1" name="m_wallpaperGroup" >
- <layout class="QVBoxLayout" name="verticalLayout" >
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <item>
- <widget class="QLabel" name="m_wallpaperTypeLabel" >
- <property name="minimumSize" >
- <size>
- <width>129</width>
- <height>0</height>
- </size>
- </property>
- <property name="text" >
- <string>Type:</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy" >
- <cstring>m_wallpaperMode</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="m_wallpaperMode" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QWidget" native="1" name="m_wallpaperConfig" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="2" column="0" colspan="3" >
- <widget class="QLabel" name="m_wallpaperLabel" >
+ <item row="1" column="0" >
+ <widget class="QWidget" native="1" name="m_wallpaperConfig" >
<property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="font" >
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text" >
- <string>Wallpaper</string>
- </property>
</widget>
</item>
- <item row="4" column="1" >
+ <item row="2" column="0" >
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
- <width>20</width>
- <height>64</height>
+ <width>143</width>
+ <height>6</height>
</size>
</property>
</spacer>
</item>
- <item row="1" column="0" colspan="3" >
- <widget class="QGroupBox" name="compositeGroup" >
- <property name="title" >
- <string>Transparency</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
- <item>
- <widget class="QGroupBox" name="activeGroup" >
- <property name="title" >
- <string>Active</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
- <item>
- <widget class="QRadioButton" name="activeScreensaver" >
- <property name="text" >
- <string>show screensaver</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Widget Transparency</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSlider" name="activeSlider" >
- <property name="minimum" >
- <number>1</number>
- </property>
- <property name="maximum" >
- <number>10</number>
- </property>
- <property name="pageStep" >
- <number>1</number>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="activeWallpaper" >
- <property name="text" >
- <string>show wallpaper</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="idleGroup" >
- <property name="title" >
- <string>Idle</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_4" >
- <item>
- <widget class="QRadioButton" name="idleScreensaver" >
- <property name="text" >
- <string>show screensaver</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>Widget Transparency</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSlider" name="idleSlider" >
- <property name="maximum" >
- <number>10</number>
- </property>
- <property name="pageStep" >
- <number>1</number>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="idleWallpaper" >
- <property name="text" >
- <string>show wallpaper</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
</layout>
- <zorder>label_5</zorder>
- <zorder>label_4</zorder>
- <zorder>label_6</zorder>
- <zorder>label_2</zorder>
- <zorder>label_3</zorder>
- <zorder>m_theme</zorder>
- <zorder>m_newThemeButton</zorder>
- <zorder>m_wallpaperLabel</zorder>
- <zorder>m_wallpaperGroup</zorder>
- <zorder>compositeGroup</zorder>
- <zorder>activeGroup</zorder>
- <zorder>idleGroup</zorder>
</widget>
<resources/>
<connections/>
--- trunk/KDE/kdebase/workspace/plasma/shells/screensaver/backgrounddialog.cpp #885817:885818
@@ -100,7 +100,9 @@
// Wallpaper
bool doWallpaper = m_containment->drawWallpaper();
m_wallpaperLabel->setVisible(doWallpaper);
- m_wallpaperGroup->setVisible(doWallpaper);
+ m_wallpaperTypeLabel->setVisible(doWallpaper);
+ m_wallpaperMode->setVisible(doWallpaper);
+ m_wallpaperConfig->setVisible(doWallpaper);
if (doWallpaper) {
// Load wallpaper plugins
QString currentPlugin;
@@ -115,6 +117,8 @@
KPluginInfo::List plugins = Plasma::Wallpaper::listWallpaperInfo();
m_wallpaperMode->clear();
int i = 0;
+ m_wallpaperMode->addItem(KIcon(), i18n("No Wallpaper"),
+ QVariant::fromValue(WallpaperInfo(QString(), QString())));
foreach (KPluginInfo info, plugins) {
bool matches = info.pluginName() == currentPlugin;
const QList<KServiceAction>& modes = info.service()->actions();
@@ -149,15 +153,23 @@
QWidget* w = 0;
WallpaperInfo wallpaperInfo = m_wallpaperMode->itemData(mode).value<WallpaperInfo>();
- if (m_wallpaperGroup->layout()->count() > 1) {
- delete dynamic_cast<QWidgetItem*>(m_wallpaperGroup->layout()->takeAt(1))->widget();
+ if (!m_wallpaperConfig->layout()) {
+ new QVBoxLayout(m_wallpaperConfig);
}
+ if (m_wallpaperConfig->layout()->count() > 0) {
+ delete dynamic_cast<QWidgetItem*>(m_wallpaperConfig->layout()->takeAt(0))->widget();
+ }
+
if (m_wallpaper && m_wallpaper->pluginName() != wallpaperInfo.first) {
delete m_wallpaper;
m_wallpaper = 0;
}
+ if (wallpaperInfo.first.isEmpty()) {
+ return;
+ }
+
if (!m_wallpaper) {
m_wallpaper = Plasma::Wallpaper::load(wallpaperInfo.first);
m_preview->setWallpaper(m_wallpaper);
@@ -168,14 +180,14 @@
KConfigGroup cfg = wallpaperConfig(wallpaperInfo.first);
kDebug() << "making a" << wallpaperInfo.first << "in mode" << wallpaperInfo.second;
m_wallpaper->restore(cfg);
- w = m_wallpaper->createConfigurationInterface(m_wallpaperGroup);
+ w = m_wallpaper->createConfigurationInterface(m_wallpaperConfig);
}
if (!w) {
- w = new QWidget(m_wallpaperGroup);
+ w = new QWidget(m_wallpaperConfig);
}
- m_wallpaperGroup->layout()->addWidget(w);
+ m_wallpaperConfig->layout()->addWidget(w);
}
KConfigGroup BackgroundDialog::wallpaperConfig(const QString &plugin)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic