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

Commit 5bcbc90

Browse files
committed
Changed terminology.
1 parent bdb95e1 commit 5bcbc90

12 files changed

+365
-63
lines changed

src/Workspace/SignsInternal/StudioWidgets/CollapsibleTitledSection.lua

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ local kRightButtonAsset = "rbxasset://textures/DeveloperFramework/button_arrow_r
2525
local kDownButtonAsset = "rbxasset://textures/DeveloperFramework/button_arrow_down.png"
2626

2727
local kArrowSize = 7
28-
local kDoubleClickTimeSec = 0.5
2928

3029
CollapsibleTitledSectionClass = {}
3130
CollapsibleTitledSectionClass.__index = CollapsibleTitledSectionClass
@@ -117,18 +116,20 @@ function CollapsibleTitledSectionClass:_CreateTitleBar(titleText)
117116

118117
local titleBar = Instance.new('ImageButton')
119118
titleBar.Name = 'TitleBarVisual'
119+
titleBar.AutoButtonColor = false
120120
titleBar.Position = UDim2.new(0, 0, 0, 0)
121121
titleBar.Size = UDim2.new(1, 0, 0, self._titleBarHeight)
122122
titleBar.Parent = self._frame
123123
titleBar.LayoutOrder = 1
124+
124125
GuiUtilities.syncGuiElementBorderColor(titleBar)
125126
GuiUtilities.syncGuiElementTitleColor(titleBar)
126127

127128
local titleLabel = Instance.new('TextLabel')
128129
titleLabel.Name = 'TitleLabel'
129130
titleLabel.BackgroundTransparency = 1
130-
titleLabel.Font = GuiUtilities.kStandardFontFaceBold
131-
titleLabel.TextSize = GuiUtilities.kStandardFontSize
131+
titleLabel.Font = GuiUtilities.kDefaultFontFaceBold
132+
titleLabel.TextSize = GuiUtilities.kDefaultFontSize
132133
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
133134
titleLabel.Text = titleText
134135
titleLabel.Position = UDim2.new(0, titleTextOffset, 0, 0)
@@ -186,15 +187,16 @@ function CollapsibleTitledSectionClass:_CreateTitleBar(titleText)
186187
end
187188

188189
function CollapsibleTitledSectionClass:_updateButtonVisual()
189-
local kTitlebarStandardBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Titlebar, Enum.StudioStyleGuideModifier.Default)
190+
local kTitlebarDefaultBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Titlebar, Enum.StudioStyleGuideModifier.Default)
190191
local kTitlebarHoverBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Hover)
191-
192+
local kTitlebarPressedBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Pressed)
193+
192194
if (self._clicked) then
193-
self._titleBar.BackgroundColor3 = kTitlebarHoverBackgroundColor
195+
self._titleBar.BackgroundColor3 = kTitlebarPressedBackgroundColor
194196
elseif (self._hovered) then
195197
self._titleBar.BackgroundColor3 = kTitlebarHoverBackgroundColor
196198
else
197-
self._titleBar.BackgroundColor3 = kTitlebarStandardBackgroundColor
199+
self._titleBar.BackgroundColor3 = kTitlebarDefaultBackgroundColor
198200
end
199201
end
200202

src/Workspace/SignsInternal/StudioWidgets/CustomTextButton.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function CustomTextButtonClass.new(buttonName, labelText)
4343
label.Text = labelText
4444
label.BackgroundTransparency = 1
4545
label.Size = UDim2.new(1, 0, 1, 0) -- 1, 0, 1, GuiUtilities.kButtonVerticalFudge
46-
label.Font = GuiUtilities.kStandardFontFace
47-
label.TextSize = GuiUtilities.kStandardFontSize
46+
label.Font = GuiUtilities.kDefaultFontFace
47+
label.TextSize = GuiUtilities.kDefaultFontSize
4848
label.Parent = button
4949
GuiUtilities.syncGuiElementFontColor(label)
5050

@@ -84,7 +84,7 @@ function CustomTextButtonClass.new(buttonName, labelText)
8484
end
8585

8686
function CustomTextButtonClass:_updateButtonVisual()
87-
local kButtonStandardBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Default)
87+
local kButtonDefaultBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Default)
8888
local kButtonPressedBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Pressed)
8989
local kButtonHoverBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Hover)
9090

