Commit e03a4680 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Don't override profile icon in "New Tab" menu

We only need to set the favourite emblem for the default profile icon, for
other profiles, the profile icon is already set on the menu action.

Rename a lambda to a more meaningful name.

BUG: 437200
FIXED-IN: 21.08
parent 110d705f
......@@ -429,7 +429,7 @@ void MainWindow::profileListChanged(const QList<QAction *> &sessionActions)
for (QAction *sessionAction : sessionActions) {
_newTabMenuAction->menu()->addAction(sessionAction);
auto setActionFont = [sessionAction](bool isBold) {
auto setActionFontBold = [sessionAction](bool isBold) {
QFont actionFont = sessionAction->font();
actionFont.setBold(isBold);
sessionAction->setFont(actionFont);
......@@ -439,10 +439,9 @@ void MainWindow::profileListChanged(const QList<QAction *> &sessionActions)
if (profile && profile->name() == sessionAction->text().remove(QLatin1Char('&'))) {
QIcon icon = KIconUtils::addOverlay(QIcon::fromTheme(profile->icon()), QIcon::fromTheme(QStringLiteral("emblem-favorite")), Qt::BottomRightCorner);
sessionAction->setIcon(icon);
setActionFont(true);
setActionFontBold(true);
} else {
sessionAction->setIcon(QIcon::fromTheme(profile->icon()));
setActionFont(false);
setActionFontBold(false);
}
}
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment