mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-07 02:57:34 +00:00
Fix underflow when indexing into ColorScale
s
This commit is contained in:
parent
115bd65344
commit
220228c183
1 changed files with 4 additions and 4 deletions
|
@ -132,19 +132,19 @@ impl ColorScaleSet {
|
|||
}
|
||||
|
||||
pub fn light(&self, step: ColorScaleStep) -> Hsla {
|
||||
self.light[step - 1]
|
||||
self.light[step]
|
||||
}
|
||||
|
||||
pub fn light_alpha(&self, step: ColorScaleStep) -> Hsla {
|
||||
self.light_alpha[step - 1]
|
||||
self.light_alpha[step]
|
||||
}
|
||||
|
||||
pub fn dark(&self, step: ColorScaleStep) -> Hsla {
|
||||
self.dark[step - 1]
|
||||
self.dark[step]
|
||||
}
|
||||
|
||||
pub fn dark_alpha(&self, step: ColorScaleStep) -> Hsla {
|
||||
self.dark_alpha[step - 1]
|
||||
self.dark_alpha[step]
|
||||
}
|
||||
|
||||
pub fn step(&self, cx: &AppContext, step: ColorScaleStep) -> Hsla {
|
||||
|
|
Loading…
Reference in a new issue