Skip to content

Commit

Permalink
Fixed mouseover for radio buttons without animation
Browse files Browse the repository at this point in the history
  • Loading branch information
tsujan committed Apr 18, 2024
1 parent 26cab47 commit 550374f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions Kvantum/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ V1.1.1
---------
* The support for qmake is back without KWindowSystem and without being advertised.
* Added a workaround for a backward incompatible change in how Qt 6.7 draws item views.
* Fixed an old issue in drawing radio buttons under mouse cursor without animation.

V1.1.0
---------
Expand Down
12 changes: 8 additions & 4 deletions Kvantum/style/Kvantum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2744,11 +2744,15 @@ void Style::drawPrimitive(QStyle::PrimitiveElement element,
else
suffix = "-normal";
}
bool animate(opacityTimer_ && !qstyleoption_cast<const QStyleOptionMenuItem*>(option));
if (!animate && widget != nullptr // not QML or Libreoffice's unstyled menu
&& elementExists("menu-"+ispec.element+suffix))
bool animate(opacityTimer_);
if (qstyleoption_cast<const QStyleOptionMenuItem*>(option))
{
prefix = "menu-"; // make exception for menuitems
animate = false; // no animation for menuitems
if (widget != nullptr // not QML or Libreoffice's unstyled menu
&& elementExists("menu-"+ispec.element+suffix))
{
prefix = "menu-"; // make exception for menuitems
}
}
if (isWidgetInactive(widget))
suffix.append("-inactive");
Expand Down
2 changes: 1 addition & 1 deletion Kvantum/style/viewItems.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Adapted from Qt -> "qcommonstyle.cpp" to control how view-items are drawn.

/*
* Copyright (C) Pedram Pourang (aka Tsu Jan) 2021 <[email protected]>
* Copyright (C) Pedram Pourang (aka Tsu Jan) 2021-2024 <[email protected]>
*
* Kvantum is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
Expand Down

0 comments on commit 550374f

Please sign in to comment.