My theme is being messed up with this function. see Spoiler: theme Full function is this : Code (text): void BattlePokeButton::update() { setText(p->nickname() + "\n" + QString::number(p->life()) + "/" + QString::number(p->totalLife())); int status = p->status(); if (status == Pokemon::Koed || status == Pokemon::Fine) { setStyleSheet(""); } else { setStyleSheet("background: " + Theme::StatusColor(status).name() + ";"); } It overrides the status inflicted pokemon's button which looks out of place. Is there any way to prevent it?
The setStyleSheet function replaces existing css style for that button. To make it theme friendly, the update function would have to be changed. Maybe it should use something like addClass("poisoned"); Then you can edit the style for ".poisoned" in the css. I haven't made any themes so I could be wrong about messing with css, but the bottom line is to not use the setStyleSheet function. Even if this is fixed you will have to wait for the next client version, or you could get a fixed version of the source code and build your own client.
Yeah I was wondering the same if I could use dynamic property. The problem is that Qt CSS does not handle dynamic properties if changed from .css file. I actually tried using Code (text): BattlePokeButton[status=4]{ background:orange; } It did not work however. I don't want to make changes in client code. I am not even a good programmer. If someone experienced like Coyotte, or Lamperi, or anyone else could tell me a way to handle this problem then it'd be great.