mirror of
https://github.com/Murmele/Gittyup.git
synced 2024-09-17 13:37:18 +03:00
Simplify HunkLabel
This commit is contained in:
parent
cec48ca95d
commit
5e124bd363
@ -42,8 +42,7 @@ void _HunkWidget::HunkLabel::paintEvent(QPaintEvent *event) {
|
|||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
painter.setRenderHint(QPainter::Antialiasing);
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
QFontMetrics fm = fontMetrics();
|
QFontMetrics fm = fontMetrics();
|
||||||
QRect rect = fm.boundingRect(0, 0, this->rect().width(), 300,
|
QRect rect = fm.boundingRect(0, 0, this->rect().width(), 300, 0, mName);
|
||||||
Qt::AlignLeft | Qt::ElideRight, mName);
|
|
||||||
painter.drawText(rect, Qt::AlignLeft | Qt::ElideRight, mName);
|
painter.drawText(rect, Qt::AlignLeft | Qt::ElideRight, mName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ class DisclosureButton;
|
|||||||
class Line;
|
class Line;
|
||||||
|
|
||||||
namespace _HunkWidget {
|
namespace _HunkWidget {
|
||||||
|
|
||||||
class HunkLabel : public QWidget {
|
class HunkLabel : public QWidget {
|
||||||
public:
|
public:
|
||||||
HunkLabel(const QString &name, bool submodule, QWidget *parent = nullptr);
|
HunkLabel(const QString &name, bool submodule, QWidget *parent = nullptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user