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

ElvUI corrupts AceConfig's frames' resize limits #1354

Open
3 of 4 tasks
Anonomit opened this issue Sep 7, 2024 · 4 comments
Open
3 of 4 tasks

ElvUI corrupts AceConfig's frames' resize limits #1354

Anonomit opened this issue Sep 7, 2024 · 4 comments
Labels
💡Pending 🕐 Feature Request

Comments

@Anonomit
Copy link
Contributor

Anonomit commented Sep 7, 2024

Troubleshooting Steps

The issue can't really be captured in a screenshot, since it involves moving UI elements. Here's my version info, although this issue should affect all game versions.
image

Describe the expected behavior and what actually happened?

Opening ElvUI config should have no effect on the size of other windows. Instead, opening the ElvUI config can restrict my ability to resize other windows. This is because it is making changes to AceConfig's frames, causing that frame to continue using the same resize limits whenever it's taken out of the frame pool by anyone.

The following code inside of E:Config_WindowClosed() mostly patches the issue. This resets the minimum size limit to the (current) Ace3 setting. There is still a maximum size limit, and I don't know if there's a way to remove it. It may be better if ElvUI doesn't set a maximum size at all, if it really can't be undone.

		if self.SetResizeBounds then
			self:SetResizeBounds(400, 200)
		else
			self:SetMinResize(400, 200)
		end

There's also a note at the top of AceGUI-3.0.lua which advises against modifying the frames themselves. Contacting the Ace3 team might be the best way to fix this compatibility issue.

-- **Note**: When using AceGUI-3.0 directly, please do not modify the frames of the widgets directly,
-- as any "unknown" change to the widgets will cause addons that get your widget out of the widget pool
-- to misbehave. If you think some part of a widget should be modifiable, please open a ticket, and we"ll
-- implement a proper API to modify it.

Reproducing the issue.

Note: You need another addon using a standalone AceConfigDialog options menu to observe this issue. AceConfig is a popular library for creating options menus, but if you don't have another addon to use for testing, you can use ZeraTooltip (/zt to open options).

Steps to Reproduce

  1. Reload UI or relog.
  2. Open the AceConfigDialog window for another addon (any addon that runs AceConfigDialog:Open()).
  3. Note the minimum windows size (400, 200) and the lack of maximum size. You don't actually have to resize the window to cause the issue - only to observe it.
  4. Close the window.
  5. Open the ElvUI config window. Do not open any other AceConfigDialog windows.
  6. Note the minimum size (800, 600) and the maximum size (50px less than UIParent size).
  7. Close the ElvUI config window.
  8. Reopen the other addon's AceConfigDialog window. Do not open any other AceConfigDialog windows.
  9. Note the size limits have been changed to be the same as the ElvUI config window.

The two windows should be using the same frame from Ace3. This can be confirmed with /fstack.

Lua Errors

No lua errors!

Verification Steps

  • I have read the Changelog and verified ElvUI is up to date by checking /estatus
  • I have verified my issue doesn't exist in the Default UI or the Issue Tracker.
  • I have not read any of these steps, please close my issue when you see it.
  • I have done the Troubleshooting Steps and included the requested screenshots, which show the issue and status panel.
@Azilroka
Copy link
Member

Azilroka commented Sep 7, 2024

How is the maximum size limit affecting you to moving your ui around? There is a reason for the maximum size we imposed but I'm wondering how it is affecting you?

@Anonomit
Copy link
Contributor Author

Anonomit commented Sep 9, 2024

The maximum size limit isn't an issue for me personally, and I think ElvUI's limit is pretty generous. It is still an unexpected restriction that is being imposed on other addons. My main issue is with the minimum size limit, which is quite a lot larger than the default.

@Azilroka
Copy link
Member

Azilroka commented Sep 9, 2024

Well that size is larger due to how we modify the ace frame to accommodate our config panel. The left side is completely custom along with the top bars which at a very small limit is completely unusable.

@Anonomit
Copy link
Contributor Author

Anonomit commented Sep 9, 2024

I understand why you don't want players to resize the options menu to be really small. I also want a minimum size for an Ace frame in my addon. But I don't want that constraint to carry over to other addons, so I need to reset the size back to default when I'm done with the frame. That's what I'm suggesting you do as well.

I provided the code above which would fix it, and a link to the function where you would need to put it. That restores the minimum window size limit after ElvUI is done using the frames, but doesn't actually fix the maximum size limit.

By default, there is no maximum resize limit on Ace frames. Here is where Ace applies a minimum resize limit on the frames. ElvUI sets a new minimum limit and a maximum limit on the same frames, and as far as I know there is no way to undo the maximum part. I would suggest removing the maximum size limit for compatibility, but it's probably not going to bother anyone anyway. Someone would have to be making an Ace panel take up the whole screen to exceed that limit.

If you want to have a maximum size limit and still be fully compatible with other addons that use Ace frames, then you would probably need to talk to the Ace3 team and get a function added for this, similar to AceConfigDialog:SetDefaultSize().

@kodewdle kodewdle added 💡Pending 🕐 Feature Request and removed 🐛 Needs Investigation ❓ Bug 🧬 Classic 💀 Game Version labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡Pending 🕐 Feature Request
Projects
None yet
Development

No branches or pull requests

3 participants