mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
kdeplasma-addons: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3d258ccab2
commit
8348fc1702
2 changed files with 3 additions and 2 deletions
|
@ -41,6 +41,7 @@
|
|||
#include <KPushButton>
|
||||
#include <KStandardAction>
|
||||
#include <KAction>
|
||||
#include <KColorUtils>
|
||||
|
||||
#include <Plasma/Animator>
|
||||
#include <Plasma/Animation>
|
||||
|
@ -52,7 +53,7 @@
|
|||
QString defaultBackgroundColor()
|
||||
{
|
||||
// returns a suitable background color according to the plasma theme's TextColor
|
||||
return Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor).lightness() > 100 ? "black" : "yellow";
|
||||
return KColorUtils::luma(Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor)) > qreal(0.4) ? "black" : "yellow";
|
||||
}
|
||||
|
||||
class TopWidget : public QGraphicsWidget
|
||||
|
|
|
@ -26,7 +26,7 @@ Rectangle {
|
|||
height: 480
|
||||
|
||||
function randomColor() {
|
||||
root.color = Qt.hsla(Math.random(), 1,0.5,1)
|
||||
root.color = Qt.hsva(Math.random(), 1,0.5,1)
|
||||
}
|
||||
|
||||
Component.onCompleted: randomColor()
|
||||
|
|
Loading…
Add table
Reference in a new issue