Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Farid Abdelnour
kdenlive
Commits
e2b499ff
Commit
e2b499ff
authored
Dec 19, 2018
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix color theme lost on AppImage
parent
a49facdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
src/mainwindow.cpp
src/mainwindow.cpp
+1
-2
src/utils/thememanager.cpp
src/utils/thememanager.cpp
+17
-1
No files found.
src/mainwindow.cpp
View file @
e2b499ff
...
...
@@ -674,12 +674,11 @@ void MainWindow::init(const QString &MltPath, const QUrl &Url, const QString &cl
void
MainWindow
::
slotThemeChanged
(
const
QString
&
theme
)
{
disconnect
(
this
,
&
MainWindow
::
reloadTheme
,
this
,
&
MainWindow
::
slotReloadTheme
);
KdenliveSettings
::
setColortheme
(
theme
);
KSharedConfigPtr
config
=
KSharedConfig
::
openConfig
(
theme
);
setPalette
(
KColorScheme
::
createApplicationPalette
(
config
));
qApp
->
setPalette
(
palette
());
QPalette
plt
=
palette
();
KdenliveSettings
::
setColortheme
(
theme
);
if
(
m_effectStack
)
{
m_effectStack
->
updatePalette
();
m_effectStack
->
transitionConfig
()
->
updatePalette
();
...
...
src/utils/thememanager.cpp
View file @
e2b499ff
...
...
@@ -116,13 +116,30 @@ void ThemeManager::setCurrentTheme(const QString &filename)
return
;
}
QString
name
=
d
->
themeMap
.
key
(
filename
,
d
->
defaultThemeName
);
// In the case of AppImage, the path to the color scheme can be invalid
// on each start as filesystem is mounted with a random path, so check that and correct
if
(
name
.
isEmpty
())
{
QMapIterator
<
QString
,
QString
>
i
(
d
->
themeMap
);
while
(
i
.
hasNext
())
{
i
.
next
();
if
(
QFileInfo
(
i
.
value
()).
fileName
()
==
QFileInfo
(
filename
).
fileName
())
{
name
=
i
.
key
();
}
}
}
bool
themeFound
=
false
;
const
QList
<
QAction
*>
list
=
d
->
themeMenuActionGroup
->
actions
();
for
(
QAction
*
const
action
:
list
)
{
if
(
action
->
text
().
remove
(
'&'
)
==
name
)
{
action
->
setChecked
(
true
);
themeFound
=
true
;
break
;
//slotChangePalette();
}
}
if
(
!
themeFound
&&
filename
!=
d
->
defaultThemeName
)
{
setCurrentTheme
(
d
->
defaultThemeName
);
}
}
void
ThemeManager
::
slotChangePalette
()
...
...
@@ -138,7 +155,6 @@ void ThemeManager::slotChangePalette()
QString
filename
=
d
->
themeMap
.
value
(
theme
);
//qCDebug(KDENLIVE_LOG) << theme << " :: " << filename;
emit
signalThemeChanged
(
filename
);
}
...
...
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