Nuno has to decide whether the new option will become default or not, for now it is disabled by default. You can enable it in effects kcm, now Login effect has a configuration dialog. It does not (yet) however check for non-fullscreen effects, so they might look weird when this is enabled. REVIEW: 101812 CCMAIL: nuno@oxygen-icons.orgremotes/origin/Plasma/5.0
parent
e985201114
commit
ca2a019bc8
9 changed files with 229 additions and 89 deletions
@ -0,0 +1,81 @@ |
||||
/********************************************************************
|
||||
KWin - the KDE window manager |
||||
This file is part of the KDE project. |
||||
|
||||
Copyright (C) 2010 Martin Gräßlin <kde@martin-graesslin.com> |
||||
Copyright (C) 2011 Kai Uwe Broulik <kde@privat.broulik.de> |
||||
|
||||
This program is free software; you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation; either version 2 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/ |
||||
#include "login_config.h" |
||||
#include <kwineffects.h> |
||||
|
||||
#include <kconfiggroup.h> |
||||
|
||||
#include <QVBoxLayout> |
||||
|
||||
namespace KWin |
||||
{ |
||||
|
||||
KWIN_EFFECT_CONFIG_FACTORY |
||||
|
||||
LoginEffectConfigForm::LoginEffectConfigForm(QWidget* parent) : QWidget(parent) |
||||
{ |
||||
setupUi(this); |
||||
} |
||||
|
||||
LoginEffectConfig::LoginEffectConfig(QWidget* parent, const QVariantList& args) : |
||||
KCModule(EffectFactory::componentData(), parent, args) |
||||
{ |
||||
m_ui = new LoginEffectConfigForm(this); |
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(this); |
||||
|
||||
layout->addWidget(m_ui); |
||||
|
||||
connect(m_ui->fadetoblackBox, SIGNAL(stateChanged(int)), this, SLOT(changed())); |
||||
|
||||
load(); |
||||
} |
||||
|
||||
void LoginEffectConfig::load() |
||||
{ |
||||
KCModule::load(); |
||||
|
||||
KConfigGroup conf = EffectsHandler::effectConfig("Login"); |
||||
m_ui->fadetoblackBox->setChecked(conf.readEntry<bool>("FadeToBlack", true)); |
||||
|
||||
emit changed(false); |
||||
} |
||||
|
||||
void LoginEffectConfig::save() |
||||
{ |
||||
KConfigGroup conf = EffectsHandler::effectConfig("Login"); |
||||
conf.writeEntry("FadeToBlack", m_ui->fadetoblackBox->isChecked()); |
||||
|
||||
conf.sync(); |
||||
|
||||
emit changed(false); |
||||
EffectsHandler::sendReloadMessage("login"); |
||||
} |
||||
|
||||
void LoginEffectConfig::defaults() |
||||
{ |
||||
m_ui->fadetoblackBox->setChecked(true); |
||||
emit changed(true); |
||||
} |
||||
|
||||
} // namespace
|
||||
|
||||
#include "login_config.moc" |
||||
@ -0,0 +1,9 @@ |
||||
[Desktop Entry] |
||||
Type=Service |
||||
X-KDE-ServiceTypes=KCModule |
||||
|
||||
X-KDE-Library=kcm_kwin4_effect_builtins |
||||
X-KDE-ParentComponents=kwin4_effect_login |
||||
X-KDE-PluginKeyword=login |
||||
|
||||
Name=Login |
||||
@ -0,0 +1,57 @@ |
||||
/********************************************************************
|
||||
KWin - the KDE window manager |
||||
This file is part of the KDE project. |
||||
|
||||
Copyright (C) 2010 Martin Gräßlin <kde@martin-graesslin.com> |
||||
Copyright (C) 2011 Kai Uwe Broulik <kde@privat.broulik.de> |
||||
|
||||
This program is free software; you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation; either version 2 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/ |
||||
|
||||
#ifndef KWIN_LOGIN_CONFIG_H |
||||
#define KWIN_LOGIN_CONFIG_H |
||||
|
||||
#include <kcmodule.h> |
||||
|
||||
#include "ui_login_config.h" |
||||
|
||||
|
||||
namespace KWin |
||||
{ |
||||
|
||||
class LoginEffectConfigForm : public QWidget, public Ui::LoginEffectConfigForm |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
explicit LoginEffectConfigForm(QWidget* parent = 0); |
||||
}; |
||||
|
||||
class LoginEffectConfig : public KCModule |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
explicit LoginEffectConfig(QWidget* parent = 0, const QVariantList& args = QVariantList()); |
||||
|
||||
public slots: |
||||
virtual void save(); |
||||
virtual void load(); |
||||
virtual void defaults(); |
||||
|
||||
private: |
||||
LoginEffectConfigForm* m_ui; |
||||
}; |
||||
|
||||
} // namespace
|
||||
|
||||
#endif |
||||
@ -0,0 +1,38 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>KWin::LoginEffectConfigForm</class> |
||||
<widget class="QWidget" name="KWin::LoginEffectConfigForm"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>400</width> |
||||
<height>160</height> |
||||
</rect> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
<item> |
||||
<widget class="QCheckBox" name="fadetoblackBox"> |
||||
<property name="text"> |
||||
<string>Fade to black (fullscreen splash screens only)</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer name="verticalSpacer"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Vertical</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>40</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<resources/> |
||||
<connections/> |
||||
</ui> |
||||
Loading…
Reference in new issue