Skip to content

Commit

Permalink
Improve loading bar appearance on light themes
Browse files Browse the repository at this point in the history
  • Loading branch information
pinehappi committed Nov 7, 2024
1 parent 3d03abf commit c099314
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/UI/StyleState/Utility/LoadingBarStyleState.luau
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@

local Theme = require(script.Parent.Parent.Parent.Theme)

local GRADIENT_BILINEAR = NumberSequence.new({
NumberSequenceKeypoint.new(0, 1),
NumberSequenceKeypoint.new(0.5, 0),
NumberSequenceKeypoint.new(1, 1),
})
local GRADIENT_MOSTLY_SOLID = NumberSequence.new({
NumberSequenceKeypoint.new(0, 0.5),
NumberSequenceKeypoint.new(0.5, 0),
NumberSequenceKeypoint.new(1, 0.5),
})

local LoadingBarStyleState = {}
LoadingBarStyleState.__index = LoadingBarStyleState

Expand Down Expand Up @@ -44,9 +55,11 @@ function LoadingBarStyleState:update()
self.container.BackgroundTransparency = 0
local hue, _, _ = Theme.getAccentComponents(self.theme.preset, self.theme.accent)
self.container.BackgroundColor3 = Color3.new(0.6, 0.6, 0.6)
self.fill.UIGradient.Transparency = GRADIENT_MOSTLY_SOLID
else
self.container.BackgroundTransparency = 0.75
self.container.BackgroundColor3 = self.theme.colors.mainAccent
self.fill.UIGradient.Transparency = GRADIENT_BILINEAR
end
self.fill.BackgroundColor3 = self.theme.colors.mainAccent
end
Expand Down
2 changes: 0 additions & 2 deletions tests/TreeViewer/fuzzJSON.luau
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
--!strict

-- Fuzz json given a max-depth

-- Actions to generate random JSON+buffer-acceptable value
type Action = (depth: number) -> any

Expand Down

0 comments on commit c099314

Please sign in to comment.