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

Commit 1e0f37a

Browse files
committed
Bug fixes.
1 parent 83cfcc0 commit 1e0f37a

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

src/SignsInternal/StudioWidgets/CustomTextLabel.lua

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
-- Custom text button class which can be used in any gui.
66
--
77
----------------------------------------
8-
GuiUtilities = require(script.Parent.GuiUtilities)
8+
local GuiUtilities = require(script.Parent.GuiUtilities)
99

10-
CustomTextLabelClass = {}
10+
local CustomTextLabelClass = {}
1111
CustomTextLabelClass.__index = CustomTextLabelClass
1212

1313
function CustomTextLabelClass.new(nameSuffix, height)
@@ -30,11 +30,18 @@ function CustomTextLabelClass.new(nameSuffix, height)
3030
self._frame = frame
3131

3232
local aspectRatio = Instance.new("UIAspectRatioConstraint")
33+
aspectRatio.AspectRatio = 1
34+
aspectRatio.AspectType = Enum.AspectType.ScaleWithParentSize
35+
aspectRatio.DominantAxis = Enum.DominantAxis.Height
3336
aspectRatio.Parent = frame
37+
self._aspectRatio = aspectRatio
3438

3539
local label = Instance.new("TextLabel")
3640
label.Text = "Preview"
3741
label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
42+
if GuiUtilities:ShouldUseIconsForDarkerBackgrounds() then
43+
label.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
44+
end
3845
if GuiUtilities:ShouldUseIconsForDarkerBackgrounds() then
3946
label.TextColor3 = Color3.fromRGB(255, 255, 255)
4047
end
@@ -183,3 +190,5 @@ function CustomTextLabelClass.new(nameSuffix, height)
183190
end
184191

185192
return CustomTextLabelClass
193+
194+
-- To fix the above you can

src/SignsInternal/StudioWidgets/GuiUtilities.lua

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ function module.syncGuiElementBackgroundColor(guiElement)
104104
setColors()
105105
end
106106

107+
function module.syncGuiElementTitlebarColor(guiElement)
108+
local function setColors()
109+
guiElement.BackgroundColor3 = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Titlebar)
110+
end
111+
settings().Studio.ThemeChanged:Connect(setColors)
112+
setColors()
113+
end
114+
107115
function module.syncGuiElementScrollBarBackgroundColor(guiElement)
108116
local function setColors()
109117
guiElement.BackgroundColor3 = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.ScrollBarBackground)
@@ -140,6 +148,23 @@ function module.syncGuiInputFieldBorderColor(guiElement)
140148
setColors()
141149
end
142150

151+
function module.syncGuiTabBarBackgroundColor(guiElement)
152+
local function setColors()
153+
guiElement.BackgroundColor3 = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.RibbonTab)
154+
end
155+
settings().Studio.ThemeChanged:Connect(setColors)
156+
setColors()
157+
end
158+
159+
function module.syncGuiTabBackgroundColor(guiElement)
160+
local function setColors()
161+
guiElement.BackgroundColor3 = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.RibbonTab)
162+
end
163+
settings().Studio.ThemeChanged:Connect(setColors)
164+
setColors()
165+
end
166+
167+
143168
function module.syncGuiInputFieldBackgroundColor(guiElement)
144169
local function setColors()
145170
guiElement.ImageColor3 = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.InputFieldBackground)
@@ -305,7 +330,6 @@ function module.MakeFrameWithSubSectionLabel(name, text, url)
305330
row.BackgroundTransparency = 1
306331

307332
local label = module.MakeDefaultPropertyLabel(text, false, url)
308-
label.BackgroundTransparency = 1
309333
label.Parent = row
310334

311335
return row

0 commit comments

Comments
 (0)