Skip to content

Commit

Permalink
Prevent KeeShare banner from squashing group panel
Browse files Browse the repository at this point in the history
* Fixes #9569
  • Loading branch information
droidmonkey committed Aug 6, 2023
1 parent d025f02 commit 286b5cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/gui/DatabaseWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include "gui/group/GroupView.h"
#include "gui/reports/ReportsDialog.h"
#include "gui/tag/TagView.h"
#include "gui/widgets/ElidedLabel.h"
#include "keeshare/KeeShare.h"

#ifdef WITH_XC_NETWORKING
Expand All @@ -73,7 +74,7 @@ DatabaseWidget::DatabaseWidget(QSharedPointer<Database> db, QWidget* parent)
, m_previewView(new EntryPreviewWidget(this))
, m_previewSplitter(new QSplitter(m_mainWidget))
, m_searchingLabel(new QLabel(this))
, m_shareLabel(new QLabel(this))
, m_shareLabel(new ElidedLabel(this))
, m_csvImportWizard(new CsvImportWizard(this))
, m_editEntryWidget(new EditEntryWidget(this))
, m_editGroupWidget(new EditGroupWidget(this))
Expand Down Expand Up @@ -159,7 +160,7 @@ DatabaseWidget::DatabaseWidget(QSharedPointer<Database> db, QWidget* parent)

#ifdef WITH_XC_KEESHARE
m_shareLabel->setObjectName("KeeShareBanner");
m_shareLabel->setText(tr("Shared group…"));
m_shareLabel->setRawText(tr("Shared group…"));
m_shareLabel->setAlignment(Qt::AlignCenter);
m_shareLabel->setVisible(false);
#endif
Expand Down Expand Up @@ -1520,7 +1521,7 @@ void DatabaseWidget::onGroupChanged()
#ifdef WITH_XC_KEESHARE
auto shareLabel = KeeShare::sharingLabel(group);
if (!shareLabel.isEmpty()) {
m_shareLabel->setText(shareLabel);
m_shareLabel->setRawText(shareLabel);
m_shareLabel->setVisible(true);
} else {
m_shareLabel->setVisible(false);
Expand Down
3 changes: 2 additions & 1 deletion src/gui/DatabaseWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class QLabel;
class MessageWidget;
class EntryPreviewWidget;
class TagView;
class ElidedLabel;

namespace Ui
{
Expand Down Expand Up @@ -280,7 +281,7 @@ private slots:
QPointer<EntryPreviewWidget> m_previewView;
QPointer<QSplitter> m_previewSplitter;
QPointer<QLabel> m_searchingLabel;
QPointer<QLabel> m_shareLabel;
QPointer<ElidedLabel> m_shareLabel;
QPointer<CsvImportWizard> m_csvImportWizard;
QPointer<EditEntryWidget> m_editEntryWidget;
QPointer<EditGroupWidget> m_editGroupWidget;
Expand Down

0 comments on commit 286b5cf

Please sign in to comment.