Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateviewhelpers.cpp
Show First 20 Lines • Show All 1435 Lines • ▼ Show 20 Line(s) | 1427 | KateIconBorder::KateIconBorder(KateViewInternal *internalView, QWidget *parent) | |||
---|---|---|---|---|---|
1436 | , m_foldingMarkersOn(false) | 1436 | , m_foldingMarkersOn(false) | ||
1437 | , m_dynWrapIndicatorsOn(false) | 1437 | , m_dynWrapIndicatorsOn(false) | ||
1438 | , m_annotationBorderOn(false) | 1438 | , m_annotationBorderOn(false) | ||
1439 | , m_updatePositionToArea(true) | 1439 | , m_updatePositionToArea(true) | ||
1440 | , m_annotationItemDelegate(new KateAnnotationItemDelegate(m_viewInternal, this)) | 1440 | , m_annotationItemDelegate(new KateAnnotationItemDelegate(m_viewInternal, this)) | ||
1441 | { | 1441 | { | ||
1442 | setAcceptDrops(true); | 1442 | setAcceptDrops(true); | ||
1443 | setAttribute(Qt::WA_StaticContents); | 1443 | setAttribute(Qt::WA_StaticContents); | ||
1444 | | ||||
1445 | // See: https://doc.qt.io/qt-5/qwidget.html#update. As this widget does not | ||||
1446 | // have a background, there's no need for Qt to erase the widget's area | ||||
1447 | // before repainting. Enabling this prevents flickering when the widget is | ||||
1448 | // repainted. | ||||
1449 | setAttribute(Qt::WA_OpaquePaintEvent); | ||||
1450 | | ||||
1444 | setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum); | 1451 | setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum); | ||
1445 | setMouseTracking(true); | 1452 | setMouseTracking(true); | ||
1446 | m_doc->setMarkDescription(MarkInterface::markType01, i18n("Bookmark")); | 1453 | m_doc->setMarkDescription(MarkInterface::markType01, i18n("Bookmark")); | ||
1447 | m_doc->setMarkPixmap(MarkInterface::markType01, QIcon::fromTheme(QStringLiteral("bookmarks")).pixmap(32, 32)); | 1454 | m_doc->setMarkPixmap(MarkInterface::markType01, QIcon::fromTheme(QStringLiteral("bookmarks")).pixmap(32, 32)); | ||
1448 | 1455 | | |||
1449 | connect(m_annotationItemDelegate, &AbstractAnnotationItemDelegate::sizeHintChanged, | 1456 | connect(m_annotationItemDelegate, &AbstractAnnotationItemDelegate::sizeHintChanged, | ||
1450 | this, &KateIconBorder::updateAnnotationBorderWidth); | 1457 | this, &KateIconBorder::updateAnnotationBorderWidth); | ||
1451 | 1458 | | |||
▲ Show 20 Lines • Show All 1647 Lines • Show Last 20 Lines |