BlizzardSkin: reassert Buy's anchor and bound the tab-gap scale - #2019
Open
dfrisone wants to merge 1 commit into
Open
BlizzardSkin: reassert Buy's anchor and bound the tab-gap scale#2019dfrisone wants to merge 1 commit into
dfrisone wants to merge 1 commit into
Conversation
Two compounding bugs on the Auction House's bottom tab row, whose anchors chain: Sell off Buy's edge, Auctions off Sell's, not three independent anchors. The re-skin only reasserted anchors for the 2nd+ tabs, so a displaced BuyTab -- left that way by another addon after closing its own AH skin -- threw off everything chained after it. Reassert Buy's own default anchor before chaining the rest of the row off it. The gap-width calculation divided by a tab's GetEffectiveScale() with no bounds check, so a near-zero leftover scale (from the other addon hiding a tab) turned a ~1px gap into hundreds of pixels. Bound the scale to 0.1-10 before dividing by it. Fix from Svart. His GitHub account is currently suspended, so this is being submitted on his behalf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix from Svart. His GitHub account is currently suspended, so this is being submitted on his behalf.
What does this PR do?
Fixes the Auction House's bottom tab row (Buy / Sell / My Auctions) drifting badly out of position after swapping between the base UI and another AH addon skin (e.g. TSM).
Blizzard's tab row is a chain, not three independent anchors: Sell anchors off Buy's edge, Auctions off Sell's. Two bugs compounded here:
GetEffectiveScale()with no bounds check. A near-zero leftover scale (also left behind by the other addon hiding a tab) turned what should be a ~1px gap into hundreds of pixels.Fix: explicitly reassert BuyTab's own default anchor before chaining the rest of the row off it, and bound the effective scale to 0.1-10 before dividing by it.
How was it tested?
Author-tested by Svart; not independently retested in-game by me before opening this on his behalf.
Checklist
HookScript/hooksecurefunconly, neverSetScripton Blizzard frames -- the anchor reassertion isClearAllPoints/SetPointon Blizzard's own AuctionHouseFrameBuyTab, the same pattern the surrounding re-skin already uses on every other tab in the row