mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-06 00:35:58 +01:00
22 lines
410 B
C
22 lines
410 B
C
|
#ifndef ELIDEDBUTTON_H
|
||
|
#define ELIDEDBUTTON_H
|
||
|
|
||
|
#include <QPushButton>
|
||
|
|
||
|
class ElidedButton : public QPushButton
|
||
|
{
|
||
|
public:
|
||
|
explicit ElidedButton(QWidget *parent = nullptr);
|
||
|
explicit ElidedButton(const QString &text, QWidget *parent = nullptr);
|
||
|
void setText(QString);
|
||
|
|
||
|
protected:
|
||
|
void resizeEvent(QResizeEvent *);
|
||
|
|
||
|
private:
|
||
|
void updateText();
|
||
|
QString og_text;
|
||
|
};
|
||
|
|
||
|
#endif // ELIDEDBUTTON_H
|