Skip to content
  • Marco Martin's avatar
    properly size date label in vertical panels · fcbfbcbf
    Marco Martin authored and Nate Graham's avatar Nate Graham committed
    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
    FIXED-IN: 5.21
    fcbfbcbf