mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
19 lines
404 B
C++
19 lines
404 B
C++
#include "horizontalseparator.h"
|
|
|
|
#include <QPainter>
|
|
|
|
HorizontalSeparator::HorizontalSeparator(QWidget *parent)
|
|
: QWidget(parent)
|
|
{
|
|
setFixedHeight(1);
|
|
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
|
}
|
|
|
|
void HorizontalSeparator::paintEvent(QPaintEvent *e)
|
|
{
|
|
QWidget::paintEvent(e);
|
|
|
|
QPainter painter(this);
|
|
painter.fillRect(rect(), QColor(255, 255, 255, 255 * 0.5));
|
|
}
|