aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/widgets/IconLabel.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2021-11-22 03:55:16 +0100
committerPetr Mrázek <peterix@gmail.com>2021-11-22 03:55:16 +0100
commitb258eac215c791b2a8eed10cecbbf9551c87f0b9 (patch)
tree1ae72f62d344f6a9c982b9dc5d598d32fc742acc /launcher/ui/widgets/IconLabel.h
parent5040231f8d6ca865ea50250509c3315ea0c7400e (diff)
downloadPrismLauncher-b258eac215c791b2a8eed10cecbbf9551c87f0b9.tar.gz
PrismLauncher-b258eac215c791b2a8eed10cecbbf9551c87f0b9.tar.bz2
PrismLauncher-b258eac215c791b2a8eed10cecbbf9551c87f0b9.zip
NOISSUE continue reshuffling the codebase
Diffstat (limited to 'launcher/ui/widgets/IconLabel.h')
-rw-r--r--launcher/ui/widgets/IconLabel.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/launcher/ui/widgets/IconLabel.h b/launcher/ui/widgets/IconLabel.h
new file mode 100644
index 00000000..6d212c4c
--- /dev/null
+++ b/launcher/ui/widgets/IconLabel.h
@@ -0,0 +1,26 @@
+#pragma once
+#include <QWidget>
+#include <QIcon>
+
+class QStyleOption;
+
+/**
+ * This is a trivial widget that paints a QIcon of the specified size.
+ */
+class IconLabel : public QWidget
+{
+ Q_OBJECT
+
+public:
+ /// Create a line separator. orientation is the orientation of the line.
+ explicit IconLabel(QWidget *parent, QIcon icon, QSize size);
+
+ virtual QSize sizeHint() const;
+ virtual void paintEvent(QPaintEvent *);
+
+ void setIcon(QIcon icon);
+
+private:
+ QSize m_size;
+ QIcon m_icon;
+};