@@ -93,7 +93,7 @@ function CustomTextButtonClass:_updateButtonVisual()
9393
elseif self._hovered then
9494
self._button.ImageColor3 = kButtonHoverBackgroundColor
9595
else
96-
self._button.ImageColor3 = kButtonStandardBackgroundColor
96+
self._button.ImageColor3 = kButtonDefaultBackgroundColor
9797
end
9898
end
9999

src/Workspace/SignsInternal/StudioWidgets/CustomTextLabel.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ function CustomTextLabelClass.new(nameSuffix, height)
2727
end
2828
label.BackgroundTransparency = 1
2929
label.Size = UDim2.new(1, 0, 1, 0)
30-
label.Font = GuiUtilities.kStandardFontFace
31-
label.TextSize = GuiUtilities.kStandardFontSize
30+
label.Font = GuiUtilities.kDefaultFontFace
31+
label.TextSize = GuiUtilities.kDefaultFontSize
3232
label.TextWrapped = true
3333
label.Parent = frame
3434

src/Workspace/SignsInternal/StudioWidgets/GuiUtilities.lua

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@ local module = {}
33
module.kTitleBarHeight = 27
44
module.kInlineTitleBarHeight = 24
55

6-
module.kStandardContentAreaWidth = 180
6+
module.kDefaultContentAreaWidth = 180
77

8-
module.kStandardFontSize = 15
9-
module.kStandardFontFace = Enum.Font.SourceSans
10-
module.kStandardFontFaceBold = Enum.Font.SourceSansBold
8+
module.kDefaultFontSize = 15
9+
module.kDefaultFontFace = Enum.Font.SourceSans
10+
module.kDefaultFontFaceBold = Enum.Font.SourceSansBold
1111

12-
module.kStandardPropertyHeight = 30
12+
module.kDefaultPropertyHeight = 30
1313
module.kSubSectionLabelHeight = 30
1414

15-
module.kStandardBorderColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Border, Enum.StudioStyleGuideModifier.Default)
15+
module.kDefaultBorderColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Border, Enum.StudioStyleGuideModifier.Default)
1616

17-
module.kStandardVMargin = 7
18-
module.kStandardHMargin = 16
17+
module.kDefaultVMargin = 7
18+
module.kDefaultHMargin = 16
1919

2020
module.kCheckboxMinLabelWidth = 52
2121
module.kCheckboxMinMargin = 16 -- Default: 12
2222
module.kCheckboxWidth = module.kCheckboxMinMargin -- Default: 12
2323

2424
module.kRadioButtonsHPadding = 54
2525

26-
module.StandardLineLabelLeftMargin = module.kTitleBarHeight
27-
module.StandardLineElementLeftMargin = (module.StandardLineLabelLeftMargin + module.kCheckboxMinLabelWidth
26+
module.DefaultLineLabelLeftMargin = module.kTitleBarHeight
27+
module.DefaultLineElementLeftMargin = (module.DefaultLineLabelLeftMargin + module.kCheckboxMinLabelWidth
2828
+ module.kCheckboxMinMargin + module.kCheckboxWidth + module.kRadioButtonsHPadding)
29-
module.StandardLineLabelWidth = (module.StandardLineElementLeftMargin - module.StandardLineLabelLeftMargin - 10 )
29+
module.DefaultLineLabelWidth = (module.DefaultLineElementLeftMargin - module.DefaultLineLabelLeftMargin - 10 )
3030

3131
module.kDropDownHeight = 55
3232

@@ -40,10 +40,10 @@ module.kButtonVerticalFudge = -5
4040
module.kBottomButtonsWidth = 100
4141

4242
module.kDisabledTextColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.ButtonText, Enum.StudioStyleGuideModifier.Disabled)
43-
module.kStandardButtonTextColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.ButtonText, Enum.StudioStyleGuideModifier.Default)
43+
module.kDefaultButtonTextColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.ButtonText, Enum.StudioStyleGuideModifier.Default)
4444

45-
module.kButtonStandardBorderColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.ButtonBorder, Enum.StudioStyleGuideModifier.Default)
46-
module.kButtonStandardBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Default)
45+
module.kButtonDefaultBorderColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.ButtonBorder, Enum.StudioStyleGuideModifier.Default)
46+
module.kButtonDefaultBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Default)
4747
module.kButtonPressedBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Pressed)
4848
module.kButtonHoverBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Hover)
4949
module.kButtonDisabledBackgroundColor = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Disabled)
@@ -170,8 +170,8 @@ end
170170

