Thread Tools Display Modes
08-08-16, 02:54 PM   #1
Infus
A Deviate Faerie Dragon
Join Date: Jul 2016
Posts: 13
ScrollFrame clipping issue

The following code that was extracted from WeakAuras + AceGui shows rather strange behaviour.

There are nested scroll frames, the inner scrollframes are 32x32 pixels and should clip the contained text, but apparently that doesn't work correctly.


Code:
-- First scroll frame
local scrollframe = CreateFrame("ScrollFrame", nil, UIParent)
scrollframe:SetBackdrop({
  bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
  edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
  tile = true,
  tileSize = 32,
  edgeSize = 32,
  insets = { left = 8, right = 8, top = 8, bottom = 8 }
});

scrollframe:SetPoint("CENTER", UIParent, "CENTER");
scrollframe:SetWidth(630);
scrollframe:SetHeight(492);

-- Scroll child of first scroll frame
local content = CreateFrame("Frame", nil, scrollframe)
content:SetHeight(800)
scrollframe:SetScrollChild(content)

content:ClearAllPoints()
content:SetPoint("TOPLEFT", 0, 0)
content:SetPoint("TOPRIGHT", 0, 0)

-- Create 20 scrollframes
local children = {};
local lastChild;
for i = 1, 20 do
  local child = CreateFrame("ScrollFrame", nil, content);
  child:SetWidth(32);
  child:SetHeight(32);

  local scrollChild = CreateFrame("Frame", nil, child);
  scrollChild:SetWidth(28);
  scrollChild:SetHeight(28);
  child:SetScrollChild(scrollChild);

  local text = scrollChild:CreateFontString(nil, "OVERLAY");
  text:SetPoint("CENTER", scrollChild, "CENTER");
  text:SetFont("Fonts\\ARIALN.TTF", 36, "OUTLINE");
  text:SetText("|TInterface\\Icons\\inv_misc_coin_17:12:12|t");

  if (lastChild) then
    child:SetPoint("TOPLEFT", lastChild, "BOTTOMLEFT")
  else
    child:SetPoint("TOPLEFT", content)
  end
  lastChild = child;
end
 
08-09-16, 03:14 PM   #2
Infus
A Deviate Faerie Dragon
Join Date: Jul 2016
Posts: 13
This will be fixed in 7.1
 
08-11-16, 01:11 AM   #3
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Infus View Post
This will be fixed in 7.1
Do you have a source?
 
08-20-16, 06:38 AM   #4
Infus
A Deviate Faerie Dragon
Join Date: Jul 2016
Posts: 13
Originally Posted by p3lim View Post
Do you have a source?
TheDanW on irc.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » ScrollFrame clipping issue


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off