You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Roger Whitcomb <Ro...@actian.com> on 2014/09/02 18:07:39 UTC

Theme Listeners?

It has just come up in our application that we'd like to be able to have the user select the general font of the application, which (I'm thinking) we could accomplish by setting the Theme font to the user's selection.  But, there is no easy way to have the whole UI recreated with that new Theme font.  So, I was wondering why there are no ThemeListeners, such that if a Theme color or font was changed that everyone who was using that color/font would get notified and could relayout/repaint....


What do you think?  Is this overkill?  Or is there a better way to recreate the whole UI if something like a theme color or font was changed dynamically?


~Roger




Re: Theme Listeners?

Posted by Sandro Martini <sa...@gmail.com>.
Hi Roger,
I think that the original design of Pivot didn't take in account too
much dynamic changes of UI global features.
As you know I have been during years to introduce some
parametrizations using skin configuration files, but static (read at
application startup).
But during last updates maybe I discover a way for you to add some
dynamic behavior: take a look at Color Scheme Builder, and you can see
that some parts of UI (loaded by a BXML file) are reloaded (so
updated) when needed (for example when someone change a color) ...
don't know if this is enough, but could be a starting point:-) .

> What do you think?  Is this overkill?  Or is there a better way to recreate the whole UI if something like a theme color or font was changed dynamically?
To me this feature makes sense, so if you want to implement it's Ok
for me ... tell me if I can help.
Pivot has many (maybe too much) static stuff, so a change like this
could be not so simple.

Note that in many (other frameworks) it's acceptable to make some
changes and see updates at restart ...

Keep me updated.

Bye