Option to not change the opacity of windows in cube mode. That way only the cube (that is the desktops) will be painted in a transparent way.
FEATURE: 182195 svn path=/trunk/KDE/kdebase/workspace/; revision=922029
This commit is contained in:
parent
642ae708b5
commit
7b5a71d2dd
8 changed files with 48 additions and 4 deletions
|
@ -52,7 +52,8 @@ CubeEffect::CubeEffect()
|
|||
, borderActivate( ElectricNone )
|
||||
, frontDesktop( 0 )
|
||||
, cubeOpacity( 1.0 )
|
||||
, displayDesktopName( true )
|
||||
, opacityDesktopOnly( true )
|
||||
, displayDesktopName( false )
|
||||
, reflection( true )
|
||||
, rotating( false )
|
||||
, desktopChangedWhileRotating( false )
|
||||
|
@ -111,6 +112,7 @@ void CubeEffect::loadConfig( QString config )
|
|||
effects->reserveElectricBorder( borderActivate );
|
||||
|
||||
cubeOpacity = (float)conf.readEntry( "Opacity", 80 )/100.0f;
|
||||
opacityDesktopOnly = conf.readEntry( "OpacityDesktopOnly", false );
|
||||
displayDesktopName = conf.readEntry( "DisplayDesktopName", true );
|
||||
reflection = conf.readEntry( "Reflection", true );
|
||||
rotationDuration = animationTime( conf, "RotationDuration", 500 );
|
||||
|
@ -1373,6 +1375,8 @@ void CubeEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowP
|
|||
// bug #173214
|
||||
if( opacity > 0.99f )
|
||||
opacity = 0.99f;
|
||||
if( opacityDesktopOnly && !w->isDesktop() )
|
||||
opacity = 0.99f;
|
||||
data.opacity *= opacity;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,6 +85,7 @@ class CubeEffect
|
|||
Window input;
|
||||
int frontDesktop;
|
||||
float cubeOpacity;
|
||||
bool opacityDesktopOnly;
|
||||
bool displayDesktopName;
|
||||
bool reflection;
|
||||
bool rotating;
|
||||
|
|
|
@ -68,6 +68,7 @@ CubeEffectConfig::CubeEffectConfig(QWidget* parent, const QVariantList& args) :
|
|||
connect(m_ui->rotationDurationSpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->cubeOpacitySlider, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->cubeOpacitySpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->desktopOpacityOnlyBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->displayDesktopNameBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->reflectionBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->backgroundColorButton, SIGNAL(changed(QColor)), this, SLOT(changed()));
|
||||
|
@ -96,6 +97,7 @@ void CubeEffectConfig::load()
|
|||
|
||||
int duration = conf.readEntry( "RotationDuration", 0 );
|
||||
float opacity = conf.readEntry( "Opacity", 80 );
|
||||
bool desktopOpacityOnly = conf.readEntry( "OpacityDesktopOnly", false );
|
||||
bool desktopName = conf.readEntry( "DisplayDesktopName", true );
|
||||
bool reflection = conf.readEntry( "Reflection", true );
|
||||
QColor background = conf.readEntry( "BackgroundColor", QColor( Qt::black ) );
|
||||
|
@ -115,6 +117,7 @@ void CubeEffectConfig::load()
|
|||
m_ui->rotationDurationSpin->setValue( duration );
|
||||
m_ui->cubeOpacitySlider->setValue( opacity );
|
||||
m_ui->cubeOpacitySpin->setValue( opacity );
|
||||
m_ui->desktopOpacityOnlyBox->setChecked( desktopOpacityOnly );
|
||||
if( desktopName )
|
||||
{
|
||||
m_ui->displayDesktopNameBox->setCheckState( Qt::Checked );
|
||||
|
@ -197,6 +200,7 @@ void CubeEffectConfig::save()
|
|||
conf.writeEntry( "DisplayDesktopName", m_ui->displayDesktopNameBox->checkState() == Qt::Checked ? true : false );
|
||||
conf.writeEntry( "Reflection", m_ui->reflectionBox->checkState() == Qt::Checked ? true : false );
|
||||
conf.writeEntry( "Opacity", m_ui->cubeOpacitySpin->value() );
|
||||
conf.writeEntry( "OpacityDesktopOnly", m_ui->desktopOpacityOnlyBox->isChecked() );
|
||||
conf.writeEntry( "BackgroundColor", m_ui->backgroundColorButton->color() );
|
||||
conf.writeEntry( "Caps", m_ui->cubeCapsBox->checkState() == Qt::Checked ? true : false );
|
||||
conf.writeEntry( "CapColor", m_ui->capColorButton->color() );
|
||||
|
@ -226,6 +230,7 @@ void CubeEffectConfig::defaults()
|
|||
m_ui->reflectionBox->setCheckState( Qt::Checked );
|
||||
m_ui->cubeOpacitySpin->setValue( 80 );
|
||||
m_ui->cubeOpacitySlider->setValue( 80 );
|
||||
m_ui->desktopOpacityOnlyBox->setChecked( false );
|
||||
m_ui->backgroundColorButton->setColor( QColor( Qt::black ) );
|
||||
m_ui->cubeCapsBox->setCheckState( Qt::Checked );
|
||||
m_ui->capColorButton->setColor( KColorScheme( QPalette::Active, KColorScheme::Window ).background().color() );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>610</width>
|
||||
<width>700</width>
|
||||
<height>566</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -241,6 +241,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3" >
|
||||
<widget class="QCheckBox" name="desktopOpacityOnlyBox" >
|
||||
<property name="text" >
|
||||
<string>Do not change opacity of windows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -488,6 +495,7 @@ otherwise it will remain active</string>
|
|||
<tabstop>rotationDurationSpin</tabstop>
|
||||
<tabstop>cubeOpacitySlider</tabstop>
|
||||
<tabstop>cubeOpacitySpin</tabstop>
|
||||
<tabstop>desktopOpacityOnlyBox</tabstop>
|
||||
<tabstop>backgroundColorButton</tabstop>
|
||||
<tabstop>wallpaperRequester</tabstop>
|
||||
<tabstop>cubeCapsBox</tabstop>
|
||||
|
|
|
@ -66,6 +66,7 @@ CylinderEffectConfig::CylinderEffectConfig(QWidget* parent, const QVariantList&
|
|||
connect(m_ui->rotationDurationSpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->cubeOpacitySlider, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->cubeOpacitySpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->desktopOpacityOnlyBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->displayDesktopNameBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->reflectionBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->backgroundColorButton, SIGNAL(changed(QColor)), this, SLOT(changed()));
|
||||
|
@ -92,6 +93,7 @@ void CylinderEffectConfig::load()
|
|||
|
||||
int duration = conf.readEntry( "RotationDuration", 0 );
|
||||
float opacity = conf.readEntry( "Opacity", 80 );
|
||||
bool desktopOpacityOnly = conf.readEntry( "OpacityDesktopOnly", false );
|
||||
bool desktopName = conf.readEntry( "DisplayDesktopName", true );
|
||||
bool reflection = conf.readEntry( "Reflection", true );
|
||||
QColor background = conf.readEntry( "BackgroundColor", QColor( Qt::black ) );
|
||||
|
@ -109,6 +111,7 @@ void CylinderEffectConfig::load()
|
|||
m_ui->rotationDurationSpin->setValue( duration );
|
||||
m_ui->cubeOpacitySlider->setValue( opacity );
|
||||
m_ui->cubeOpacitySpin->setValue( opacity );
|
||||
m_ui->desktopOpacityOnlyBox->setChecked( desktopOpacityOnly );
|
||||
if( desktopName )
|
||||
{
|
||||
m_ui->displayDesktopNameBox->setCheckState( Qt::Checked );
|
||||
|
@ -175,6 +178,7 @@ void CylinderEffectConfig::save()
|
|||
conf.writeEntry( "DisplayDesktopName", m_ui->displayDesktopNameBox->checkState() == Qt::Checked ? true : false );
|
||||
conf.writeEntry( "Reflection", m_ui->reflectionBox->checkState() == Qt::Checked ? true : false );
|
||||
conf.writeEntry( "Opacity", m_ui->cubeOpacitySpin->value() );
|
||||
conf.writeEntry( "OpacityDesktopOnly", m_ui->desktopOpacityOnlyBox->isChecked() );
|
||||
conf.writeEntry( "BackgroundColor", m_ui->backgroundColorButton->color() );
|
||||
conf.writeEntry( "Caps", m_ui->cubeCapsBox->checkState() == Qt::Checked ? true : false );
|
||||
conf.writeEntry( "CapColor", m_ui->capColorButton->color() );
|
||||
|
@ -202,6 +206,7 @@ void CylinderEffectConfig::defaults()
|
|||
m_ui->reflectionBox->setCheckState( Qt::Checked );
|
||||
m_ui->cubeOpacitySpin->setValue( 80 );
|
||||
m_ui->cubeOpacitySlider->setValue( 80 );
|
||||
m_ui->desktopOpacityOnlyBox->setChecked( false );
|
||||
m_ui->backgroundColorButton->setColor( QColor( Qt::black ) );
|
||||
m_ui->cubeCapsBox->setCheckState( Qt::Checked );
|
||||
m_ui->capColorButton->setColor( KColorScheme( QPalette::Active, KColorScheme::Window ).background().color() );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>610</width>
|
||||
<width>729</width>
|
||||
<height>542</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -241,6 +241,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3" >
|
||||
<widget class="QCheckBox" name="desktopOpacityOnlyBox" >
|
||||
<property name="text" >
|
||||
<string>Do not change opacity of windows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -460,6 +467,7 @@ otherwise it will remain active.</string>
|
|||
<tabstop>rotationDurationSpin</tabstop>
|
||||
<tabstop>cubeOpacitySlider</tabstop>
|
||||
<tabstop>cubeOpacitySpin</tabstop>
|
||||
<tabstop>desktopOpacityOnlyBox</tabstop>
|
||||
<tabstop>backgroundColorButton</tabstop>
|
||||
<tabstop>wallpaperRequester</tabstop>
|
||||
<tabstop>cubeCapsBox</tabstop>
|
||||
|
|
|
@ -66,6 +66,7 @@ SphereEffectConfig::SphereEffectConfig(QWidget* parent, const QVariantList& args
|
|||
connect(m_ui->rotationDurationSpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->cubeOpacitySlider, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->cubeOpacitySpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->desktopOpacityOnlyBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->displayDesktopNameBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->backgroundColorButton, SIGNAL(changed(QColor)), this, SLOT(changed()));
|
||||
connect(m_ui->cubeCapsBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
|
@ -91,6 +92,7 @@ void SphereEffectConfig::load()
|
|||
|
||||
int duration = conf.readEntry( "RotationDuration", 0 );
|
||||
float opacity = conf.readEntry( "Opacity", 80 );
|
||||
bool desktopOpacityOnly = conf.readEntry( "OpacityDesktopOnly", false );
|
||||
bool desktopName = conf.readEntry( "DisplayDesktopName", true );
|
||||
QColor background = conf.readEntry( "BackgroundColor", QColor( Qt::black ) );
|
||||
QColor capColor = conf.readEntry( "CapColor", KColorScheme( QPalette::Active, KColorScheme::Window ).background().color() );
|
||||
|
@ -107,6 +109,7 @@ void SphereEffectConfig::load()
|
|||
m_ui->rotationDurationSpin->setValue( duration );
|
||||
m_ui->cubeOpacitySlider->setValue( opacity );
|
||||
m_ui->cubeOpacitySpin->setValue( opacity );
|
||||
m_ui->desktopOpacityOnlyBox->setChecked( desktopOpacityOnly );
|
||||
if( desktopName )
|
||||
{
|
||||
m_ui->displayDesktopNameBox->setCheckState( Qt::Checked );
|
||||
|
@ -163,6 +166,7 @@ void SphereEffectConfig::save()
|
|||
conf.writeEntry( "RotationDuration", m_ui->rotationDurationSpin->value() );
|
||||
conf.writeEntry( "DisplayDesktopName", m_ui->displayDesktopNameBox->checkState() == Qt::Checked ? true : false );
|
||||
conf.writeEntry( "Opacity", m_ui->cubeOpacitySpin->value() );
|
||||
conf.writeEntry( "OpacityDesktopOnly", m_ui->desktopOpacityOnlyBox->isChecked() );
|
||||
conf.writeEntry( "BackgroundColor", m_ui->backgroundColorButton->color() );
|
||||
conf.writeEntry( "Caps", m_ui->cubeCapsBox->checkState() == Qt::Checked ? true : false );
|
||||
conf.writeEntry( "CapColor", m_ui->capColorButton->color() );
|
||||
|
@ -189,6 +193,7 @@ void SphereEffectConfig::defaults()
|
|||
m_ui->displayDesktopNameBox->setCheckState( Qt::Checked );
|
||||
m_ui->cubeOpacitySpin->setValue( 80 );
|
||||
m_ui->cubeOpacitySlider->setValue( 80 );
|
||||
m_ui->desktopOpacityOnlyBox->setChecked( false );
|
||||
m_ui->backgroundColorButton->setColor( QColor( Qt::black ) );
|
||||
m_ui->cubeCapsBox->setCheckState( Qt::Checked );
|
||||
m_ui->capColorButton->setColor( KColorScheme( QPalette::Active, KColorScheme::Window ).background().color() );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>610</width>
|
||||
<width>700</width>
|
||||
<height>542</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -241,6 +241,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3" >
|
||||
<widget class="QCheckBox" name="desktopOpacityOnlyBox" >
|
||||
<property name="text" >
|
||||
<string>Do not change opacity of windows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -502,6 +509,7 @@ otherwise it will remain active</string>
|
|||
<tabstop>rotationDurationSpin</tabstop>
|
||||
<tabstop>cubeOpacitySlider</tabstop>
|
||||
<tabstop>cubeOpacitySpin</tabstop>
|
||||
<tabstop>desktopOpacityOnlyBox</tabstop>
|
||||
<tabstop>backgroundColorButton</tabstop>
|
||||
<tabstop>wallpaperRequester</tabstop>
|
||||
<tabstop>cubeCapsBox</tabstop>
|
||||
|
|
Loading…
Reference in a new issue