Dynamic resizing for window previews

can we have an option for dynamic resizing of the window previews in the icon’s only task manager, so when there are too many windows, instead of activating a scrollbar, it instead shrinks the size to fit them all on screen, only using the scrollbar if it gets too small, i even implemented it myself, and it worked before they started compiling the qml, but it was implemented very poorly, because it was only for me, but heres the logic i used
to get the width:
readonly property int tooltipInstanceMaximumWidth: {
var standardmaxwidth = Kirigami.Units.gridUnit * 16
var minwidth = Kirigami.Units.gridUnit * 6
var count = (windows && windows.length) ? windows.length : 1//delegateModel.count
// if (count === 0) return standardmaxwidth

var screen_w = Screen.width
if (screen_w <= 0){
console.log("Debug: screen_w = 0")
return standardmaxwidth}
var total_gaps = (count > 1) ? (count - 1) * Kirigami.Units.smallSpacing : 0
var screen_margins = Kirigami.Units.gridUnit * 2
// var padding = Kirigami.Units.gridUnit * 4
var available_space = screen_w - total_gaps - screen_margins
var calculated_size = available_space/count
console.log("Debug: count: " + count + " available_space: " + available_space + "calculated_size: " + calculated_size)
if (calculated_size > standardmaxwidth) {
console.log("Debug: returning standard - calc_size > standard")
return standardmaxwidth
}
else if (calculated_size < minwidth) {
console.log("Debug: returning standard - calcsize < min")
return standardmaxwidth
}
else {
console.log("Debug: returning calculated_size")
return calculated_size
}
}
to get the height:

Layout.preferredHeight: {
// 1.77 is the approx ratio of 16:9
console.log("Debug Instance: Height: " + (toolTipDelegate.tooltipInstanceMaximumWidth / 1.77))
Math.min(Kirigami.Units.gridUnit * 8,toolTipDelegate.tooltipInstanceMaximumWidth / 1.77)
}