From 330fee28d812e72d2ced310ef7c4ee5ad0960404 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Sun, 28 Mar 2010 22:14:33 -0400 Subject: [PATCH] Disabled scrolling in the list frame unless the number of entries exceeds the maximum displayable entries. --- Frame.lua | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Frame.lua b/Frame.lua index 04f7c83..0f00fdc 100644 --- a/Frame.lua +++ b/Frame.lua @@ -2488,12 +2488,6 @@ MainPanel.scroll_frame = ListFrame ListFrame:SetHeight(322) ListFrame:SetWidth(243) ListFrame:SetPoint("TOPLEFT", MainPanel, "TOPLEFT", 20, -97) -ListFrame:SetScript("OnVerticalScroll", - function(self, arg1) - self.scrolling = true - _G.FauxScrollFrame_OnVerticalScroll(self, arg1, 16, self.Update) - self.scrolling = nil - end) ListFrame.entries = {} ListFrame.button_containers = {} @@ -2513,6 +2507,16 @@ do highlight._texture:SetBlendMode("ADD") highlight._texture:SetAllPoints(highlight) + ListFrame:SetScript("OnVerticalScroll", + function(self, arg1) + if #self.entries <= NUM_RECIPE_LINES then + return + end + self.scrolling = true + _G.FauxScrollFrame_OnVerticalScroll(self, arg1, 16, self.Update) + self.scrolling = nil + end) + local function Button_OnEnter(self) ListItem_ShowTooltip(self, ListFrame.entries[self.string_index]) end @@ -2906,11 +2910,9 @@ do local string_index = button_index + _G.FauxScrollFrame_GetOffset(self) local display_lines = NUM_RECIPE_LINES - if num_entries <= display_lines then - display_lines = num_entries / 2 + if num_entries > NUM_RECIPE_LINES then + _G.FauxScrollFrame_Update(self, num_entries, NUM_RECIPE_LINES, 16) end - _G.FauxScrollFrame_Update(self, num_entries, display_lines, 16) - addon:ClosePopups() ARL_ExpandButton:SetNormalFontObject("GameFontNormalSmall") -- 1.7.9.5