diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 440df2afc3..c227308bed 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -37,6 +37,7 @@ #include "core/Merger.h" #include "gui/Clipboard.h" #include "gui/CloneDialog.h" +#include "gui/widgets/ElidedLabel.h" #include "gui/EntryPreviewWidget.h" #include "gui/FileDialog.h" #include "gui/GuiTools.h" @@ -73,7 +74,7 @@ DatabaseWidget::DatabaseWidget(QSharedPointer 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)) @@ -159,7 +160,7 @@ DatabaseWidget::DatabaseWidget(QSharedPointer 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 @@ -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); diff --git a/src/gui/DatabaseWidget.h b/src/gui/DatabaseWidget.h index a8ae0511ce..72e549f549 100644 --- a/src/gui/DatabaseWidget.h +++ b/src/gui/DatabaseWidget.h @@ -50,6 +50,7 @@ class QLabel; class MessageWidget; class EntryPreviewWidget; class TagView; +class ElidedLabel; namespace Ui { @@ -279,7 +280,7 @@ private slots: QPointer m_previewView; QPointer m_previewSplitter; QPointer m_searchingLabel; - QPointer m_shareLabel; + QPointer m_shareLabel; QPointer m_csvImportWizard; QPointer m_editEntryWidget; QPointer m_editGroupWidget;