1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-08-29 05:49:24 +03:00

add bold presentation for Shares in menu

This commit is contained in:
Michail Vourlakos
2019-05-10 21:15:18 +03:00
parent fb718024cd
commit d08f1f9dbb
2 changed files with 10 additions and 1 deletions

View File

@ -73,6 +73,7 @@ QWidget *ActivitiesDelegate::createEditor(QWidget *parent, const QStyleOptionVie
if (info.state() != KActivities::Info::Invalid) {
QAction *action = new QAction(info.name());
action->setData(shownActivities[i]);
action->setIcon(QIcon::fromTheme(info.icon()));
action->setCheckable(true);
action->setChecked(assignedActivities.contains(shownActivities[i]));

View File

@ -60,10 +60,18 @@ QWidget *SharedDelegate::createEditor(QWidget *parent, const QStyleOptionViewIte
menu->setMinimumWidth(option.rect.width());
for (unsigned int i = 0; i < availableShares.count(); ++i) {
QAction *action = new QAction(m_settingsDialog->nameForId(availableShares[i]));
QString layoutName = m_settingsDialog->nameForId(availableShares[i]);
QAction *action = new QAction(layoutName);
action->setData(availableShares[i]);
action->setCheckable(true);
action->setChecked(assignedShares.contains(availableShares[i]));
if (m_settingsDialog->isActive(layoutName)) {
QFont font = action->font();
font.setBold(true);
action->setFont(font);
}
menu->addAction(action);
connect(action, &QAction::toggled, this, [this, button, action]() {