Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On some DEs the button flash doesn't work #37

Open
LeXofLeviafan opened this issue Mar 22, 2020 · 2 comments
Open

On some DEs the button flash doesn't work #37

LeXofLeviafan opened this issue Mar 22, 2020 · 2 comments

Comments

@LeXofLeviafan
Copy link

When trying to run QJoyPad in LXQT, regardless of widget theme selected, the button flashing (highlighting gamepad input) appears to have no effect. I managed to find a patch that somewhat fixes it (for those cases):

// flash.cpp, FlashButton::FlashButton
  setAutoDefault( false );
+ setAutoFillBackground( true );
  setFocusPolicy(Qt::NoFocus);

// flash.cpp, FlashButton::flash
  if (flashing)
  {
+     setFlat( false );
      setPalette( normalPalette );
      flashing = false;
  }
  else
  {
+     setFlat( true );
      setPalette( flashPalette );
      flashing = true;
  }

Without setAutoFillBackground, recoloring doesn't affect background (no idea how to make it affect text as well); without setFlat, the change only affects borders (and in some themes borders aren't affected either).

I'd suggest to perhaps add this as a build option (directive for cmake?) for those who have a similar problem. Or maybe someone who knows Qt can come up with a proper fix instead…

@MagnusVesper
Copy link

Thank you for posting this!
I'm running Linux Mint with the Cinnamon DE. Adding those 3 lines and recompiling made the button flashes show.

@panzi
Copy link
Owner

panzi commented Jul 16, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants