mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#include "widgets/helper/rippleeffectlabel.hpp"
|
|
#include "singletons/thememanager.hpp"
|
|
#include "widgets/helper/splitheader.hpp"
|
|
|
|
#include <QBrush>
|
|
#include <QPainter>
|
|
|
|
namespace chatterino {
|
|
namespace widgets {
|
|
|
|
RippleEffectLabel::RippleEffectLabel(BaseWidget *parent, int spacing)
|
|
: RippleEffectButton(parent)
|
|
, label(this)
|
|
{
|
|
setLayout(&this->hbox);
|
|
|
|
this->label.setAlignment(Qt::AlignCenter);
|
|
|
|
this->hbox.setMargin(0);
|
|
this->hbox.addSpacing(spacing);
|
|
this->hbox.addWidget(&this->label);
|
|
this->hbox.addSpacing(spacing);
|
|
}
|
|
|
|
RippleEffectLabel2::RippleEffectLabel2(BaseWidget *parent, int padding)
|
|
: RippleEffectButton(parent)
|
|
, label_(this)
|
|
{
|
|
auto *hbox = new QHBoxLayout(this);
|
|
this->setLayout(hbox);
|
|
|
|
// this->label_.setAlignment(Qt::AlignCenter);
|
|
this->label_.setCentered(true);
|
|
|
|
hbox->setMargin(0);
|
|
// hbox.addSpacing(spacing);
|
|
hbox->addWidget(&this->label_);
|
|
// hbox.addSpacing(spacing);
|
|
}
|
|
|
|
Label &RippleEffectLabel2::getLabel()
|
|
{
|
|
return this->label_;
|
|
}
|
|
|
|
} // namespace widgets
|
|
} // namespace chatterino
|