Skip to content

properly size date label in vertical panels

Marco Martin requested to merge work/mart/verticalpaneldate into master

the Text.Fit sizing policy will size the font in order to fit given a fixed size of the label, but it can't really cause the other way around which we need: cause a vertical resize in order to accomodate a larger font. In order to fake that, we fix the date label to an arbitrary tall height (will overflow outside the applet) and then size the applet based on the label contentheight instead, leaving the invisible part of the label outside. In order to avoid the huge text it used to have, limit the maximum size to an arbitrarly small value, in this case Math.min(0.7 * timeLabel.height, theme.defaultFont.pixelSize * 1.4)

BUG:417852

Merge request reports