Commit 6dcf08af authored by Carsten Fuhrmann's avatar Carsten Fuhrmann

using png for min/max icon to fix the bug

parent 0be75f69
......@@ -103,29 +103,8 @@ ChannelListWidget::ChannelListWidget(QWidget *parent)
{
m_state = full;
QIcon myIcon = QApplication::style()->standardIcon(QStyle::SP_TitleBarMinButton);
for (auto singleMode : { QIcon::Normal,QIcon::Disabled,QIcon::Active,QIcon::Selected }) {
for (auto singleState : { QIcon::On,QIcon::Off }) {
const auto avalSize = myIcon.availableSizes(singleMode, singleState);
for (auto& singleSize : avalSize) {
QImage tempImage = myIcon.pixmap(singleSize).toImage();
tempImage.invertPixels();
m_minIcon.addPixmap(QPixmap::fromImage(std::move(tempImage)), singleMode, singleState);
}
}
}
myIcon = QApplication::style()->standardIcon(QStyle::SP_TitleBarMaxButton);
for (auto singleMode : { QIcon::Normal,QIcon::Disabled,QIcon::Active,QIcon::Selected }) {
for (auto singleState : { QIcon::On,QIcon::Off }) {
const auto avalSize = myIcon.availableSizes(singleMode, singleState);
for (auto& singleSize : avalSize) {
QImage tempImage = myIcon.pixmap(singleSize).toImage();
tempImage.invertPixels();
m_maxIcon.addPixmap(QPixmap::fromImage(std::move(tempImage)), singleMode, singleState);
}
}
}
m_minIcon.addFile("plugins\\qtTsOverlay\\min.png");
m_maxIcon.addFile("plugins\\qtTsOverlay\\max.png");
setAttribute(Qt::WA_TranslucentBackground);
setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::SplashScreen);
......@@ -139,6 +118,7 @@ ChannelListWidget::ChannelListWidget(QWidget *parent)
m_button = new QPushButton(this);
m_button->setIcon(m_minIcon);
m_button->setIconSize(QSize(8,8));
connect(m_button, &QPushButton::pressed, this, &ChannelListWidget::buttonPressed);
QFile style("plugins\\qtTsOverlay\\button.styl");
style.open(QIODevice::ReadOnly);
......
padding:2px;
border-radius:5px;
border-style:solid;
border-width:1px;
border-color:rgb(100,100,100);
background-color:rgba(50,50,50,150);
QLabel {
padding:2px;
border-radius:5px;
border-style:solid;
border-width:1px;
border-color:rgb(100,100,100);
background-color:rgba(50,50,50,150);
}
QPushButton {
width:10px;
height:10px;
font-size:10px;
background-color:rgba(50,50,50,0);
color:rgb(255,255,255);
border-style:solid;
border-radius:5px;
border-width:1px;
......@@ -13,13 +11,6 @@ QPushButton {
}
QPushButton:hover {
width:10px;
height:10px;
background-color:rgba(255,255,255,100);
color:rgb(0,0,0);
border-style:solid;
border-radius:5px;
border-width:1px;
border-color:rgb(100,100,100);
padding:2px;
}
\ No newline at end of file
QTreeWidget, * {
border-style:none;
background-color:rgba(0,0,0,0);
}
QTreeWidget::item {
border-style:none;
border-radius:5px;
color:rgb(255,255,255);
selection-background-color:transparent;
background-color:transparent
}
QTreeWidget::item:hover,QTreeWidget::item:hover:selected {
border-radius:5px;
border-style:none;
border-width:1px;
border-color:rgb(100,100,100);
background-color:rgba(255,255,255,100);
}
QTreeWidget::item:selected {
background-color:rgba(255,255,255,0);
border-style:none;
}
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