Label Widget, icon, min text width #527


Closed
  • namrakadabra created this issue Nov 13, 2019

    Why does the Label Widget force us to set the minimum width for the label widget to 200 + icon_width if we want to show them side by side. I have a small window and don't want to make it bigger than 150. The workaround is to use the icon widget in combination with the label widget, but then I get the glow of the Icon widget which I also don't need.

     

    Kind Regards

     

    From: AceGUIWidget-Label.lua

    local imagewidth = image:GetWidth()
    		if (width - imagewidth) < 200 or (label:GetText() or "") == "" then
    			-- image goes on top centered when less than 200 width for the text, or if there is no text
    			image:SetPoint("TOP")
    			label:SetPoint("TOP", image, "BOTTOM")
    			label:SetPoint("LEFT")
    			label:SetWidth(width)
    			height = image:GetHeight() + label:GetStringHeight()
    		else
    			-- image on the left

     

  • nevcairiel closed issue Oct 13, 2020
  • nevcairiel posted a comment Oct 13, 2020

    I would recommend to use an inline image if the Label behavior is not applicable.

    You can embed images inside a font string using this syntax:

    https://wow.gamepedia.com/UI_escape_sequences#Textures

     

    The label behavior is unlikely to change as it would mess with addons using it now.


To post a comment, please login or register a new account.