tullaCC

tullaCC

198k Downloads

Consider using self:GetWidth instead of self:GetSize in Display:CalculateSizeRatio

vomaufgang opened this issue ยท 2 comments

commented

Back in version 7.2.0 the font size for any given cooldown was calculated based on the width of the icon it was displayed on:

function Timer.OnSizeChanged(self, width, height)
	local fontScale = round(width) / ICON_SIZE

ad0dff9 changed the calculation to use the icons size via GetSize instead:

function Display:CalculateSizeRatio()
    local sizeRatio = round(min(self:GetSize())) / ICON_SIZE

GetSize however causes the calculation to use the icons height instead.

The cooldown icons above the floating enemy health bars are much wider than they are high - in my case 20 wide by 14 high.

The old calculation using width resulted in a sizeRatio of ca. 20 / 36 = 0.55, which was quite readable:

grafik

The new calculation however leads to a sizeRatio of ca. 14 / 36 = 0.38, making the font way too small imho:

grafik

Would it be possible to change the calculation so the icons width / self.GetWidth() is used to determine the font size (again)?

Square icons would be unaffected by this change and to my knowledge there are no other non square icons with cooldowns in the game.

Thanks in advance for your time!

commented

You probably just want to switch min to max.

commented

You're right, didn't even see that min. Talk about standing in the forest being blind to the trees.