Commit 7e76e934 authored by Carsten Fuhrmann's avatar Carsten Fuhrmann

make the size grip being inside the background

parent 1fe231e5
......@@ -10,7 +10,7 @@ ChannelTree::ChannelTree(ChannelListWidget * widget, QWidget *parent)
setHeaderHidden(true);
setExpandsOnDoubleClick(false);
setStyleSheet("padding:2px;border-radius:5px;border-style:solid;border-width:1px;border-color:rgb(100,100,100); background-color:rgba(50,50,50,150); color:rgb(255,255,255);");
setStyleSheet("border-style:none; background-color:rgba(0,0,0,0); color:rgb(255,255,255);");
setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
}
......@@ -55,6 +55,9 @@ ChannelListWidget::ChannelListWidget(QWidget *parent)
setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::SplashScreen);
move(320, 200);
m_background = new QLabel(this);
m_background->setStyleSheet("padding:2px;border-radius:5px;border-style:solid;border-width:1px;border-color:rgb(100,100,100); background-color:rgba(50,50,50,150);");
QVBoxLayout* layout = new QVBoxLayout(this);
layout->setMargin(0);
layout->setSpacing(0);
......@@ -72,6 +75,7 @@ ChannelListWidget::~ChannelListWidget()
{
delete m_child;
delete m_grip;
delete m_background;
}
QTreeWidget * ChannelListWidget::getTree()
......@@ -83,5 +87,6 @@ void ChannelListWidget::resizeEvent(QResizeEvent *event)
{
QWidget::resizeEvent(event);
m_child->resize(size());
m_child->resize(m_child->size() - (event->oldSize() - event->size()));
m_background->resize(size());
}
......@@ -3,6 +3,7 @@
#include <QPoint>
#include <QTreeWidget>
#include <QSizeGrip>
#include <QLabel>
class ChannelListWidget;
......@@ -39,6 +40,7 @@ public:
private:
ChannelTree *m_child;
QSizeGrip *m_grip;
QLabel *m_background;
protected:
virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment