Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Breeze Style for QQC2
Commits
c660c8b1
Commit
c660c8b1
authored
Feb 16, 2021
by
Noah Davis
🌵
Browse files
[PlasmaDesktopTheme] Update to match qqc2-desktop-style again
parent
1b3f26b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
View file @
c660c8b1
...
...
@@ -176,7 +176,7 @@ public:
Q_SLOT
void
notifyWatchersConfigurationChange
()
{
for
(
auto
watcher
:
qAsConst
(
watchers
))
{
watcher
->
configurationChanged
();
watcher
->
syncFont
();
}
}
...
...
@@ -201,13 +201,11 @@ PlasmaDesktopTheme::PlasmaDesktopTheme(QObject *parent)
if
(
parentItem
)
{
connect
(
parentItem
,
&
QQuickItem
::
enabledChanged
,
this
,
&
PlasmaDesktopTheme
::
syncColors
);
connect
(
parentItem
,
&
QQuickItem
::
windowChanged
,
this
,
&
PlasmaDesktopTheme
::
syncWindow
);
}
addChangeWatcher
(
this
,
std
::
bind
(
&
PlasmaDesktopTheme
::
syncColors
,
this
));
(
*
s_style
)
->
watchers
.
append
(
this
);
syncFont
();
syncWindow
();
syncColors
();
}
...
...
@@ -248,7 +246,7 @@ void PlasmaDesktopTheme::syncWindow()
}
}
void
PlasmaDesktopTheme
::
configurationChanged
()
void
PlasmaDesktopTheme
::
syncFont
()
{
KSharedConfigPtr
ptr
=
KSharedConfig
::
openConfig
();
KConfigGroup
general
(
ptr
->
group
(
"general"
)
);
...
...
@@ -308,7 +306,6 @@ void PlasmaDesktopTheme::syncColors()
setNeutralTextColor
(
colors
.
scheme
.
foreground
(
KColorScheme
::
NeutralText
).
color
());
setPositiveTextColor
(
colors
.
scheme
.
foreground
(
KColorScheme
::
PositiveText
).
color
());
//background
setBackgroundColor
(
colors
.
scheme
.
background
(
KColorScheme
::
NormalBackground
).
color
());
setAlternateBackgroundColor
(
colors
.
scheme
.
background
(
KColorScheme
::
AlternateBackground
).
color
());
...
...
@@ -350,6 +347,25 @@ void PlasmaDesktopTheme::syncColors()
}
}
bool
PlasmaDesktopTheme
::
event
(
QEvent
*
event
)
{
if
(
event
->
type
()
==
Kirigami
::
PlatformThemeEvents
::
DataChangedEvent
::
type
)
{
syncFont
();
syncColors
();
}
if
(
event
->
type
()
==
Kirigami
::
PlatformThemeEvents
::
ColorSetChangedEvent
::
type
)
{
syncColors
();
}
if
(
event
->
type
()
==
Kirigami
::
PlatformThemeEvents
::
ColorGroupChangedEvent
::
type
)
{
syncColors
();
}
return
PlatformTheme
::
event
(
event
);
}
// Breeze QQC2 style colors
QColor
PlasmaDesktopTheme
::
separatorColor
()
const
{
...
...
kirigami-plasmadesktop-integration/plasmadesktoptheme.h
View file @
c660c8b1
...
...
@@ -45,8 +45,11 @@ public:
bool
lowPowerHardware
()
const
;
protected:
bool
event
(
QEvent
*
event
)
override
;
protected
Q_SLOTS
:
void
configurationChanged
();
void
syncFont
();
private:
friend
class
StyleSingleton
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment