mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
DolphinQt2: add QtUtils/ElidedButton
This commit is contained in:
20
Source/Core/DolphinQt2/QtUtils/ElidedButton.h
Normal file
20
Source/Core/DolphinQt2/QtUtils/ElidedButton.h
Normal 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;
|
||||
};
|
Reference in New Issue
Block a user