The look and feel of widgets can be extended or modified in several ways. It defines the look and feel of its own widgets, which is customizable. See also Creating New Widgets for more information on how to create custom widgets.ĮGT does not use native style widgets by default. Each Widget can hold its own instance of a theme, set with egt::v1::Widget::theme(). This means if you change the font of the window theme, the button and all of its children will inherit that change. So, when you add a button widget to a window, that button will use the theme from the window and on up the widget hierarchy as needed. If the top level window does not have a custom theme or a widget does not have a parent, it will use egt::global_theme() by default. The theme contains the default palette and font, and also can be used as a place to override egt::v1::Widget::draw() methods.īy default, themes are inherited in the widget hierarchy. With a few minor exceptions, these are the same colors defined by the CSS standard. The Palette class also defines a set of default colors to reference and use. If you change the global theme, it will retroactively have an effect on any widget, as long as that widget does not have an override for a egt::v1::Palette::ColorId and egt::v1::Palette::GroupId set. lor(egt::Palette::ColorId::button_text, egt::Palette::green) įor a list of configurable palette colors, see Palette::ColorId.
0 Comments
Leave a Reply. |