mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-12 19:19:03 +00:00
DolphinQt2: add QtUtils/ElidedButton
This commit is contained in:
parent
6dc3b2e8bc
commit
07c90bed08
5 changed files with 70 additions and 2 deletions
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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue