mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-25 19:21:41 +03:00
add KDE official Help menu
--in that way Latte gains easily language switching from user --exposure of how/where to report bugs
This commit is contained in:
parent
07a1065320
commit
fdf798b49f
@ -156,12 +156,17 @@ SettingsDialog::SettingsDialog(QWidget *parent, Latte::Corona *corona)
|
||||
menuBar->addMenu(fileMenu);
|
||||
|
||||
QMenu *layoutMenu = new QMenu(i18n("Layout"), menuBar);
|
||||
//rightAlignedMenuBar->addMenu(helpMenu);
|
||||
menuBar->addMenu(layoutMenu);
|
||||
|
||||
QMenu *helpMenu = new QMenu(i18n("Help"), menuBar);
|
||||
//! Help menu
|
||||
m_helpMenu = new KHelpMenu(menuBar);
|
||||
menuBar->addMenu(m_helpMenu->menu());
|
||||
//rightAlignedMenuBar->addMenu(helpMenu);
|
||||
menuBar->addMenu(helpMenu);
|
||||
|
||||
//! hide help menu actions that are not used
|
||||
m_helpMenu->action(KHelpMenu::menuHelpContents)->setVisible(false);
|
||||
m_helpMenu->action(KHelpMenu::menuWhatsThis)->setVisible(false);
|
||||
|
||||
|
||||
QAction *screensAction = fileMenu->addAction(i18n("Sc&reens..."));
|
||||
screensAction->setIcon(QIcon::fromTheme("document-properties"));
|
||||
@ -180,9 +185,6 @@ SettingsDialog::SettingsDialog(QWidget *parent, Latte::Corona *corona)
|
||||
infoLayoutAction->setIcon(QIcon::fromTheme("document-properties"));
|
||||
infoLayoutAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_I));
|
||||
|
||||
QAction *aboutAction = helpMenu->addAction(i18n("About Latte"));
|
||||
aboutAction->setIcon(QIcon::fromTheme("latte-dock"));
|
||||
|
||||
//! RTL support for labels in preferences
|
||||
if (qApp->layoutDirection() == Qt::RightToLeft) {
|
||||
ui->behaviorLbl->setAlignment(Qt::AlignRight | Qt::AlignTop);
|
||||
@ -239,7 +241,6 @@ SettingsDialog::SettingsDialog(QWidget *parent, Latte::Corona *corona)
|
||||
updateApplyButtonsState();
|
||||
});
|
||||
|
||||
connect(aboutAction, &QAction::triggered, m_corona, &Latte::Corona::aboutApplication);
|
||||
connect(quitAction, &QAction::triggered, this, [&]() {
|
||||
close();
|
||||
m_corona->closeApplication();
|
||||
|
@ -33,6 +33,9 @@
|
||||
#include <QStandardItemModel>
|
||||
#include <QTimer>
|
||||
|
||||
// KDE
|
||||
#include <KHelpMenu>
|
||||
|
||||
namespace Ui {
|
||||
class SettingsDialog;
|
||||
}
|
||||
@ -145,6 +148,8 @@ private:
|
||||
QTimer m_activityClosedTimer;
|
||||
bool m_blockDeleteOnReject{false};
|
||||
|
||||
KHelpMenu *m_helpMenu{nullptr};
|
||||
|
||||
Latte::Corona *m_corona{nullptr};
|
||||
|
||||
QAction *m_editLayoutAction{nullptr};
|
||||
|
Loading…
Reference in New Issue
Block a user