Skip to content

BlizzardSkin: reassert Buy's anchor and bound the tab-gap scale - #2019

Open
dfrisone wants to merge 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/ah-tab-locations
Open

BlizzardSkin: reassert Buy's anchor and bound the tab-gap scale#2019
dfrisone wants to merge 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/ah-tab-locations

Conversation

@dfrisone

@dfrisone dfrisone commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

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:

  1. The re-skin only reasserted anchors for the 2nd+ tabs. A displaced BuyTab -- left that way by the other addon after closing its own AH skin -- threw off everything chained after it, since nothing ever put Buy itself back.
  2. The gap-width calculation divided by a tab's 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

  • New settings default OFF (no behavior change without opt-in) -- N/A, no new settings
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built -- N/A, this only runs when the AH re-skin already runs
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations) -- both changes are a handful of extra table reads and one anchor call, only when the tab row is (re)built
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames -- the anchor reassertion is ClearAllPoints/SetPoint on Blizzard's own AuctionHouseFrameBuyTab, the same pattern the surrounding re-skin already uses on every other tab in the row
  • Tested in-game on live; no version gates or pre-Midnight APIs added -- see note above

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant