Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2022-02-06 19:10:00 +0300
committerJonathan White <support@dmapps.us>2022-02-20 23:37:22 +0300
commit0701d1d6cd4d01596b2586a5e02b9a2877c5320c (patch)
tree02ec79a7c610e300ef006b45c23e34478c7fe33f /src/gui
parentd10c5a4e2a5ca1a28f3cf2023bce41167c6a1a9c (diff)
Fix styling of database tag view in main window
* Also allow collapsing the entire left splitter instead of a dedicated option to hide the group view.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/DatabaseWidget.cpp7
-rw-r--r--src/gui/MainWindow.cpp5
-rw-r--r--src/gui/MainWindow.ui12
-rw-r--r--src/gui/group/GroupView.cpp7
-rw-r--r--src/gui/styles/base/basestyle.qss6
5 files changed, 10 insertions, 27 deletions
diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp
index c974c1c9b..118713872 100644
--- a/src/gui/DatabaseWidget.cpp
+++ b/src/gui/DatabaseWidget.cpp
@@ -99,6 +99,7 @@ DatabaseWidget::DatabaseWidget(QSharedPointer<Database> db, QWidget* parent)
// Setup tags view and place under groups
auto tagModel = new TagModel(m_db);
+ m_tagView->setObjectName("tagView");
m_tagView->setModel(tagModel);
m_tagView->setFrameStyle(QFrame::NoFrame);
m_tagView->setSelectionMode(QListView::SingleSelection);
@@ -111,9 +112,11 @@ DatabaseWidget::DatabaseWidget(QSharedPointer<Database> db, QWidget* parent)
auto tagsLayout = new QVBoxLayout();
auto tagsTitle = new QLabel(tr("Database Tags"));
tagsTitle->setProperty("title", true);
+ tagsWidget->setObjectName("tagWidget");
tagsWidget->setLayout(tagsLayout);
tagsLayout->addWidget(tagsTitle);
tagsLayout->addWidget(m_tagView);
+ tagsLayout->setMargin(0);
m_groupSplitter->setOrientation(Qt::Vertical);
m_groupSplitter->setChildrenCollapsible(true);
@@ -133,7 +136,7 @@ DatabaseWidget::DatabaseWidget(QSharedPointer<Database> db, QWidget* parent)
rightHandSideWidget->setLayout(rightHandSideVBox);
m_entryView = new EntryView(rightHandSideWidget);
- m_mainSplitter->setChildrenCollapsible(false);
+ m_mainSplitter->setChildrenCollapsible(true);
m_mainSplitter->addWidget(m_groupSplitter);
m_mainSplitter->addWidget(rightHandSideWidget);
m_mainSplitter->setStretchFactor(0, 30);
@@ -1728,6 +1731,7 @@ void DatabaseWidget::reloadDatabaseFile()
// Lock out interactions
m_entryView->setDisabled(true);
m_groupView->setDisabled(true);
+ m_tagView->setDisabled(true);
QApplication::processEvents();
QString error;
@@ -1773,6 +1777,7 @@ void DatabaseWidget::reloadDatabaseFile()
// Return control
m_entryView->setDisabled(false);
m_groupView->setDisabled(false);
+ m_tagView->setDisabled(false);
}
int DatabaseWidget::numberOfSelectedEntries() const
diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp
index 3a7af1751..441dcd513 100644
--- a/src/gui/MainWindow.cpp
+++ b/src/gui/MainWindow.cpp
@@ -1910,11 +1910,6 @@ 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);
diff --git a/src/gui/MainWindow.ui b/src/gui/MainWindow.ui
index c877313b9..248f0b4d4 100644
--- a/src/gui/MainWindow.ui
+++ b/src/gui/MainWindow.ui
@@ -377,7 +377,6 @@
<addaction name="menuTheme"/>
<addaction name="actionCompactMode"/>
<addaction name="actionAlwaysOnTop"/>
- <addaction name="actionShowGroupsPanel"/>
<addaction name="actionShowPreviewPanel"/>
<addaction name="actionShowToolbar"/>
<addaction name="actionHideUsernames"/>
@@ -1005,17 +1004,6 @@
<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>
diff --git a/src/gui/group/GroupView.cpp b/src/gui/group/GroupView.cpp
index 6024de5f1..5ffcc5d94 100644
--- a/src/gui/group/GroupView.cpp
+++ b/src/gui/group/GroupView.cpp
@@ -58,13 +58,6 @@ 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()
diff --git a/src/gui/styles/base/basestyle.qss b/src/gui/styles/base/basestyle.qss
index 8aee33b81..545980f8d 100644
--- a/src/gui/styles/base/basestyle.qss
+++ b/src/gui/styles/base/basestyle.qss
@@ -25,12 +25,14 @@ QCheckBox, QRadioButton {
spacing: 10px;
}
-DatabaseWidget, GroupView {
+DatabaseWidget, DatabaseWidget #groupView, DatabaseWidget #tagView {
background-color: palette(window);
border: none;
}
-EntryPreviewWidget QLineEdit, EntryPreviewWidget QTextEdit {
+EntryPreviewWidget QLineEdit, EntryPreviewWidget QTextEdit,
+EntryPreviewWidget TagsEdit
+{
background-color: palette(window);
border: none;
}