map: the windowed art buried the continent and zone dropdowns

grom: "the map is not properly sized in the window and I can't see/click the
dropdowns at the top". What was on screen was two small circles and a search box
above the parchment -- the bottom edge of pfUI's title bar, everything under it
covered by the map sheet.

Measured on his own saved variables: WORLDMAP_WINDOWED is 1, so the realm runs
WorldMapFrame_Minimize at VARIABLES_LOADED, which pins WorldMapPositioningGuide
to the window's own corners (WorldMapFrame.lua:201-203). Both dropdowns anchor
to that guide at TOP -80,-35, so windowed they sit 34 to 66 below the window's
top -- which is why the same function hides them three lines later. pfUI puts
them back (SkinDropDown) into a window it sizes to WorldMapButton plus 15x55 of
chrome, eleven short of the 66 their anchor wants. 31 of their 32 points ended
up under WorldMapDetailFrame, level 3 against their 1.

The reference buries them too; what is ours is that our canvas fills the window
an addon sized rather than leaving the art a 701x468 patch in the corner of it,
which makes the burial total. So WindowedInset gives them the band when they are
visible: the art starts four points below the lower dropdown. Hidden -- stock,
and every chain without a map addon -- the inset stays 1.12's own 33 and the
windowed map is pixel-identical.

