forked from qt-creator/qt-creator
TextEditor: Make TextEditorLinkLabel elideable
And use that in the Include and Type Hierarchy panels to allow resizing the panels smaller. Fixes: QTCREATORBUG-23197 Change-Id: Ia4b39e610c7a4be4df564dc69573f4748d7634a5 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
22429728f1
commit
1d357f6b33
@@ -8438,8 +8438,9 @@ void TextEditorWidget::setupGenericHighlighter()
|
||||
// TextEditorLinkLabel
|
||||
//
|
||||
TextEditorLinkLabel::TextEditorLinkLabel(QWidget *parent)
|
||||
: QLabel(parent)
|
||||
: Utils::ElidingLabel(parent)
|
||||
{
|
||||
setElideMode(Qt::ElideMiddle);
|
||||
}
|
||||
|
||||
void TextEditorLinkLabel::setLink(Utils::Link link)
|
||||
|
@@ -35,10 +35,10 @@
|
||||
#include <coreplugin/editormanager/ieditorfactory.h>
|
||||
#include <coreplugin/helpitem.h>
|
||||
|
||||
#include <utils/elidinglabel.h>
|
||||
#include <utils/link.h>
|
||||
#include <utils/uncommentselection.h>
|
||||
|
||||
#include <QLabel>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QSharedPointer>
|
||||
#include <functional>
|
||||
@@ -611,7 +611,7 @@ private:
|
||||
friend class RefactorOverlay;
|
||||
};
|
||||
|
||||
class TEXTEDITOR_EXPORT TextEditorLinkLabel : public QLabel
|
||||
class TEXTEDITOR_EXPORT TextEditorLinkLabel : public Utils::ElidingLabel
|
||||
{
|
||||
public:
|
||||
TextEditorLinkLabel(QWidget *parent = nullptr);
|
||||
|
Reference in New Issue
Block a user