Merge branch 'mart/LookAndFeelKCM'

workspace part needed for the L&F kcm
(actual kcm will be in plasma-desktop)
wilder-5.14
Marco Martin 12 years ago
commit c59d054b49
  1. 1
      kcms/CMakeLists.txt
  2. 2
      kcms/splash/kcm.cpp
  3. 2
      ksmserver/screenlocker/kcm/kcm.cpp
  4. 2
      ksmserver/screenlocker/kcm/package/contents/ui/main.qml
  5. 10
      lookandfeel/contents/defaults
  6. BIN
      lookandfeel/contents/lockscreen/screenshot.png
  7. BIN
      lookandfeel/contents/previews/lockscreen.png
  8. BIN
      lookandfeel/contents/previews/preview.png
  9. BIN
      lookandfeel/contents/previews/splash.png
  10. BIN
      lookandfeel/contents/splash/screenshot.png
  11. 4
      lookandfeelaccess/lookandfeelaccess.cpp
  12. 21
      shell/shellcorona.cpp
  13. 2
      shell/shellcorona.h

@ -1,3 +1,2 @@
project(kcms)
add_subdirectory( splash )

@ -112,7 +112,7 @@ void KCMSplashScreen::load()
for (const Plasma::Package &pkg : pkgs) {
QStandardItem* row = new QStandardItem(pkg.metadata().name());
row->setData(pkg.metadata().pluginName(), PluginNameRole);
row->setData(pkg.filePath("splash", "screenshot.png"), ScreenhotRole);
row->setData(pkg.filePath("previews", "splash.png"), ScreenhotRole);
m_model->appendRow(row);
}
}

@ -91,7 +91,7 @@ void ScreenLockerKcm::load()
for (const Plasma::Package &pkg : pkgs) {
QStandardItem* row = new QStandardItem(pkg.metadata().name());
row->setData(pkg.metadata().pluginName(), PluginNameRole);
row->setData(pkg.filePath("lockscreen", "screenshot.png"), ScreenhotRole);
row->setData(pkg.filePath("previews", "lockscreen.png"), ScreenhotRole);
m_model->appendRow(row);
}
}

@ -132,7 +132,7 @@ Rectangle {
* the view really is done loading"*/
Timer {
id: makeCurrentTimer
interval: 0
interval: 100
repeat: false
property int pendingIndex
onPendingIndexChanged: makeCurrentTimer.restart()

@ -1,10 +1,12 @@
[KDE]
[kdeglobals][KDE]
widgetStyle=qtcurve
SingleClick=true
ColorScheme=Breeze
[Icons]
[kdeglobals][Icons]
Theme=breeze
[Theme]
[plasmarc][Theme]
name=default
[kcminputrc][Mouse]
cursorTheme=breeze

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

@ -78,7 +78,7 @@ LookAndFeelAccess::LookAndFeelAccess(QObject *parent)
{
ShellPluginLoader::init();
d->defaultPackage = Plasma::PluginLoader::self()->loadPackage("Plasma/LookAndFeel");
d->defaultPackage.setPath("org.kde.lookandfeel");
d->defaultPackage.setPath("org.kde.breeze.desktop");
d->config = KSharedConfig::openConfig("kdeglobals");
KConfigGroup cg(d->config, "KDE");
@ -159,7 +159,7 @@ QList<Plasma::Package> LookAndFeelAccess::availablePackages(const QString &compo
for (const QString &path : paths) {
Plasma::Package pkg = Plasma::PluginLoader::self()->loadPackage("Plasma/LookAndFeel");
pkg.setPath(path);
if (!component.isEmpty() && !pkg.filePath(component.toUtf8()).isEmpty()) {
if (component.isEmpty() || !pkg.filePath(component.toUtf8()).isEmpty()) {
packages << pkg;
}
}

@ -64,6 +64,8 @@
#include "plasmashelladaptor.h"
#include "../lookandfeelaccess/lookandfeelaccess.h"
static const int s_configSyncDelay = 10000; // 10 seconds
class ShellCorona::Private {
@ -176,10 +178,12 @@ ShellCorona::ShellCorona(QObject *parent)
themeName = plasmarc.readEntry(themeNameKey, themeName);
if (themeName.isEmpty()) {
const KConfigGroup lnfCfg = KConfigGroup(KSharedConfig::openConfig(
lookAndFeelPackage().filePath("defaults")),
themeGroupKey
LookAndFeelAccess access;
KConfigGroup lnfCfg = KConfigGroup(KSharedConfig::openConfig(
access.filePath("defaults")),
"plasmarc"
);
lnfCfg = KConfigGroup(&lnfCfg, themeGroupKey);
themeName = lnfCfg.readEntry(themeNameKey, themeName);
}
@ -1316,17 +1320,6 @@ void ShellCorona::desktopContainmentDestroyed(QObject *obj)
}
}
Plasma::Package ShellCorona::lookAndFeelPackage() const
{
if (!d->lookNFeelPackage.isValid()) {
d->lookNFeelPackage = ShellPluginLoader::self()->loadPackage("Plasma/LookAndFeel");
//TODO: make loading from config once we have some UI for setting the package
d->lookNFeelPackage.setPath("org.kde.lookandfeel");
}
return d->lookNFeelPackage;
}
KScreen::Config* ShellCorona::screensConfiguration() const
{
return d->screenConfiguration;

@ -71,8 +71,6 @@ public:
KActivities::Controller *activityController();
Plasma::Package lookAndFeelPackage() const;
//Those two are a bit of an hack but are just for desktop scripting
Activity *activity(const QString &id);
void insertActivity(const QString &id, Activity *activity);

Loading…
Cancel
Save