xdg-desktop-portal-hyprland/hyprland-share-picker/elidedbutton.h
rurigk c06fd88b3d
picker: Adds elided buttons for better readability (#176)
It also fixes the region button size and alignment

fixes hyprwm#175
2024-01-29 09:45:09 +00:00

21 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