added custom window frame for windows

This commit is contained in:
fourtf
2018-01-24 15:08:22 +01:00
parent 2b94c4cd33
commit 36b010e046
9 changed files with 134 additions and 63 deletions
+9 -5
View File
@@ -2,10 +2,13 @@
#include "basewidget.hpp"
#include <functional>
class QHBoxLayout;
namespace chatterino {
namespace widgets {
class RippleEffectLabel;
class BaseWindow : public BaseWidget
{
@@ -17,7 +20,7 @@ public:
QWidget *getLayoutContainer();
bool hasCustomWindowFrame();
void addTitleBarButton(const QString &text);
void addTitleBarButton(const QString &text, std::function<void()> onClicked);
void setStayInScreenRect(bool value);
bool getStayInScreenRect() const;
@@ -43,14 +46,15 @@ private:
bool enableCustomFrame;
bool stayInScreenRect = false;
bool shown = false;
QHBoxLayout *titlebarBox;
QWidget *titleLabel;
QWidget *minButton;
QWidget *maxButton;
QWidget *exitButton;
RippleEffectLabel *minButton;
RippleEffectLabel *maxButton;
RippleEffectLabel *exitButton;
QWidget *layoutBase;
std::vector<QWidget *> widgets;
std::vector<RippleEffectLabel *> buttons;
};
} // namespace widgets
} // namespace chatterino