tabris-js icon indicating copy to clipboard operation
tabris-js copied to clipboard

Allow to theme widget with a default color set

Open mpost opened this issue 5 years ago • 5 comments

Problem description

At the moment all widgets have the platform specific theme.

Expected behavior

It should be possible to style all Widget uniformly.

Environment

  • Tabris.js version: 3.3

mpost avatar Jan 29 '20 14:01 mpost

@mpost It would be very convenient if there was a mechanism that allows you to change the theme of the entire application on the fly. For example, this would be useful for quickly creating a night mode. Something like a global styleManager object that would have a collection of colors. styleManager.colors.main // '#000' or '#fff'

There would be a .setTheme method setTheme(themeName: string): void; After executing this function, all widgets that use the values of this object would change these values.

fax1ty avatar Jan 29 '20 14:01 fax1ty

We are thinking in that direct as well. Be aware though that not all parts of a mobile app can be styled at runtime.

mpost avatar Jan 29 '20 16:01 mpost

@fax1ty I think #1932 would be better for night mode

cookieguru avatar Jan 29 '20 18:01 cookieguru

@cookieguru

  1. Still no event about changing darkMode
  2. At the moment, Tabris doesn't have a native app styling tool. I just described how I program the night mode. I would like to see about the same thing but more natively.

fax1ty avatar Jan 29 '20 18:01 fax1ty

In the first iteration the theme will not be dynamic, meaning changing it after a widget is intanciated will not change the existing widget. That may be a feature for 3.5, but not 3.4.

tbuschto avatar Jan 30 '20 09:01 tbuschto