applet: Fix layout of the network speed graph with certain font preferences
TextMetrics uses a different text rendering backend by default, which has led to inaccurate estimation of the width of AxisLabels. By default TextMetrics uses QtRendering type; but our Label uses NativeRendering. In past we used to override renderType with a conditional expression, so considering such history, hardcoding any type seems inappropriate. That's why we need an actual instance of Label to fetch a correct render type at runtime. Second part of the issue was that instead of width property the layout should have used advanceWidth, and ceil() it, just in case. But with a port to Label instance it doesn't matter anymore. BUG: 461483
parent
d97ef49d
Please register or sign in to comment