mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-18 03:00:50 -04:00
parent
34b44e7496
commit
fa546c440e
7 changed files with 32 additions and 1 deletions
|
@ -92,6 +92,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
|||
{Config::GUI_Language, {QS("GUI/Language"), Roaming, QS("system")}},
|
||||
{Config::GUI_HideToolbar, {QS("GUI/HideToolbar"), Roaming, false}},
|
||||
{Config::GUI_MovableToolbar, {QS("GUI/MovableToolbar"), Roaming, false}},
|
||||
{Config::GUI_HideGroupsPanel, {QS("GUI/HideGroupsPanel"), Roaming, false}},
|
||||
{Config::GUI_HidePreviewPanel, {QS("GUI/HidePreviewPanel"), Roaming, false}},
|
||||
{Config::GUI_ToolButtonStyle, {QS("GUI/ToolButtonStyle"), Roaming, Qt::ToolButtonIconOnly}},
|
||||
{Config::GUI_ShowTrayIcon, {QS("GUI/ShowTrayIcon"), Roaming, false}},
|
||||
|
|
|
@ -74,6 +74,7 @@ public:
|
|||
GUI_Language,
|
||||
GUI_HideToolbar,
|
||||
GUI_MovableToolbar,
|
||||
GUI_HideGroupsPanel,
|
||||
GUI_HidePreviewPanel,
|
||||
GUI_ToolButtonStyle,
|
||||
GUI_ShowTrayIcon,
|
||||
|
|
|
@ -1792,6 +1792,11 @@ void MainWindow::initViewMenu()
|
|||
applySettingsChanges();
|
||||
});
|
||||
|
||||
m_ui->actionShowGroupsPanel->setChecked(!config()->get(Config::GUI_HideGroupsPanel).toBool());
|
||||
connect(m_ui->actionShowGroupsPanel, &QAction::toggled, this, [](bool checked) {
|
||||
config()->set(Config::GUI_HideGroupsPanel, !checked);
|
||||
});
|
||||
|
||||
m_ui->actionShowPreviewPanel->setChecked(!config()->get(Config::GUI_HidePreviewPanel).toBool());
|
||||
connect(m_ui->actionShowPreviewPanel, &QAction::toggled, this, [](bool checked) {
|
||||
config()->set(Config::GUI_HidePreviewPanel, !checked);
|
||||
|
|
|
@ -381,6 +381,7 @@
|
|||
</widget>
|
||||
<addaction name="menuTheme"/>
|
||||
<addaction name="actionCompactMode"/>
|
||||
<addaction name="actionShowGroupsPanel"/>
|
||||
<addaction name="actionShowPreviewPanel"/>
|
||||
<addaction name="actionShowToolbar"/>
|
||||
</widget>
|
||||
|
@ -961,6 +962,17 @@
|
|||
<string>Show Toolbar</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShowGroupsPanel">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Groups Panel</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShowPreviewPanel">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <QMimeData>
|
||||
#include <QShortcut>
|
||||
|
||||
#include "core/Config.h"
|
||||
#include "core/Database.h"
|
||||
#include "core/Group.h"
|
||||
#include "gui/group/GroupModel.h"
|
||||
|
@ -52,6 +53,13 @@ GroupView::GroupView(Database* db, QWidget* parent)
|
|||
viewport()->setAcceptDrops(true);
|
||||
setDropIndicatorShown(true);
|
||||
setDefaultDropAction(Qt::MoveAction);
|
||||
setVisible(!config()->get(Config::GUI_HideGroupsPanel).toBool());
|
||||
|
||||
connect(config(), &Config::changed, this, [this](Config::ConfigKey key) {
|
||||
if (key == Config::GUI_HideGroupsPanel) {
|
||||
setVisible(!config()->get(Config::GUI_HideGroupsPanel).toBool());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void GroupView::contextMenuShortcutPressed()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue