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
Plasma Desktop
Commits
4552d610
Commit
4552d610
authored
May 19, 2014
by
Marco Martin
Browse files
use a different Theme instance per delegate
BUG:335004 BUG:335003
parent
f5a49c9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
kcms/desktoptheme/thememodel.cpp
View file @
4552d610
...
...
@@ -103,12 +103,10 @@ void ThemeModel::reload()
Plasma
::
FrameSvg
*
svg
=
new
Plasma
::
FrameSvg
(
this
);
const
QString
svgFile
=
themeRoot
+
QStringLiteral
(
"/widgets/background.svg"
);
if
(
QFile
::
exists
(
svgFile
))
{
svg
->
setImagePath
(
svgFile
);
}
else
{
svg
->
setImagePath
(
svgFile
+
"z"
);
}
Plasma
::
Theme
*
t
=
new
Plasma
::
Theme
(
packageName
,
svg
);
svg
->
setTheme
(
t
);
svg
->
setImagePath
(
"widgets/background"
);
svg
->
setEnabledBorders
(
Plasma
::
FrameSvg
::
AllBorders
);
ThemeInfo
info
;
info
.
package
=
packageName
;
...
...
@@ -205,7 +203,7 @@ void ThemeDelegate::paint(QPainter *painter,
painter
->
save
();
QFont
font
=
painter
->
font
();
//font.setWeight(QFont::Bold);
const
QString
colorFile
=
QStandardPaths
::
locate
(
QStandardPaths
::
GenericDataLocation
,
"desktoptheme/"
+
package
+
"/colors"
);
const
QString
colorFile
=
QStandardPaths
::
locate
(
QStandardPaths
::
GenericDataLocation
,
"
plasma/
desktoptheme/"
+
package
+
"/colors"
);
if
(
!
colorFile
.
isEmpty
())
{
KSharedConfigPtr
colors
=
KSharedConfig
::
openConfig
(
colorFile
);
KColorScheme
colorScheme
(
QPalette
::
Active
,
KColorScheme
::
Window
,
colors
);
...
...
Write
Preview
Markdown
is supported
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