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);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QFontMetrics fm = fontMetrics();
|
||||
QRect rect = fm.boundingRect(0, 0, this->rect().width(), 300,
|
||||
Qt::AlignLeft | Qt::ElideRight, mName);
|
||||
QRect rect = fm.boundingRect(0, 0, this->rect().width(), 300, 0, mName);
|
||||
painter.drawText(rect, Qt::AlignLeft | Qt::ElideRight, mName);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,6 @@ class DisclosureButton;
|
||||
class Line;
|
||||
|
||||
namespace _HunkWidget {
|
||||
|
||||
class HunkLabel : public QWidget {
|
||||
public:
|
||||
HunkLabel(const QString &name, bool submodule, QWidget *parent = nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user