mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-29 03:24:36 +00:00
Qt: force hover event handling for flow widget items
Fixes hover movies for stylesheets that didn't have a game grid item style set for the hover state.
This commit is contained in:
parent
4a4f537ee8
commit
c245637c38
@ -4,6 +4,15 @@
|
||||
#include <QStyleOption>
|
||||
#include <QPainter>
|
||||
|
||||
flow_widget_item::flow_widget_item(QWidget* parent) : QWidget(parent)
|
||||
{
|
||||
setAttribute(Qt::WA_Hover); // We need to enable the hover attribute to ensure that hover events are handled.
|
||||
}
|
||||
|
||||
flow_widget_item::~flow_widget_item()
|
||||
{
|
||||
}
|
||||
|
||||
void flow_widget_item::polish_style()
|
||||
{
|
||||
style()->unpolish(this);
|
||||
|
@ -25,7 +25,8 @@ class flow_widget_item : public QWidget
|
||||
Q_PROPERTY(bool selected MEMBER selected) // Stylesheet workaround for descendants with parent pseudo state
|
||||
|
||||
public:
|
||||
using QWidget::QWidget;
|
||||
flow_widget_item(QWidget* parent);
|
||||
virtual ~flow_widget_item();
|
||||
|
||||
virtual void polish_style();
|
||||
|
||||
|
@ -7,6 +7,7 @@ game_list_grid_item::game_list_grid_item(QWidget* parent, game_info game, const
|
||||
: flow_widget_item(parent), movie_item_base(), m_game(std::move(game))
|
||||
{
|
||||
setObjectName("game_list_grid_item");
|
||||
setAttribute(Qt::WA_Hover); // We need to enable the hover attribute to ensure that hover events are handled.
|
||||
|
||||
cb_on_first_visibility = [this]()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user