Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix text overflow in fixed width tooltips when using UI scaling #6608

Merged
merged 4 commits into from
Mar 1, 2025

Conversation

speed2CZ
Copy link
Member

@speed2CZ speed2CZ commented Jan 1, 2025

The mod manager is using some custom logic for the tooltips and its was not scaling the width of the tooltip causing text overflow on couple of the elements.

The mod manager is using some custom logic for the tooltips and its was not scaling the width of the tooltip causing text overflow on couple of the elements.
@speed2CZ speed2CZ force-pushed the speed2/fixUIScaleModManager branch from 4c06251 to d7996da Compare January 1, 2025 17:26
Copy link
Contributor

@lL1l1 lL1l1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the width is scaled in the base class? It's where this width value is going.

fa/lua/ui/game/tooltip.lua

Lines 298 to 303 in 7f5ce74

if text then
local titleWidth = tooltip.title.Width() + padding + padding
tooltip.Width:Set(function() return math.max(titleWidth, width) end)
else
tooltip.Width:Set(function() return width end)
end

@lL1l1
Copy link
Contributor

lL1l1 commented Mar 1, 2025

Happens when UI scaling is used with fixed-width tooltips (such as activate favorites button, sort dropdown, mod website button, and github url button).
{5DE49450-C539-42F3-A891-4A9006B16120}

lL1l1 added 3 commits March 1, 2025 00:00
The text would be wrapped for scaled width, but the box width would not be set to the value
@lL1l1 lL1l1 added the area: ui Anything to do with the User Interface of the Game label Mar 1, 2025
@lL1l1 lL1l1 changed the title Fix text overflow in mods manager tooltips Fix text overflow in fixed width tooltips when using UI scaling Mar 1, 2025
@lL1l1 lL1l1 added this to the Development Iteration II of 2025 milestone Mar 1, 2025
@lL1l1 lL1l1 added the type: bug label Mar 1, 2025
@lL1l1 lL1l1 merged commit 580bf5e into FAForever:develop Mar 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui Anything to do with the User Interface of the Game type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants