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:
@ -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]));
|
||||
|
||||
|
@ -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]() {
|
||||
|
Reference in New Issue
Block a user