171171
-- A frame that is one standard-sized line, containing some standard-sized widget (label, edit box, dropdown,
172172
-- checkbox)
173-
function module.MakeStandardFixedHeightFrame(name)
174-
return module.MakeFixedHeightFrame(name, module.kStandardPropertyHeight)
173+
function module.MakeDefaultFixedHeightFrame(name)
174+
return module.MakeFixedHeightFrame(name, module.kDefaultPropertyHeight)
175175
end
176176

177177
function module.AdjustHeightDynamicallyToLayout(frame, uiLayout, optPadding)
@@ -223,7 +223,7 @@ local function MakeSectionInternal(parentGui, name, title, contentHeight)
223223
titleBar.Text = title
224224
titleBar.Parent = titleBarFrame
225225
titleBar.BackgroundTransparency = 1
226-
titleBar.Position = UDim2.new(0, module.kStandardHMargin, 0, 0)
226+
titleBar.Position = UDim2.new(0, module.kDefaultHMargin, 0, 0)
227227

228228
module.syncGuiElementFontColor(titleBar)
229229

@@ -235,18 +235,18 @@ local function MakeSectionInternal(parentGui, name, title, contentHeight)
235235
return frame
236236
end
237237

238-
function module.MakeStandardPropertyLabel(text, opt_ignoreThemeUpdates)
238+
function module.MakeDefaultPropertyLabel(text, opt_ignoreThemeUpdates)
239239
local label = Instance.new('TextLabel')
240240
label.RichText = true
241241
label.Name = 'Label'
242242
label.BackgroundTransparency = 1
243-
label.Font = module.kStandardFontFace
244-
label.TextSize = module.kStandardFontSize
243+
label.Font = module.kDefaultFontFace
244+
label.TextSize = module.kDefaultFontSize
245245
label.TextXAlignment = Enum.TextXAlignment.Left
246246
label.Text = text
247247
label.AnchorPoint = Vector2.new(0, 0.5)
248-
label.Position = UDim2.new(0, module.StandardLineLabelLeftMargin, 0.5, module.kTextVerticalFudge)
249-
label.Size = UDim2.new(0, module.StandardLineLabelWidth, 1, 0)
248+
label.Position = UDim2.new(0, module.DefaultLineLabelLeftMargin, 0.5, module.kTextVerticalFudge)
249+
label.Size = UDim2.new(0, module.DefaultLineLabelWidth, 1, 0)
250250

251251
if (not opt_ignoreThemeUpdates) then
252252
module.syncGuiElementFontColor(label)
@@ -259,7 +259,7 @@ function module.MakeFrameWithSubSectionLabel(name, text)
259259
local row = module.MakeFixedHeightFrame(name, module.kSubSectionLabelHeight)
260260
row.BackgroundTransparency = 1
261261

262-
local label = module.MakeStandardPropertyLabel(text)
262+
local label = module.MakeDefaultPropertyLabel(text)
263263
label.BackgroundTransparency = 1
264264
label.Parent = row
265265

src/Workspace/SignsInternal/StudioWidgets/ImageButtonWithText.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--
33
-- ImageButtonWithText.lua
44
--
5-
-- An image button with text underneath. Standardized hover, clicked, and
5+
-- An image button with text underneath. Defaultized hover, clicked, and
66
-- selected states.
77
--
88
----------------------------------------
@@ -50,15 +50,15 @@ function ImageButtonWithTextClass.new(name,
5050
textLabel.Size = textSize
5151
textLabel.Position = textPos
5252
textLabel.TextScaled = true
53-
textLabel.Font = GuiUtilities.kStandardFontFace
53+
textLabel.Font = GuiUtilities.kDefaultFontFace
5454
textLabel.Parent = button
5555

5656
GuiUtilities.syncGuiElementFontColor(textLabel)
5757

5858
local uiTextSizeConstraint = Instance.new("UITextSizeConstraint")
5959
-- Spec asks for fontsize of 12 pixels, but in Roblox the text font sizes look smaller than the mock
6060
--Note: For this font the Roblox text size is 25.7% larger than the design spec.
61-
uiTextSizeConstraint.MaxTextSize = GuiUtilities.kStandardFontSize
61+
uiTextSizeConstraint.MaxTextSize = GuiUtilities.kDefaultFontSize
6262
uiTextSizeConstraint.Parent = textLabel
6363

6464
self._button = button

0 commit comments

Comments
 (0)