Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit 415fd6b

Browse files
committed
Fixed bugs with url.
1 parent df269c1 commit 415fd6b

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/SignsInternal/StudioWidgets/GuiUtilities.lua

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ module.kCheckboxMinLabelWidth = 52
2222
module.kCheckboxMinMargin = 16 -- Default: 12
2323
module.kCheckboxWidth = module.kCheckboxMinMargin -- Default: 12
2424

25+
module.kTextInputHeight = 22
26+
module.kTextInputWidth = module.kCheckboxWidth * 2
27+
2528
module.kRadioButtonsHPadding = 54
2629

2730
module.DefaultLineLabelLeftMargin = module.kTitleBarHeight
@@ -161,6 +164,14 @@ function module.syncGuiElementFontColor(guiElement)
161164
setColors()
162165
end
163166

167+
function module.syncGuiElementPlaceholderColor(guiElement)
168+
local function setColors()
169+
guiElement.PlaceholderColor3 = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.DimmedText)
170+
end
171+
settings().Studio.ThemeChanged:Connect(setColors)
172+
setColors()
173+
end
174+
164175
function module.syncGuiImageColor(guiElement)
165176
local function setColors()
166177
guiElement.ImageColor3 = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.MainText)
@@ -247,7 +258,7 @@ function module.AddStripedChildrenToListFrame(listFrame, frames)
247258
end
248259
end
249260

250-
function module.MakeDefaultPropertyLabel(text: string, opt_ignoreThemeUpdates: boolean, WikiPage: string?)
261+
function module.MakeDefaultPropertyLabel(text: string, opt_ignoreThemeUpdates: boolean, url: string?)
251262
local label = Instance.new("TextLabel")
252263
label.RichText = true
253264
label.Name = "Label"
@@ -264,7 +275,7 @@ function module.MakeDefaultPropertyLabel(text: string, opt_ignoreThemeUpdates: b
264275
module.syncGuiElementFontColor(label)
265276
end
266277

267-
if WikiPage then
278+
if url then
268279
local help = Instance.new("ImageButton")
269280
help.Name = "Help"
270281
help.BackgroundTransparency = 1
@@ -276,20 +287,21 @@ function module.MakeDefaultPropertyLabel(text: string, opt_ignoreThemeUpdates: b
276287

277288
help.MouseButton1Click:Connect(function()
278289
local plugin = script.Parent.Parent.Parent
279-
plugin:OpenWikiPage(WikiPage)
290+
plugin:OpenWikiPage(url)
280291
end)
281-
282-
-- module.syncGuiImageColor(help)
292+
if not opt_ignoreThemeUpdates then
293+
module.syncGuiImageColor(help)
294+
end
283295
end
284296

285297
return label
286298
end
287299

288-
function module.MakeFrameWithSubSectionLabel(name, text, wikiLink)
300+
function module.MakeFrameWithSubSectionLabel(name, text, url)
289301
local row = module.MakeFixedHeightFrame(name, module.kSubSectionLabelHeight)
290302
row.BackgroundTransparency = 1
291303

292-
local label = module.MakeDefaultPropertyLabel(text, false, wikiLink)
304+
local label = module.MakeDefaultPropertyLabel(text, false, url)
293305
label.BackgroundTransparency = 1
294306
label.Parent = row
295307

0 commit comments

Comments
 (0)