Basically, I like default theme widgets. However, I need to change font size on DecoratedStackPanel widget.
I think it should be possible with something like this:
decoratedStackPanel.getElement().getStyle().setProperty("fontSize", "12pt");
However, "fontSize" is not valid name for property and I didn't find way how to get all element's properties. Therefore, I don't know correct property name.
Any ideas?
Please, don't post about inheriting widget or writing custom CSS. I like default one but the font size. This should be possible afaik.
fontSize is correct, the best way to use is as follows:
decoratedStackPanel.getElement().getStyle().setFontSize(12, Unit.PT);
But i'm not sure this will result in what you want. it sets the font size on the whole panel, and if another font size is set on a child element that one will be used in that element. In that case a css entry for the specific element would be better. For example:
.gwt-DecoratedStackPanel .gwt-StackPanelItem {
font-size:12pt !important;
}
(!important will force to use this specific font-size setting, and should only be used if you want to make sure this font-size is used. First test without).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With