DolphinQt2: add QtUtils/ElidedButton

This commit is contained in:
Michael Maltese
2017-05-30 23:08:14 -07:00
parent 6dc3b2e8bc
commit 07c90bed08
5 changed files with 70 additions and 2 deletions

View File

@ -0,0 +1,20 @@
// Copyright 2017 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <QPushButton>
class ElidedButton : public QPushButton
{
public:
ElidedButton(const QString& text = QStringLiteral(""),
Qt::TextElideMode elide_mode = Qt::ElideRight);
Qt::TextElideMode elideMode() const;
void setElideMode(Qt::TextElideMode elide_mode);
private:
void paintEvent(QPaintEvent* event);
Qt::TextElideMode m_elide_mode;
};