diff --git a/clients/oxygen/oxygen.cpp b/clients/oxygen/oxygen.cpp index 09d0360994..f7b7b86716 100644 --- a/clients/oxygen/oxygen.cpp +++ b/clients/oxygen/oxygen.cpp @@ -132,6 +132,8 @@ bool OxygenFactory::supports( Ability ability ) const case AbilityButtonMinimize: case AbilityButtonMaximize: case AbilityButtonClose: + case AbilityButtonAboveOthers: + case AbilityButtonBelowOthers: case AbilityButtonSpacer: return true; // no colors supported at this time diff --git a/clients/oxygen/oxygen.h b/clients/oxygen/oxygen.h index d6a08f8f55..535f003af1 100644 --- a/clients/oxygen/oxygen.h +++ b/clients/oxygen/oxygen.h @@ -46,6 +46,8 @@ enum ButtonType { ButtonClose, ButtonMenu, ButtonSticky, + ButtonAbove, + ButtonBelow, ButtonTypeCount }; Q_DECLARE_FLAGS(ButtonTypes, ButtonType) diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index 43d4c20271..9cf561d87c 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -233,6 +234,30 @@ void OxygenButton::paintEvent(QPaintEvent *) painter.drawLine(QPointF( 7.5,7.5), QPointF(13.5,13.5)); painter.drawLine(QPointF(13.5,7.5), QPointF( 7.5,13.5)); break; + case ButtonAbove: + if(isChecked()) { + QPen newPen = painter.pen(); + newPen.setColor(KColorScheme(pal.currentColorGroup()).decoration(KColorScheme::HoverColor).color()); + painter.setPen(newPen); + } + + painter.drawLine(QPointF( 7.5,14), QPointF(10.5,11)); + painter.drawLine(QPointF(10.5,11), QPointF(13.5,14)); + painter.drawLine(QPointF( 7.5,10), QPointF(10.5, 7)); + painter.drawLine(QPointF(10.5, 7), QPointF(13.5,10)); + break; + case ButtonBelow: + if(isChecked()) { + QPen newPen = painter.pen(); + newPen.setColor(KColorScheme(pal.currentColorGroup()).decoration(KColorScheme::HoverColor).color()); + painter.setPen(newPen); + } + + painter.drawLine(QPointF( 7.5,11), QPointF(10.5,14)); + painter.drawLine(QPointF(10.5,14), QPointF(13.5,11)); + painter.drawLine(QPointF( 7.5, 7), QPointF(10.5,10)); + painter.drawLine(QPointF(10.5,10), QPointF(13.5, 7)); + break; default: break; } diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index ff1ec36eee..7d5fcfc4f8 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -190,6 +190,15 @@ KCommonDecorationButton *OxygenClient::createButton(::ButtonType type) case CloseButton: return new OxygenButton(*this, i18n("Close"), ButtonClose); + +/* + case AboveButton: + return new OxygenButton(*this, i18n("Keep above others"), ButtonAbove); + + case BelowButton: + return new OxygenButton(*this, i18n("Keep below others"), ButtonBelow); +*/ + /* case OnAllDesktopsButton: return new OxygenButton(*this, i18n("All Desktops"), ButtonSticky);