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) ...@@ -10,7 +10,7 @@ ChannelTree::ChannelTree(ChannelListWidget * widget, QWidget *parent)
setHeaderHidden(true); setHeaderHidden(true);
setExpandsOnDoubleClick(false); 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); setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
} }
...@@ -55,6 +55,9 @@ ChannelListWidget::ChannelListWidget(QWidget *parent) ...@@ -55,6 +55,9 @@ ChannelListWidget::ChannelListWidget(QWidget *parent)
setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::SplashScreen); setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::SplashScreen);
move(320, 200); 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); QVBoxLayout* layout = new QVBoxLayout(this);
layout->setMargin(0); layout->setMargin(0);
layout->setSpacing(0); layout->setSpacing(0);
...@@ -72,6 +75,7 @@ ChannelListWidget::~ChannelListWidget() ...@@ -72,6 +75,7 @@ ChannelListWidget::~ChannelListWidget()
{ {
delete m_child; delete m_child;
delete m_grip; delete m_grip;
delete m_background;
} }
QTreeWidget * ChannelListWidget::getTree() QTreeWidget * ChannelListWidget::getTree()
...@@ -83,5 +87,6 @@ void ChannelListWidget::resizeEvent(QResizeEvent *event) ...@@ -83,5 +87,6 @@ void ChannelListWidget::resizeEvent(QResizeEvent *event)
{ {
QWidget::resizeEvent(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 @@ ...@@ -3,6 +3,7 @@
#include <QPoint> #include <QPoint>
#include <QTreeWidget> #include <QTreeWidget>
#include <QSizeGrip> #include <QSizeGrip>
#include <QLabel>
class ChannelListWidget; class ChannelListWidget;
...@@ -39,6 +40,7 @@ public: ...@@ -39,6 +40,7 @@ public:
private: private:
ChannelTree *m_child; ChannelTree *m_child;
QSizeGrip *m_grip; QSizeGrip *m_grip;
QLabel *m_background;
protected: protected:
virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; 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