continue;
}
- auto* pluginAction = new QAction(QString("Show %1").arg(plugin->displayName()), this);
+ auto* pluginAction = new QAction(plugin->displayName(), this);
ui->menuView->insertAction(plugin->insertFirst() ? ui->actionPlaceholderBegin : ui->actionPlaceholderEnd, pluginAction);
connect(pluginAction, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
m_tabShowHideMapper[plugin->displayName()] = new ToggleTab(plugin->tab(), plugin->displayName(), plugin->displayName(), pluginAction, this);
const auto toggleTab = m_tabShowHideMapper.value(key);
bool show = enabledTabs.contains(key);
- toggleTab->menuAction->setText((show ? QString("Hide ") : QString("Show ")) + toggleTab->name);
+ toggleTab->menuAction->setText(toggleTab->name);
+ toggleTab->menuAction->setCheckable(true);
+ toggleTab->menuAction->setChecked(show);
ui->tabWidget->setTabVisible(ui->tabWidget->indexOf(toggleTab->tab), show);
}
connect(m_tabShowHideSignalMapper, &QSignalMapper::mappedString, this, &MainWindow::menuToggleTabVisible);
conf()->set(Config::enabledTabs, enabledTabs);
ui->tabWidget->setTabVisible(ui->tabWidget->indexOf(toggleTab->tab), show);
- toggleTab->menuAction->setText((show ? QString("Hide ") : QString("Show ")) + toggleTab->name);
+ toggleTab->menuAction->setText(toggleTab->name);
}
void MainWindow::menuClearHistoryClicked() {
</property>
</action>
<action name="actionShow_Coins">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
<property name="text">
- <string>Show Coins</string>
+ <string>Coins</string>
</property>
</action>
<action name="actionShow_xmr_to">
</property>
</action>
<action name="actionShow_Contacts">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
<property name="text">
- <string>Show Contacts</string>
+ <string>Contacts</string>
</property>
</action>
<action name="actionShow_Notes">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
<property name="text">
- <string>Show Notes</string>
+ <string>Notes</string>
</property>
</action>
</widget>