OMGDuke / protondb-decky

ProtonDB Badges is a plugin for Decky Loader to display tappable ProtonDB badges on your game pages
https://decky.xyz/
GNU General Public License v3.0
93 stars 10 forks source link

Themes are overwriting medal colors due to shared classes #8

Closed joamjoamjoam closed 2 years ago

joamjoamjoam commented 2 years ago

The DialogButton class shares classes with most of the buttons in the Steam Deck UI so it makes it almost impossible to theme buttons in the quick access menu without those changes affecting the proton medal too.

it becomes particularly problematic when setting background colors.

image

joamjoamjoam commented 2 years ago

Its possible to theme the buttons in the correct scope but im not sure that everyone will know about the dialog buttons being used on the SP tab. From what I can tell the only Dialog Buttons on the SP tab are the medals.

PartyWumpus commented 2 years ago

it's unlikely somebody would actually want to recolor the protonDB buttons, it's probably safe to just use !important, they can still overwrite it if they want if they also use !important

joamjoamjoam commented 2 years ago

Yeah the problem is themes that do .dialogbutton { background: color !important } such as the rosepine theme. Its needed to theme the buttons in the QAM and steam menus. On the SP tab if valve added a dialog button there would be no way to distinguish a decky added button from the valve added button. I dont think theres a way around it though and using the dialog button class is a good thing since it makes it selectable with the controller.

OMGDuke commented 2 years ago

I guess the options are use a regular button and lose controller support. Or see if we can force proton medal colour through CSS specificity

OMGDuke commented 2 years ago

There's also the Button component in decky-frontend-lib. Will experiment with that I assume it will have the same issues with being overwritten by themes

OMGDuke commented 2 years ago

Changing to decky-frontend-libs Button instead of DialogButton seems to fix it for the themes I tested from CSS Loader.

Could you see if it fixes it for the theme you're using please @joamjoamjoam. On the main branch now.

joamjoamjoam commented 2 years ago

Themes no longer overwrite the button and the classes do not overlap with the the buttons in the Steam/QAM menus. Looks good thanks.