icon_button_with_text.h 638 B

123456789101112131415161718192021222324252627282930
  1. // This file is part of Desktop App Toolkit,
  2. // a set of libraries for developing nice desktop applications.
  3. //
  4. // For license and copyright information please follow this link:
  5. // https://github.com/desktop-app/legal/blob/master/LEGAL
  6. //
  7. #pragma once
  8. #include "ui/widgets/buttons.h"
  9. namespace Ui {
  10. class IconButtonWithText final : public Ui::IconButton {
  11. public:
  12. IconButtonWithText(
  13. not_null<RpWidget*> parent,
  14. const style::IconButtonWithText &st);
  15. void setText(const QString &text);
  16. protected:
  17. void paintEvent(QPaintEvent *e) override;
  18. private:
  19. const style::IconButtonWithText &_st;
  20. QString _text;
  21. };
  22. } // namespace Ui