Prat 3.0

Prat 3.0

26M Downloads

Hide Scroll Bars

GrimNotepad opened this issue ยท 1 comments

commented

Is your feature request related to a problem? Please describe.
When clicking near the edge of the chat box and button bar, sometimes I get the scroll bars because I've drifted into the chat window, I'd like to make scroll bars go away

Describe the solution you'd like
Scrollbars are an outmoded way to scroll around, and now that every mouse comes with a mouse wheel, I think we should do away with scroll bars!

Describe alternatives you've considered
Enabling click through, but I sometimes still get the scroll bars

Additional context
Based on an addon from SneekeeMods, I have roughed up a Prat Module that I have currently in place that hides the scroll bars when enabled. It isn't very elegant and needs some polish, but does the trick

Prat:AddModuleToLoad(function()
  local PRAT_MODULE = Prat:RequestModuleName("HideScrollBar")
  if PRAT_MODULE == nil then
    return
  end
  local module = Prat:NewModule(PRAT_MODULE, "AceHook-3.0", "AceTimer-3.0")
  local PL = module.PL
  PL:AddLocale(PRAT_MODULE, "enUS", {
    ["HideScrollBar"] = true,
    ["Hide chat window scrollbar."] = true,
  })
do
    local L
L = {
	["HideScrollBar"] = {
		["Hide chat window scrollbar."] = true,
		["HideScrollBar"] = true,
	}
}
PL:AddLocale(PRAT_MODULE, "enUS", L)
L = {
	["HideScrollBar"] = {
		--[[Translation missing --]]
		["Hide chat window scrollbar."] = "Hide chat window scrollbar.",
		["HideScrollBar"] = "Hide Scroll Bar",
	}
}
end
  Prat:SetModuleDefaults(module.name, {
    profile = {
      on = true,
    }
  })
  Prat:SetModuleOptions(module.name, {
    name = PL["HideScrollBar"],
    desc = PL["Hide chat window scrollbar."],
    type = "group",
    args = {
    }
  })
  module.OnSubValueChanged = module.ConfigureAllFrames
  --[[------------------------------------------------
      Module Event Functions
  ------------------------------------------------]] --
  -- things to do when the module is enabled
  function module:OnModuleEnable()
    for i=1,NUM_CHAT_WINDOWS do 
	    local f="ChatFrame" .. i;
	    local b = _G["ChatFrame"..i].ScrollBar b:UnregisterAllEvents() b:SetScript("OnShow", b.Hide) b:Hide();
    end
  end
  -- things to do when the module is disabled
  function module:OnModuleDisable()
  	DEFAULT_CHAT_FRAME:AddMessage("Reload UI");
  end
  --[[------------------------------------------------
      Core Functions
  ------------------------------------------------]] --
  function module:GetDescription()
    return PL["Hide chat window scrollbar."]
  end
  return
end) -- Prat:AddModuleToLoad
commented

Just wanted to bump this because the scrollbars are driving me up the wall. Would absolutely love a module to disable them since there are no standalone addons to do this, and just using something like ChatFrame1.ScrollBar:Hide() doesn't do anything since the game repeatedly makes them reappear.