Scroll the config panels with ClassicAPI's scroll bar

pfUIScrollFrameTemplate (api/ui-widgets.xml) is a ScrollFrame with
pfUIScrollBarTemplate inside its right edge and a Content scroll child,
driven by ScrollUtil.InitScrollFrameWithScrollBar. The panels keep a
ScrollFrame because the engine measures its range from the shown frames
inside the content, which the hand-placed config rows rely on. The bar
follows OnScrollRangeChanged instead of an OnUpdate poll per panel.

A panel measures its range once its rows are built, and the search
results measure theirs with UpdateScrollChildRect instead of hiding,
re-attaching and scrolling a frame later. Clearing the search measures
again too.

CreateScrollFrame and CreateScrollChild have no users left, and nothing
called CreateTabFrame or CreateTabChild; all four are gone. pfQuest's
compat layer brings its own copies of the scroll helpers.
This commit is contained in:
Brues
2026-10-30 00:51:16 -05:00
parent 3987cfb8a0
commit 5d8314b2d4
3 changed files with 40 additions and 195 deletions
+30
View File
@@ -29,6 +29,36 @@
</Frames>
</EventFrame>
<!--
A ScrollFrame for free-form content, with pfUIScrollBarTemplate inside its
right edge. Put the content in frame.Content, which spans the frame: the
engine measures the scroll range from the shown frames inside it, so the
content needs no height. Changes inside it are not measured until
frame:UpdateScrollChildRect().
-->
<ScrollFrame name="pfUIScrollFrameTemplate" virtual="true">
<Frames>
<EventFrame parentKey="ScrollBar" inherits="pfUIScrollBarTemplate">
<Anchors>
<Anchor point="TOPRIGHT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
</EventFrame>
</Frames>
<ScrollChild>
<Frame parentKey="Content">
<Size x="1" y="1"/>
</Frame>
</ScrollChild>
<Scripts>
<OnLoad>
self.Content:SetAllPoints()
self:EnableMouseWheel(true)
ScrollUtil.InitScrollFrameWithScrollBar(self, self.ScrollBar)
</OnLoad>
</Scripts>
</ScrollFrame>
<!--
A WowScrollBoxList with pfUIScrollBarTemplate beside it, both 5px inside the
frame so CreateBackdrop(frame, nil, true) can frame them. Fill it with