The cost is 35 points of art height in that window, so the fit zoom lands at 0.95
and the sheet is pillarboxed about 17 points a side.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
This commit is contained in:
2026-11-09 08:11:36 -07:00
co-authored by Claude Opus 5
parent d1d44a7801
commit f080e95b8d
3 changed files with 158 additions and 1 deletions
+59 -1
View File
@@ -968,11 +968,69 @@ end
local WINDOWED_INSET = { l = 15, t = 33, r = 4, b = 20 }
local MAXIMIZED_INSET = { l = 10, t = 69, r = 12, b = 31 }
-- The windowed top inset has one thing it has to clear that 33 does not cover: the continent and
-- zone dropdowns, when something has made them visible again.
--
-- 1.12 anchors both to `WorldMapPositioningGuide` at `TOP, -80, -35`, and `WorldMapFrame_Minimize`
-- pins that guide to the window's own corners (`WorldMapFrame.lua:201-203`) -- so in windowed mode
-- they sit 34 to 66 below the window's top, under art that starts at 33. The realm knows: three
-- lines further on the same function sets their alpha to 0 and takes the mouse off them, because
-- a 720x521 window has nowhere else to put them.
--
-- pfUI puts them back. `SkinDropDown` runs over both (`pfUI/modules/map.lua:154`), and the window
-- it sizes them into is `WorldMapButton` plus 15x55 of chrome -- room for a title bar, except
-- that the dropdowns' own anchor wants 66 of it. So they return at full alpha into a band the art
-- is using, 31 of their 32 points under `WorldMapDetailFrame`, which draws at level 3 against
-- their 1. grom, 2026-11-09: *"I can't see/click the dropdowns at the top"* -- what is left of
-- them is a one-point sliver, and a click on it lands on the map.
--
-- That is the reference's behaviour too, art and all; what is ours is that our art fills the
-- window the addon sized instead of staying a 701x468 patch in the corner of it, which is what
-- makes the burial total. So: when they are visible, the art starts below them. When they are
-- hidden -- which is stock, and every chain without a map addon -- the inset is 1.12's own 33 and
-- the windowed map is pixel-identical to what it was.
local DROPDOWN_CLEARANCE = 4
local windowedInset = { l = 15, t = 33, r = 4, b = 20 }
local function WindowedInset()
local map = WorldMapFrame
windowedInset.l, windowedInset.r = WINDOWED_INSET.l, WINDOWED_INSET.r
windowedInset.b, windowedInset.t = WINDOWED_INSET.b, WINDOWED_INSET.t
if not map then
return windowedInset
end
local ms = map:GetEffectiveScale()
local top = map:GetTop()
if not ms or ms <= 0 or not top then
return windowedInset
end
top = top * ms
local list = { WorldMapContinentDropDown, WorldMapZoneDropDown }
local i
for i = 1, 2 do
local dd = list[i]
if dd and dd:IsShown() and (dd:GetAlpha() or 0) > 0.01 then
dd:GetLeft()
local ds, bottom = dd:GetEffectiveScale(), dd:GetBottom()
if ds and ds > 0 and bottom then
local below = (top - bottom * ds) / ms + DROPDOWN_CLEARANCE
-- A dropdown above the window's top, or one somewhere past the middle of it, is
-- not a title bar and is not this rule's business.
local limit = (map:GetHeight() or 0) * 0.5
if below > windowedInset.t and below < limit then
windowedInset.t = below
end
end
end
end
return windowedInset
end
-- `(host, inset)` for the current mode: the frame the content area is measured in, and how far
-- inside it the art sits.
local function ContentHost()
if WORLDMAP_WINDOWED == 1 then
return WorldMapFrame, WINDOWED_INSET
return WorldMapFrame, WindowedInset()
end
return WorldMapPositioningGuide or WorldMapFrame, MAXIMIZED_INSET
end
@@ -506,6 +506,61 @@ fn the_canvas_container_is_the_windows_content_area_in_both_map_modes() {
}
}
/// The windowed art starts below the continent and zone dropdowns when something has made them
/// visible, and stays at 1.12's own 33 when nothing has.
///
/// 1.12 anchors both dropdowns to `WorldMapPositioningGuide` at `TOP, -80, -35`, and
/// `WorldMapFrame_Minimize` pins that guide to the window's own corners
/// (`WorldMapFrame.lua:201-203`) -- so windowed they sit 34 to 66 below the window's top, under
/// art that starts at 33. The realm hides them three lines later for exactly that reason.
///
/// pfUI un-hides them: `SkinDropDown` runs over both and the window it sizes is `WorldMapButton`
/// plus 15x55 of chrome, which is less than their anchor wants. Measured on grom's chain, 31 of
/// their 32 points were under `WorldMapDetailFrame` -- level 3 against their 1 -- so what was
/// left on screen was a one-point sliver of each and a click on it reached the map.
#[test]
fn a_visible_map_dropdown_gets_the_windowed_art_out_from_under_it() {
let Some(mut s) = harness() else { return };
s.run("WorldMapFrame_Minimize()")
.expect("the stock mode switch runs");
s.resolve();
// Stock: the realm hid them, so the band is 1.12's own and the map is as it was.
let (map_top, art_top): (f64, f64) = s
.eval(
"WorldMapScrollContainer:GetLeft() \
return WorldMapFrame:GetTop(), WorldMapScrollContainer:GetTop()",
)
.unwrap();
assert!(
(map_top - art_top - 33.0).abs() < 1.0,
"hidden dropdowns must leave 1.12's own 33-point band, got {}",
map_top - art_top
);
// What pfUI does, in its own order: un-hide both, then size the window to the art plus its
// chrome. The resize is what re-seats the container.
s.run(
"WorldMapContinentDropDown:SetAlpha(1) WorldMapZoneDropDown:SetAlpha(1) \
WorldMapFrame:SetWidth(1017) WorldMapFrame:SetHeight(723)",
)
.expect("an addon may resize the map window and show its dropdowns");
s.resolve();
let (art_top, dd_bottom): (f64, f64) = s
.eval(
"WorldMapScrollContainer:GetLeft() \
return WorldMapScrollContainer:GetTop(), WorldMapContinentDropDown:GetBottom()",
)
.unwrap();
assert!(
art_top <= dd_bottom,
"the art starts at {art_top} and the dropdown ends at {dd_bottom}, so {} points of it \
are buried",
art_top - dd_bottom
);
}
/// A wheel notch steps from where the view is **heading**, so notches accumulate while the
/// smooth zoom is still easing toward the last one.
///
+44
View File
@@ -5265,3 +5265,47 @@ ends it with "Click to read its story". Sweeping 247 points across Dun Morogh it
of the box without giving up the panel — and the checkbox that writes it reads *Show Map Lore
Panel*, which is why nobody finds it. `Addon_Ports/softspoken_port/` splits it onto its own
`mapHover` setting, default off, with its own checkbox.
### 2026-11-09: and the dropdowns above it were under the art
Same map, same chain, the other half of grom's report: *"the map is not properly sized in the
window and I can't see/click the dropdowns at the top"*. What he could see was two small circles
and a search box poking out above the parchment — the bottom edge of pfUI's title bar, with
everything below it buried.
The chain of facts, all measured on his saved variables rather than inferred:
| | |
| --- | --- |
| `benilla-config/saved-variables.lua:51` | `WORLDMAP_WINDOWED = 1` |
| `WorldMapFrame.lua:40` | at `VARIABLES_LOADED`, that calls `WorldMapFrame_Minimize()` |
| `WorldMapFrame.lua:201-203` | which pins `WorldMapPositioningGuide` to the **window's own two corners** (`+0,+1` / `+1,+0`), not its declared 1024x768 |
| `WorldMapFrame.xml:261` | and both dropdowns are anchored `TOP, -80, -35` to that guide, so they land 34 to 66 below the window's top |
| `WorldMapFrame.lua:225-228` | which is why the same function then sets their alpha to 0 and takes the mouse off them |
| `pfUI/modules/map.lua:111` | pfUI resizes the window to `WorldMapButton` + 15x55 of chrome — 1017x723 |
| `pfUI/modules/map.lua:154` | and `SkinDropDown` runs over both, which puts them back at alpha 1 |
So they return at full alpha into a band whose geometry the realm never meant to be seen, and
`WorldMapDetailFrame` draws over them: level 3 against their level 1. Measured: **31 of their 32
points under the art**, a click on the sliver reaching the map. pfUI's own 55 points of chrome is
11 short of the 66 its dropdowns' anchor asks for, so even without us the band does not fit.
What is ours is that our canvas fills the window an addon sized instead of leaving the art a
701x468 patch in the corner of it, which is what makes the burial total rather than partial. The
fix is in `MapCanvas.lua`'s `WindowedInset`: when the dropdowns are shown with a non-zero alpha,
the windowed top inset becomes their bottom plus four, so the art starts underneath them. When
they are hidden — stock, and every chain with no map addon — it stays 1.12's own 33 and the
windowed map is pixel-identical to what it was. Pinned by
`a_visible_map_dropdown_gets_the_windowed_art_out_from_under_it`.
The cost is height: the art is 633 points tall in that window instead of 668, so the fit-to-window
zoom lands at 0.95 and the sheet is pillarboxed by about 17 points a side. That is the trade for a
usable continent and zone picker, and it is what pfUI's layout was asking for all along.
Worth writing down separately: **a map capture is a different map without
`benilla-config/saved-variables.lua` in the capture home.** `WORLDMAP_WINDOWED` lives there, and
without it every capture opens the maximized map. Three earlier runs could not reproduce this
report for that reason, and reproducing it by calling `WorldMapFrame_Minimize()` by hand produced
a *different* state again — minimize after pfUI's pass, rather than before it, which is what
leaves the dropdowns at alpha 0 instead of 1. `local_state.rs`'s own comment says so; the farm
simply did not have the file.