Skip to content

Commit

Permalink
fix: fix titletext cutoff in most cases
Browse files Browse the repository at this point in the history
  • Loading branch information
googer committed Jan 11, 2025
1 parent 2e9bfad commit 0126969
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lua/gwater2_menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ local function create_menu(init)

styling.define_scrollbar(tab:GetVBar())

local _ = tab:Add("DLabel") _:SetText(" ") _:SetFont("GWater2Title") _:Dock(TOP) _:SizeToContents()
local _ = tab:Add("DLabel") _:SetText(" ") _:SetFont("GWater2Title") _:Dock(TOP) _:SizeToContents() _:SetTall(_:GetTall() + 5)
function _:Paint(w, h)
draw.DrawText(_util.get_localised("About Tab.titletext", gwater2.VERSION), "GWater2Title", 6, 6, Color(0, 0, 0), TEXT_ALIGN_LEFT)
draw.DrawText(_util.get_localised("About Tab.titletext", gwater2.VERSION), "GWater2Title", 5, 5, Color(187, 245, 255), TEXT_ALIGN_LEFT)
Expand Down Expand Up @@ -356,7 +356,7 @@ local function create_menu(init)

styling.define_scrollbar(tab:GetVBar())

local _ = tab:Add("DLabel") _:SetText(" ") _:SetFont("GWater2Title") _:Dock(TOP) _:SizeToContents()
local _ = tab:Add("DLabel") _:SetText(" ") _:SetFont("GWater2Title") _:Dock(TOP) _:SizeToContents() _:SetTall(_:GetTall() + 5)
function _:Paint(w, h)
draw.DrawText(_util.get_localised("Credits.titletext"), "GWater2Title", 6, 6, Color(0, 0, 0), TEXT_ALIGN_LEFT)
draw.DrawText(_util.get_localised("Credits.titletext"), "GWater2Title", 5, 5, Color(187, 245, 255), TEXT_ALIGN_LEFT)
Expand Down Expand Up @@ -409,7 +409,7 @@ local function create_menu(init)

styling.define_scrollbar(tab:GetVBar())

local _ = tab:Add("DLabel") _:SetText(" ") _:SetFont("GWater2Title") _:Dock(TOP) _:SizeToContents()
local _ = tab:Add("DLabel") _:SetText(" ") _:SetFont("GWater2Title") _:Dock(TOP) _:SizeToContents() _:SetTall(_:GetTall() + 5)
function _:Paint(w, h)
draw.DrawText(_util.get_localised("Menu.titletext"), "GWater2Title", 6, 6, Color(0, 0, 0), TEXT_ALIGN_LEFT)
draw.DrawText(_util.get_localised("Menu.titletext"), "GWater2Title", 5, 5, Color(187, 245, 255), TEXT_ALIGN_LEFT)
Expand Down
2 changes: 1 addition & 1 deletion lua/menu/gwater2_paramstabs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ local function init_tab(tabs, tab_name, image, recursive)

styling.define_scrollbar(tab:GetVBar())

local _ = tab:Add("DLabel") _:SetText(" ") _:SetFont("GWater2Title") _:Dock(TOP) _:SizeToContents()
local _ = tab:Add("DLabel") _:SetText(" ") _:SetFont("GWater2Title") _:Dock(TOP) _:SizeToContents() _:SetTall(_:GetTall() + 5)
function _:Paint(w, h)
draw.DrawText(util.get_localised(tab_name .. ".titletext"), "GWater2Title", 6, 6, Color(0, 0, 0), TEXT_ALIGN_LEFT)
draw.DrawText(util.get_localised(tab_name .. ".titletext"), "GWater2Title", 5, 5, Color(187, 245, 255), TEXT_ALIGN_LEFT)
Expand Down

0 comments on commit 0126969

Please sign in to comment.