diff --git a/SoundOverlay/SoundOverlay.cpp b/SoundOverlay/SoundOverlay.cpp index acf2720..6ee20dd 100644 --- a/SoundOverlay/SoundOverlay.cpp +++ b/SoundOverlay/SoundOverlay.cpp @@ -41,6 +41,11 @@ void SoundOverlay::paintEvent(QPaintEvent *event) // Get the main background color from the widget's palette QColor main_bg_color = this->palette().color(QPalette::Window); + if (Utils::isDarkMode(main_bg_color)) { + main_bg_color = main_bg_color.lighter(140); + } else { + main_bg_color = main_bg_color.darker(110); + } // Set the brush to fill the rectangle with the background color painter.setBrush(main_bg_color); painter.setPen(Qt::NoPen); // No border for background fill @@ -58,11 +63,6 @@ void SoundOverlay::paintEvent(QPaintEvent *event) borderPen.setWidth(1); painter.setPen(borderPen); painter.setBrush(Qt::NoBrush); // No fill for border - - // Draw the border around the adjusted rectangle - QPainterPath borderPath; - borderPath.addRoundedRect(this->rect().adjusted(0, 0, -1, -1), 8, 8); // Full size for outer border - painter.drawPath(borderPath); } void SoundOverlay::animateIn() diff --git a/SoundOverlay/SoundOverlay.ui b/SoundOverlay/SoundOverlay.ui index 34ddc91..7a9f426 100644 --- a/SoundOverlay/SoundOverlay.ui +++ b/SoundOverlay/SoundOverlay.ui @@ -7,13 +7,16 @@ 0 0 216 - 47 + 50 Form + + 12 +