diff --git a/resources/images/menu_black.png b/resources/images/menu_black.png
new file mode 100644
index 000000000..b718472d4
Binary files /dev/null and b/resources/images/menu_black.png differ
diff --git a/resources/images/menu_white.png b/resources/images/menu_white.png
new file mode 100644
index 000000000..42bdfb3e0
Binary files /dev/null and b/resources/images/menu_white.png differ
diff --git a/resources/resources.qrc b/resources/resources.qrc
index b12b67d4e..5625439de 100644
--- a/resources/resources.qrc
+++ b/resources/resources.qrc
@@ -67,6 +67,8 @@
images/buttons/unmod.png
images/emote_dark.svg
tlds.txt
+ images/menu_black.png
+ images/menu_white.png
qt.conf
diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp
index ed56c3e0b..af776185b 100644
--- a/src/widgets/BaseWindow.cpp
+++ b/src/widgets/BaseWindow.cpp
@@ -417,25 +417,36 @@ bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message, long *r
#ifdef USEWINSDK
MSG *msg = reinterpret_cast(message);
+ bool returnValue = false;
+
switch (msg->message) {
case WM_DPICHANGED:
- return handleDPICHANGED(msg);
+ returnValue = handleDPICHANGED(msg);
+ break;
case WM_SHOWWINDOW:
- return this->handleSHOWWINDOW(msg);
+ returnValue = this->handleSHOWWINDOW(msg);
+ break;
case WM_NCCALCSIZE:
- return this->handleNCCALCSIZE(msg, result);
+ returnValue = this->handleNCCALCSIZE(msg, result);
+ break;
case WM_SIZE:
- return this->handleSIZE(msg);
+ returnValue = this->handleSIZE(msg);
+ break;
case WM_NCHITTEST:
- return this->handleNCHITTEST(msg, result);
+ returnValue = this->handleNCHITTEST(msg, result);
+ break;
default:
return QWidget::nativeEvent(eventType, message, result);
}
+
+ QWidget::nativeEvent(eventType, message, result);
+
+ return returnValue;
#else
return QWidget::nativeEvent(eventType, message, result);
#endif
@@ -603,7 +614,7 @@ bool BaseWindow::handleSIZE(MSG *msg)
}
}
}
- return true;
+ return false;
#else
return false;
#endif
diff --git a/src/widgets/helper/RippleEffectButton.cpp b/src/widgets/helper/RippleEffectButton.cpp
index 0bf6f50fd..9c1ee66fb 100644
--- a/src/widgets/helper/RippleEffectButton.cpp
+++ b/src/widgets/helper/RippleEffectButton.cpp
@@ -34,6 +34,18 @@ const QPixmap &RippleEffectButton::getPixmap() const
return this->pixmap_;
}
+void RippleEffectButton::setDimPixmap(bool value)
+{
+ this->dimPixmap_ = value;
+
+ this->update();
+}
+
+bool RippleEffectButton::getDimPixmap() const
+{
+ return this->dimPixmap_;
+}
+
void RippleEffectButton::setBorderColor(const QColor &color)
{
this->borderColor_ = color;
@@ -51,6 +63,10 @@ void RippleEffectButton::paintEvent(QPaintEvent *)
painter.setRenderHint(QPainter::SmoothPixmapTransform);
if (!this->pixmap_.isNull()) {
+ if (!this->mouseOver_ && this->dimPixmap_) {
+ painter.setOpacity(0.7);
+ }
+
QRect rect = this->rect();
int s = int(6 * this->getScale());
@@ -60,6 +76,8 @@ void RippleEffectButton::paintEvent(QPaintEvent *)
rect.setBottom(rect.bottom() - s - s);
painter.drawPixmap(rect, this->pixmap_);
+
+ painter.setOpacity(1);
}
this->fancyPaint(painter);
diff --git a/src/widgets/helper/RippleEffectButton.hpp b/src/widgets/helper/RippleEffectButton.hpp
index 6fc4a2b1c..ebe048dfb 100644
--- a/src/widgets/helper/RippleEffectButton.hpp
+++ b/src/widgets/helper/RippleEffectButton.hpp
@@ -33,6 +33,9 @@ public:
void setPixmap(const QPixmap &pixmap_);
const QPixmap &getPixmap() const;
+ void setDimPixmap(bool value);
+ bool getDimPixmap() const;
+
void setBorderColor(const QColor &color);
const QColor &getBorderColor() const;
@@ -56,6 +59,7 @@ protected:
private:
QColor borderColor_;
QPixmap pixmap_;
+ bool dimPixmap_ = true;
QPoint mousePos_;
double hoverMultiplier_ = 0.0;
QTimer effectTimer_;
diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp
index 9d138b210..dc7b7ce66 100644
--- a/src/widgets/splits/SplitHeader.cpp
+++ b/src/widgets/splits/SplitHeader.cpp
@@ -35,20 +35,8 @@ SplitHeader::SplitHeader(Split *_split)
LayoutCreator layoutCreator(this);
auto layout = layoutCreator.emplace().withoutMargin();
+ layout->setSpacing(0);
{
- // dropdown label
- auto dropdown = layout.emplace(this).assign(&this->dropdownButton);
- dropdown->setMouseTracking(true);
- dropdown->setPixmap(*app->resources->splitHeaderContext->getPixmap());
- this->addDropdownItems(dropdown.getElement());
- QObject::connect(dropdown.getElement(), &RippleEffectButton::clicked, this, [this] {
- QTimer::singleShot(80, [&, this] {
- this->dropdownMenu.move(
- this->dropdownButton->mapToGlobal(QPoint(0, this->dropdownButton->height())));
- this->dropdownMenu.show();
- });
- });
-
// channel name label
auto title = layout.emplace