Merge r632199 from kwin_composite.
svn path=/trunk/KDE/kdebase/workspace/; revision=632843
This commit is contained in:
parent
559f90a06a
commit
36afaf2efc
6 changed files with 90 additions and 92 deletions
|
@ -9,7 +9,7 @@
|
|||
* Thin frame in fixed size windows, titlebar gradient support, accessibility
|
||||
* improvements, customizable menu double click action and button hover
|
||||
* effects are
|
||||
* Copyright (c) 2003,2004 Luciano Montanaro <mikelima@cirulla.net>
|
||||
* Copyright (c) 2003, 2004, 2006 Luciano Montanaro <mikelima@cirulla.net>
|
||||
*/
|
||||
|
||||
#include "b2client.h"
|
||||
|
@ -144,10 +144,10 @@ static void read_config(B2ClientFactory *f)
|
|||
thickness = 8;
|
||||
break;
|
||||
case KDecoration::BorderHuge:
|
||||
thickness = 12;
|
||||
break;
|
||||
case KDecoration::BorderVeryHuge:
|
||||
case KDecoration::BorderOversized:
|
||||
thickness = 12;
|
||||
break;
|
||||
case KDecoration::BorderNormal:
|
||||
default:
|
||||
thickness = 4;
|
||||
|
@ -311,8 +311,7 @@ bool B2ClientFactory::reset(unsigned long changed)
|
|||
|
||||
bool B2ClientFactory::supports(Ability ability)
|
||||
{
|
||||
switch( ability )
|
||||
{
|
||||
switch (ability) {
|
||||
case AbilityAnnounceButtons:
|
||||
case AbilityButtonMenu:
|
||||
case AbilityButtonOnAllDesktops:
|
||||
|
@ -1232,7 +1231,8 @@ void B2Button::drawButton(QPainter *p)
|
|||
p->fillRect(rect(), bg);
|
||||
}
|
||||
if (useMiniIcon) {
|
||||
QPixmap miniIcon = client->icon().pixmap(style()->pixelMetric( QStyle::PM_SmallIconSize ),
|
||||
QPixmap miniIcon = client->icon().pixmap(
|
||||
style()->pixelMetric(QStyle::PM_SmallIconSize),
|
||||
client->isActive() ? QIcon::Normal : QIcon::Disabled);
|
||||
p->drawPixmap((width() - miniIcon.width()) / 2,
|
||||
(height() - miniIcon.height()) / 2, miniIcon);
|
||||
|
@ -1436,6 +1436,6 @@ void B2Titlebar::mouseMoveEvent(QMouseEvent * e)
|
|||
|
||||
#include "b2client.moc"
|
||||
|
||||
// vim: sw=4
|
||||
// vim: sw=4 ts=8
|
||||
|
||||
#endif // CLIENTS/B2/B2CLIENT.CPP
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include <kglobal.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "configdialog.h"
|
||||
|
||||
PlastikConfig::PlastikConfig(KConfig* config, QWidget* parent)
|
||||
: QObject(parent), m_config(0), m_dialog(0)
|
||||
|
@ -63,8 +62,8 @@ PlastikConfig::PlastikConfig(KConfig* config, QWidget* parent)
|
|||
|
||||
PlastikConfig::~PlastikConfig()
|
||||
{
|
||||
if (m_dialog) delete m_dialog;
|
||||
if (m_config) delete m_config;
|
||||
delete m_dialog;
|
||||
delete m_config;
|
||||
}
|
||||
|
||||
void PlastikConfig::load(KConfig*)
|
||||
|
|
|
@ -530,8 +530,11 @@ void KWinDecorationModule::save()
|
|||
emit pluginSave( &kwinConfig );
|
||||
|
||||
kwinConfig.sync();
|
||||
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||
kwin.call( "reconfigure" );
|
||||
// Send signal to all kwin instances
|
||||
QDBusMessage message =
|
||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <kmessagebox.h>
|
||||
|
||||
#include <qlabel.h>
|
||||
#include <klocale.h>
|
||||
#include <kcolorbutton.h>
|
||||
#include <kconfig.h>
|
||||
|
@ -56,7 +57,6 @@
|
|||
|
||||
#include "windows.h"
|
||||
|
||||
|
||||
// kwin config keywords
|
||||
#define KWIN_FOCUS "FocusPolicy"
|
||||
#define KWIN_PLACEMENT "Placement"
|
||||
|
@ -496,8 +496,10 @@ void KFocusConfig::save( void )
|
|||
if (standAlone)
|
||||
{
|
||||
config->sync();
|
||||
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||
kwin.call( "reconfigure" );
|
||||
// Send signal to all kwin instances
|
||||
QDBusMessage message =
|
||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
}
|
||||
emit KCModule::changed(false);
|
||||
}
|
||||
|
@ -688,7 +690,7 @@ void KAdvancedConfig::load( void )
|
|||
setShadeHover(config->readEntry(KWIN_SHADEHOVER, false));
|
||||
setShadeHoverInterval(config->readEntry(KWIN_SHADEHOVER_INTERVAL, 250));
|
||||
|
||||
setElectricBorders(config->readEntry(KWM_ELECTRIC_BORDER, false));
|
||||
setElectricBorders(config->readEntry(KWM_ELECTRIC_BORDER, 0));
|
||||
setElectricBorderDelay(config->readEntry(KWM_ELECTRIC_BORDER_DELAY, 150));
|
||||
|
||||
// setFocusStealing( config->readEntry(KWIN_FOCUS_STEALING, 2 ));
|
||||
|
@ -723,8 +725,11 @@ void KAdvancedConfig::save( void )
|
|||
if (standAlone)
|
||||
{
|
||||
config->sync();
|
||||
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||
kwin.call( "reconfigure" );
|
||||
// Send signal to all kwin instances
|
||||
QDBusMessage message =
|
||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
|
||||
}
|
||||
emit KCModule::changed(false);
|
||||
}
|
||||
|
@ -1187,8 +1192,10 @@ void KMovingConfig::save( void )
|
|||
if (standAlone)
|
||||
{
|
||||
config->sync();
|
||||
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||
kwin.call( "reconfigure" );
|
||||
// Send signal to all kwin instances
|
||||
QDBusMessage message =
|
||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
}
|
||||
emit KCModule::changed(false);
|
||||
}
|
||||
|
@ -1254,6 +1261,8 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, co
|
|||
"And if your GPU provides hardware-accelerated Xrender support (mainly nVidia cards):<br><br>"
|
||||
"<i>Option \"RenderAccel\" \"true\"</i><br>"
|
||||
"In <i>Section \"Device\"</i></qt>"), this);
|
||||
label->setOpenExternalLinks(true);
|
||||
label->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
|
||||
lay->addWidget(label);
|
||||
}
|
||||
else
|
||||
|
@ -1474,16 +1483,18 @@ void KTranslucencyConfig::load( void )
|
|||
|
||||
if (!kompmgrAvailable_)
|
||||
return;
|
||||
config->setGroup( "Translucency" );
|
||||
config->setGroup( "Notification Messages" );
|
||||
useTranslucency->setChecked(config->readEntry("UseTranslucency", false));
|
||||
activeWindowTransparency->setChecked(config->readEntry("TranslucentActiveWindows", false));
|
||||
inactiveWindowTransparency->setChecked(config->readEntry("TranslucentInactiveWindows", true));
|
||||
movingWindowTransparency->setChecked(config->readEntry("TranslucentMovingWindows", false));
|
||||
removeShadowsOnMove->setChecked(config->readEntry("RemoveShadowsOnMove", false));
|
||||
removeShadowsOnResize->setChecked(config->readEntry("RemoveShadowsOnResize", false));
|
||||
dockWindowTransparency->setChecked(config->readEntry("TranslucentDocks", true));
|
||||
keepAboveAsActive->setChecked(config->readEntry("TreatKeepAboveAsActive", true));
|
||||
onlyDecoTranslucent->setChecked(config->readEntry("OnlyDecoTranslucent", false));
|
||||
|
||||
config->setGroup( "Translucency" );
|
||||
activeWindowTransparency->setChecked(config->readEntry("TranslucentActiveWindows", false);
|
||||
inactiveWindowTransparency->setChecked(config->readEntry("TranslucentInactiveWindows", true);
|
||||
movingWindowTransparency->setChecked(config->readEntry("TranslucentMovingWindows", false);
|
||||
removeShadowsOnMove->setChecked(config->readEntry("RemoveShadowsOnMove", false);
|
||||
removeShadowsOnResize->setChecked(config->readEntry("RemoveShadowsOnResize", false);
|
||||
dockWindowTransparency->setChecked(config->readEntry("TranslucentDocks", true);
|
||||
keepAboveAsActive->setChecked(config->readEntry("TreatKeepAboveAsActive", true);
|
||||
onlyDecoTranslucent->setChecked(config->readEntry("OnlyDecoTranslucent", false);
|
||||
|
||||
activeWindowOpacity->setValue(config->readEntry("ActiveWindowOpacity",100));
|
||||
inactiveWindowOpacity->setValue(config->readEntry("InactiveWindowOpacity",75));
|
||||
|
@ -1535,8 +1546,10 @@ void KTranslucencyConfig::save( void )
|
|||
{
|
||||
if (!kompmgrAvailable_)
|
||||
return;
|
||||
config->setGroup( "Translucency" );
|
||||
config->setGroup( "Notification Messages" );
|
||||
config->writeEntry("UseTranslucency",useTranslucency->isChecked());
|
||||
|
||||
config->setGroup( "Translucency" );
|
||||
config->writeEntry("TranslucentActiveWindows",activeWindowTransparency->isChecked());
|
||||
config->writeEntry("TranslucentInactiveWindows",inactiveWindowTransparency->isChecked());
|
||||
config->writeEntry("TranslucentMovingWindows",movingWindowTransparency->isChecked());
|
||||
|
@ -1586,8 +1599,11 @@ void KTranslucencyConfig::save( void )
|
|||
if (standAlone)
|
||||
{
|
||||
config->sync();
|
||||
QDBusInterface kwin( "org.kde.kwin", "/KWin", "org.kde.KWin" );
|
||||
kwin.call( "reconfigure" );
|
||||
// Send signal to all kwin instances
|
||||
QDBusMessage message =
|
||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
|
||||
}
|
||||
emit KCModule::changed(false);
|
||||
}
|
||||
|
|
|
@ -145,15 +145,15 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
|
|||
QFont old_activeFontSmall = activeFontSmall;
|
||||
QFont old_inactiveFontSmall = inactiveFontSmall;
|
||||
|
||||
QFont activeFontGuess = KGlobalSettings::generalFont();
|
||||
activeFontGuess.setBold(true);
|
||||
activeFontGuess.setPixelSize(12);
|
||||
QFont activeFontGuess = KGlobalSettings::windowTitleFont();
|
||||
|
||||
activeFont = config->readEntry("activeFont", activeFontGuess);
|
||||
inactiveFont = config->readEntry("inactiveFont", activeFont);
|
||||
|
||||
activeFontSmall = activeFont;
|
||||
#ifdef __GNUC__
|
||||
#warning KDE4 : is it useful ? ( temporary hack )
|
||||
#endif
|
||||
// activeFontSmall.setPointSize(activeFont.pointSize() - 2 > 0 ? activeFont.pointSize() - 2 : activeFont.pointSize()+1 );
|
||||
activeFontSmall = config->readEntry("activeFontSmall", activeFontSmall);
|
||||
inactiveFontSmall = config->readEntry("inactiveFontSmall", activeFontSmall);
|
||||
|
|
24
options.cpp
24
options.cpp
|
@ -174,8 +174,9 @@ unsigned long Options::updateSettings()
|
|||
CmdAllWheel = mouseWheelCommand(config->readEntry("CommandAllWheel","Nothing"));
|
||||
|
||||
//translucency settings - TODO
|
||||
config->setGroup( "Notification Messages" );
|
||||
useTranslucency = config->readEntry("UseTranslucency", false);
|
||||
config->setGroup( "Translucency");
|
||||
useTranslucency = config->readEntry("UseTranslucency", true);
|
||||
translucentActiveWindows = config->readEntry("TranslucentActiveWindows", false);
|
||||
activeWindowOpacity = uint((config->readEntry("ActiveWindowOpacity", 100)/100.0)*0xFFFFFFFF);
|
||||
translucentInactiveWindows = config->readEntry("TranslucentInactiveWindows", false);
|
||||
|
@ -194,27 +195,6 @@ unsigned long Options::updateSettings()
|
|||
removeShadowsOnResize = config->readEntry("RemoveShadowsOnResize", true);
|
||||
onlyDecoTranslucent = config->readEntry("OnlyDecoTranslucent", false);
|
||||
|
||||
refreshRate = config->readEntry( "RefreshRate", 0 );
|
||||
smoothScale = qBound( -1, config->readEntry( "SmoothScale", -1 ), 2 );
|
||||
|
||||
QString glmode = config->readEntry("GLMode", "TFP" ).upper();
|
||||
if( glmode == "TFP" )
|
||||
glMode = GLTFP;
|
||||
else if( glmode == "SHM" )
|
||||
glMode = GLSHM;
|
||||
else
|
||||
glMode = GLFallback;
|
||||
glAlwaysRebind = config->readEntry("GLAlwaysRebind", false );
|
||||
glDirect = config->readEntry("GLDirect", true );
|
||||
glVSync = config->readEntry("GLVSync", true );
|
||||
|
||||
config->setGroup( "Effects" );
|
||||
defaultEffects = config->readEntry( "Load", QStringList() << "ShowFps" << "FadeOut" );
|
||||
|
||||
config->setGroup( "EffectShowFps" );
|
||||
effectShowFpsAlpha = config->readEntry( "Alpha", 0.5 );
|
||||
effectShowFpsX = config->readEntry( "X", -10000 );
|
||||
effectShowFpsY = config->readEntry( "Y", 0 );
|
||||
// Read button tooltip animation effect from kdeglobals
|
||||
// Since we want to allow users to enable window decoration tooltips
|
||||
// and not kstyle tooltips and vise-versa, we don't read the
|
||||
|
|
Loading…
Reference in a new issue