Skip to content
anidivr edited this page Oct 30, 2022 · 2 revisions

All flat-ui control get their color from the GlobalFlatUITheme theme. All controls support overriding any of their colors to not use the theme.

Theme implements the FlatUITheme interface

interface FlatUITheme {
  LabelColor: string,
  ButtonColor: string,
  ButtonLabelColor: string,
  NumberColor: string,
  StringColor: string,
  CheckColor: string,
  SlideColor: string,
  ToggleFalseColor: string,
  ToggleTrueColor: string,
  IconColor: string,
  PanelColor: string,
  PopupColor: string,
  SelectColor: string,
  ProgressColor: string,
  DisabledColor: string,
  OutlineColor: string,
  ScaleColor: string,
}

Call the changeTheme function with your own theme.

GlobalFlatUITheme.changeTheme(MatrixTheme);

After changing, THEME_CHANGE_EVENT is dispatched to any flat-ui controls that are listening to notify them of the change.

Clone this wiki locally