}
}
@Override
public Vector2i getPreferredContentSize(Canvas canvas, Vector2i areaHint) {
Vector2i result = new Vector2i();
canvas.setPart(SLIDER_PART);
result.x = canvas.getCurrentStyle().getFixedWidth();
if (result.x == 0) {
result.x = canvas.getCurrentStyle().getMinWidth();
}
result.y = canvas.getCurrentStyle().getFixedHeight();
if (result.y == 0) {
result.y = canvas.getCurrentStyle().getMinHeight();
}
Vector2i left = getTickerPreferredContentSize(canvas, TICKER_LEFT_PART);
Vector2i right = getTickerPreferredContentSize(canvas, TICKER_RIGHT_PART);
result.y = Math.max(result.y, Math.max(left.y, right.y));
result.x = Math.max(result.x, left.x + left.y);
return result;
}