[-]
[+]
|
Changed |
kdecoration.spec
|
|
[-]
[+]
|
Changed |
kdecoration-5.3.0.tar.xz/CMakeLists.txt
^
|
@@ -1,5 +1,5 @@
project(decoration-api)
-set(PROJECT_VERSION "5.2.0")
+set(PROJECT_VERSION "5.3.0")
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
@@ -19,7 +19,7 @@
SOVERSION 5)
#dependencies
-set(REQUIRED_QT_VERSION 5.3.0)
+set(REQUIRED_QT_VERSION 5.4.0)
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED COMPONENTS
Core
Gui
|
[-]
[+]
|
Changed |
kdecoration-5.3.0.tar.xz/src/CMakeLists.txt
^
|
@@ -50,12 +50,6 @@
FILES
${CMAKE_CURRENT_BINARY_DIR}/kdecoration2/kdecoration2_export.h
${KDecoration2_HEADERS}
- decoratedclient.h
- decoration.h
- decorationbutton.h
- decorationbuttongroup.h
- decorationsettings.h
- decorationshadow.h
decorationdefines.h
DESTINATION
${KDECORATION2_INCLUDEDIR}/kdecoration2
|
[-]
[+]
|
Changed |
kdecoration-5.3.0.tar.xz/src/decoratedclient.cpp
^
|
@@ -22,6 +22,8 @@
#include "private/decorationbridge.h"
#include "decoration.h"
+#include <QColor>
+
namespace KDecoration2
{
@@ -72,4 +74,14 @@
return QPointer<Decoration>(d->decoration());
}
+QColor DecoratedClient::color(QPalette::ColorGroup group, QPalette::ColorRole role) const
+{
+ return d->palette().color(group, role);
+}
+
+QColor DecoratedClient::color(ColorGroup group, ColorRole role) const
+{
+ return d->color(group, role);
+}
+
} // namespace
|
[-]
[+]
|
Changed |
kdecoration-5.3.0.tar.xz/src/decoratedclient.h
^
|
@@ -21,6 +21,7 @@
#define KDECORATION2_DECORATED_CLIENT_H
#include <kdecoration2/kdecoration2_export.h>
+#include "decorationdefines.h"
#include <QObject>
#include <QPointer>
@@ -203,6 +204,22 @@
QPointer<Decoration> decoration() const;
QPalette palette() const;
+ /**
+ * Used to get colors in QPalette.
+ * @param group The color group
+ * @param role The color role
+ * @return palette().color(group, role)
+ * @since 5.3
+ **/
+ QColor color(QPalette::ColorGroup group, QPalette::ColorRole role) const;
+ /**
+ * Used to get additional colors that are not in QPalette.
+ * @param group The color group
+ * @param role The color role
+ * @return The color if provided for combination of group and role, otherwise invalid QColor.
+ * @since 5.3
+ **/
+ QColor color(ColorGroup group, ColorRole role) const;
Q_SIGNALS:
void activeChanged(bool);
|
[-]
[+]
|
Changed |
kdecoration-5.3.0.tar.xz/src/decorationdefines.h
^
|
@@ -135,6 +135,45 @@
Oversized
};
+/**
+ * Color groups are used for DecoratedClient::color().
+ * @since 5.3
+ **/
+enum class ColorGroup {
+ /**
+ * Inactive color, used for unfocused windows.
+ **/
+ Inactive,
+ /**
+ * Active color, used for focused windows.
+ **/
+ Active,
+ /**
+ * Warning color, can only be used with ColorRole::Foreground. If used with other roles,
+ * a invalid QColor is returned. It can be used for close buttons and is typically red.
+ **/
+ Warning
+};
+
+/**
+ * Color roles are used for DecoratedClient::color().
+ * @since 5.3
+ **/
+enum class ColorRole {
+ /**
+ * The decoration's frame background color.
+ **/
+ Frame,
+ /**
+ * The decoration's title bar background color
+ **/
+ TitleBar,
+ /**
+ * The decoration's title bar forground color
+ **/
+ Foreground
+};
+
}
#endif
|
[-]
[+]
|
Changed |
kdecoration-5.3.0.tar.xz/src/private/CMakeLists.txt
^
|
@@ -48,9 +48,6 @@
FILES
${CMAKE_CURRENT_BINARY_DIR}/kdecoration2/private/kdecoration2_private_export.h
${KDecoration2Private_HEADERS}
- decoratedclientprivate.h
- decorationbridge.h
- decorationsettingsprivate.h
DESTINATION
${KDECORATION2_INCLUDEDIR}/kdecoration2/private
COMPONENT
|
[-]
[+]
|
Changed |
kdecoration-5.3.0.tar.xz/src/private/decoratedclientprivate.cpp
^
|
@@ -19,6 +19,8 @@
*/
#include "decoratedclientprivate.h"
+#include <QColor>
+
namespace KDecoration2
{
@@ -58,4 +60,12 @@
return d->client;
}
+QColor DecoratedClientPrivate::color(ColorGroup group, ColorRole role) const
+{
+ Q_UNUSED(role)
+ Q_UNUSED(group)
+
+ return QColor();
+}
+
}
|
[-]
[+]
|
Changed |
kdecoration-5.3.0.tar.xz/src/private/decoratedclientprivate.h
^
|
@@ -21,6 +21,7 @@
#define KDECORATION2_DECORATED_CLIENT_PRIVATE_H
#include <kdecoration2/private/kdecoration2_private_export.h>
+#include "../decorationdefines.h"
#include <QString>
#include <QIcon>
@@ -88,6 +89,8 @@
Decoration *decoration();
Decoration *decoration() const;
+ virtual QColor color(ColorGroup group, ColorRole role) const;
+
protected:
explicit DecoratedClientPrivate(DecoratedClient *client, Decoration *decoration);
DecoratedClient *client();
|
[-]
[+]
|
Changed |
kdecoration.yaml
^
|
@@ -1,5 +1,5 @@
Name : kdecoration
-Version : 5.2.0
+Version : 5.3.0
Release : 2
Group : System/Base
License : GPLv2+
|