KWin
|
Common Window Decoration Options. More...
#include <decorationoptions.h>
Signals | |
void | colorsChanged () |
void | fontChanged () |
void | decorationChanged () |
void | titleButtonsChanged () |
Public Member Functions | |
DecorationOptions (QObject *parent=nullptr) | |
~DecorationOptions () override | |
QColor | titleBarColor () const |
QColor | titleBarBlendColor () const |
QColor | fontColor () const |
QColor | buttonColor () const |
QColor | borderColor () const |
QColor | resizeHandleColor () const |
QFont | titleFont () const |
QList< int > | titleButtonsLeft () const |
QList< int > | titleButtonsRight () const |
KDecoration2::Decoration * | decoration () const |
void | setDecoration (KDecoration2::Decoration *decoration) |
int | mousePressAndHoldInterval () const |
Properties | |
KDecoration2::Decoration * | deco |
QColor | titleBarColor |
QColor | titleBarBlendColor |
QColor | fontColor |
QColor | buttonColor |
QColor | borderColor |
QColor | resizeHandleColor |
QFont | titleFont |
QList< int > | titleButtonsLeft |
QList< int > | titleButtonsRight |
int | mousePressAndHoldInterval |
Common Window Decoration Options.
This Class provides common window decoration options which can be used, but do not have to be used by a window decoration. The class provides properties for global settings such as color, font and decoration button position.
If a window decoration wants to follow the global color scheme it should honor the values provided by the properties.
In any case it makes sense to respect the font settings for the decoration as this is also an accessibility feature.
In order to use the options in a QML based window decoration an instance of this object needs to be created and the as a context property available "decoration" needs to be passed to the DecorationOptions instance:
Definition at line 132 of file decorationoptions.h.
Definition at line 181 of file decorationoptions.h.
Enum values to identify the decorations buttons which should be used by the decoration.
Definition at line 198 of file decorationoptions.h.
|
explicit |
Definition at line 45 of file decorationoptions.cpp.
|
override |
Definition at line 57 of file decorationoptions.cpp.
QColor KWin::DecorationOptions::borderColor | ( | ) | const |
Definition at line 61 of file decorationoptions.cpp.
QColor KWin::DecorationOptions::buttonColor | ( | ) | const |
Definition at line 66 of file decorationoptions.cpp.
|
signal |
KDecoration2::Decoration * KWin::DecorationOptions::decoration | ( | ) | const |
Definition at line 146 of file decorationoptions.cpp.
|
signal |
|
signal |
QColor KWin::DecorationOptions::fontColor | ( | ) | const |
Definition at line 71 of file decorationoptions.cpp.
int KWin::DecorationOptions::mousePressAndHoldInterval | ( | ) | const |
Definition at line 191 of file decorationoptions.cpp.
QColor KWin::DecorationOptions::resizeHandleColor | ( | ) | const |
Definition at line 76 of file decorationoptions.cpp.
void KWin::DecorationOptions::setDecoration | ( | KDecoration2::Decoration * | decoration | ) |
Definition at line 151 of file decorationoptions.cpp.
QColor KWin::DecorationOptions::titleBarBlendColor | ( | ) | const |
Definition at line 81 of file decorationoptions.cpp.
QColor KWin::DecorationOptions::titleBarColor | ( | ) | const |
Definition at line 86 of file decorationoptions.cpp.
|
signal |
QList< int > KWin::DecorationOptions::titleButtonsLeft | ( | ) | const |
Definition at line 124 of file decorationoptions.cpp.
QList< int > KWin::DecorationOptions::titleButtonsRight | ( | ) | const |
Definition at line 135 of file decorationoptions.cpp.
QFont KWin::DecorationOptions::titleFont | ( | ) | const |
Definition at line 91 of file decorationoptions.cpp.
|
read |
The color for the window frame (border) depending on the decoration's active state.
Definition at line 162 of file decorationoptions.h.
|
read |
The color to use for titlebar buttons depending on the decoration's active state.
Definition at line 158 of file decorationoptions.h.
|
readwrite |
The decoration Object for which this set of options should be used. The decoration is required to get the correct colors and fonts depending on whether the decoration represents an active or inactive window.
Best pass the decoration object available as a context property to this property.
Definition at line 142 of file decorationoptions.h.
|
read |
The titlebar text color depending on the decoration's active state.
Definition at line 154 of file decorationoptions.h.
|
read |
Definition at line 179 of file decorationoptions.h.
|
read |
The color for the resize handle depending on the decoration's active state.
Definition at line 166 of file decorationoptions.h.
|
read |
The blend color for the titlebar depending on the decoration's active state.
Definition at line 150 of file decorationoptions.h.
|
read |
The color for the titlebar depending on the decoration's active state.
Definition at line 146 of file decorationoptions.h.
|
read |
The buttons to be positioned on the left side of the titlebar from left to right.
Definition at line 174 of file decorationoptions.h.
|
read |
The buttons to be positioned on the right side of the titlebar from left to right.
Definition at line 178 of file decorationoptions.h.
|
read |
The font to be used for the decoration caption depending on the decoration's active state.
Definition at line 170 of file decorationoptions.h.