Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
562f8e44
Commit
562f8e44
authored
Apr 27, 2021
by
Nicolas Fella
Browse files
Port from KIconLoader::loadIcon to KIconUtils::addOverlay + QIcon::fromTheme
This fixes the rendering on highdpi screens
parent
9f7cb32d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/MainWindow.cpp
View file @
562f8e44
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include
<KAcceleratorManager>
#include
<KAcceleratorManager>
#include
<KActionCollection>
#include
<KActionCollection>
#include
<KActionMenu>
#include
<KActionMenu>
#include
<KIconUtils>
#include
<KShortcutsDialog>
#include
<KShortcutsDialog>
#include
<KLocalizedString>
#include
<KLocalizedString>
#include
<KWindowEffects>
#include
<KWindowEffects>
...
@@ -28,7 +29,6 @@
...
@@ -28,7 +29,6 @@
#include
<KWindowSystem>
#include
<KWindowSystem>
#include
<KXMLGUIFactory>
#include
<KXMLGUIFactory>
#include
<KNotifyConfigWidget>
#include
<KNotifyConfigWidget>
#include
<KIconLoader>
#include
<kio_version.h>
#include
<kio_version.h>
...
@@ -437,7 +437,7 @@ void MainWindow::profileListChanged(const QList<QAction *> &sessionActions)
...
@@ -437,7 +437,7 @@ void MainWindow::profileListChanged(const QList<QAction *> &sessionActions)
Profile
::
Ptr
profile
=
ProfileManager
::
instance
()
->
defaultProfile
();
Profile
::
Ptr
profile
=
ProfileManager
::
instance
()
->
defaultProfile
();
if
(
profile
&&
profile
->
name
()
==
sessionAction
->
text
().
remove
(
QLatin1Char
(
'&'
)))
{
if
(
profile
&&
profile
->
name
()
==
sessionAction
->
text
().
remove
(
QLatin1Char
(
'&'
)))
{
QIcon
icon
(
KIcon
Loader
::
global
()
->
loadIcon
(
profile
->
icon
(),
K
Icon
Loader
::
Small
,
0
,
KIconLoader
::
DefaultState
,
QStringList
(
QStringLiteral
(
"emblem-favorite"
))
)
);
QIcon
icon
=
KIcon
Utils
::
addOverlay
(
QIcon
::
fromTheme
(
profile
->
icon
()
)
,
Q
Icon
::
fromTheme
(
QStringLiteral
(
"emblem-favorite"
))
,
Qt
::
BottomRightCorner
);
sessionAction
->
setIcon
(
icon
);
sessionAction
->
setIcon
(
icon
);
setActionFont
(
true
);
setActionFont
(
true
);
}
else
{
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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