[H22] CSS on UI elements issue

   217   0   0
User Avatar
Member
301 posts
Joined: July 2013
Online
In pre H22 I could simply set some CSS on a UI element in a PyPanel and that worked fine. For example:
QPushButton {color: #F00}
Would make all buttons have a red label.

But now in H22 where, I guess, the whole button is styled with CSS, setting the color red removes alle existing CSS and now only shows a red text:becomes


A (hacky) fix would be to get the current CSS from the button and modify that but the button has none since that CSS is probably a global for the button class so this gets messy real quick..

So is there a way to layer CSS overrides on top of UI elements preserving the pre-existing other CSS properties?
Edited by Jonathan de Blok - Sept. 9, 2026 09:21:18

Attachments:
no_buttons.png (3.3 KB)
orig_buttons.png (4.0 KB)

More code, less clicks.
  • Quick Links