Enable the on-all-desktops button

svn path=/trunk/KDE/kdebase/workspace/; revision=815426
This commit is contained in:
Huynh Huu Long 2008-06-01 19:03:09 +00:00
parent 8caa518a12
commit e3721c8751
3 changed files with 10 additions and 5 deletions

View file

@ -132,6 +132,7 @@ bool OxygenFactory::supports( Ability ability ) const
case AbilityButtonMinimize:
case AbilityButtonMaximize:
case AbilityButtonClose:
case AbilityButtonOnAllDesktops:
case AbilityButtonAboveOthers:
case AbilityButtonBelowOthers:
case AbilityButtonSpacer:

View file

@ -225,6 +225,11 @@ void OxygenButton::drawIcon(QPainter *p, QPalette &pal, ButtonType &type)
switch(type)
{
case ButtonSticky:
if(isChecked()) {
QPen newPen = p->pen();
newPen.setColor(KColorScheme(pal.currentColorGroup()).decoration(KColorScheme::HoverColor).color());
p->setPen(newPen);
}
p->drawPoint(QPointF(10.5,10.5));
break;
case ButtonHelp:

View file

@ -192,15 +192,14 @@ KCommonDecorationButton *OxygenClient::createButton(::ButtonType type)
return new OxygenButton(*this, i18n("Close"), ButtonClose);
case AboveButton:
return new OxygenButton(*this, i18n("Keep above others"), ButtonAbove);
return new OxygenButton(*this, i18n("Keep Above Others"), ButtonAbove);
case BelowButton:
return new OxygenButton(*this, i18n("Keep below others"), ButtonBelow);
return new OxygenButton(*this, i18n("Keep Below Others"), ButtonBelow);
/*
case OnAllDesktopsButton:
return new OxygenButton(*this, i18n("All Desktops"), ButtonSticky);
*/
return new OxygenButton(*this, i18n("On All Desktops"), ButtonSticky);
default:
return 0;
}