diff --git a/plugins/decoration/button.cpp b/plugins/decoration/button.cpp index 4c9cca3..e7afb86 100644 --- a/plugins/decoration/button.cpp +++ b/plugins/decoration/button.cpp @@ -74,15 +74,15 @@ void Button::paint(QPainter *painter, const QRect &repaintRegion) painter->setRenderHint(QPainter::SmoothPixmapTransform, false); painter->setRenderHints(QPainter::Antialiasing, true); - QRect btnRect(0, 0, 29 * decoration->devicePixelRatio(), - 29 * decoration->devicePixelRatio()); + QRect btnRect(0, 0, 28 * decoration->devicePixelRatio(), + 28 * decoration->devicePixelRatio()); btnRect.moveCenter(rect.center()); if (isHovered() || isPressed()) { painter->setPen(Qt::NoPen); painter->setBrush(isDarkMode ? isPressed() ? QColor(255, 255, 255, 255 * 0.1) : QColor(255, 255, 255, 255 * 0.15) : isPressed() ? QColor(0, 0, 0, 255 * 0.15) : QColor(0, 0, 0, 255 * 0.1)); - painter->drawRoundedRect(btnRect, btnRect.height() / 2, btnRect.height() / 2); + painter->drawRoundedRect(btnRect.adjusted(2, 2, -2, -2), btnRect.height() / 2, btnRect.height() / 2); } switch (type()) { diff --git a/plugins/decoration/decoration.cpp b/plugins/decoration/decoration.cpp index 5709093..a080d55 100644 --- a/plugins/decoration/decoration.cpp +++ b/plugins/decoration/decoration.cpp @@ -229,8 +229,8 @@ void Decoration::updateButtonsGeometryDelayed() void Decoration::updateButtonsGeometry() { auto s = settings(); - auto c = client().toStrongRef().data(); - int rightMargin = 4; + // auto c = client().toStrongRef().data(); + int rightMargin = 2; int btnSpacing = 8; foreach (const QPointer &button, m_leftButtons->buttons() + m_rightButtons->buttons()) { @@ -329,7 +329,7 @@ void Decoration::updateShadow() void Decoration::updateBtnPixmap() { - int size = 30; + int size = 28; QString dirName = darkMode() ? "dark" : "light"; m_closeBtnPixmap = fromSvgToPixmap(QString(":/images/%1/close_normal.svg").arg(dirName), QSize(size, size)); diff --git a/plugins/decoration/decoration.h b/plugins/decoration/decoration.h index 7892a40..099f5c8 100644 --- a/plugins/decoration/decoration.h +++ b/plugins/decoration/decoration.h @@ -16,6 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #pragma once // KDecoration @@ -91,7 +92,7 @@ private: friend class MinimizeButton; private: - int m_titleBarHeight = 33; + int m_titleBarHeight = 30; int m_frameRadius = 11; qreal m_devicePixelRatio = 1.0; QColor m_titleBarBgColor = QColor(255, 255, 255, 255);