Merge branch 'main' into element-types
This commit is contained in:
commit
37d0b8424c
38 changed files with 921 additions and 396 deletions
|
@ -2,7 +2,7 @@ use gpui::{div, prelude::*, Component, ElementId, Styled, ViewContext};
|
|||
use std::sync::Arc;
|
||||
use theme2::ActiveTheme;
|
||||
|
||||
use crate::{Icon, IconColor, IconElement, Selection};
|
||||
use crate::{Icon, IconElement, Selection, TextColor};
|
||||
|
||||
pub type CheckHandler<V> = Arc<dyn Fn(Selection, &mut V, &mut ViewContext<V>) + Send + Sync>;
|
||||
|
||||
|
@ -54,9 +54,9 @@ impl<V: 'static> Checkbox<V> {
|
|||
.color(
|
||||
// If the checkbox is disabled we change the color of the icon.
|
||||
if self.disabled {
|
||||
IconColor::Disabled
|
||||
TextColor::Disabled
|
||||
} else {
|
||||
IconColor::Selected
|
||||
TextColor::Selected
|
||||
},
|
||||
),
|
||||
)
|
||||
|
@ -69,9 +69,9 @@ impl<V: 'static> Checkbox<V> {
|
|||
.color(
|
||||
// If the checkbox is disabled we change the color of the icon.
|
||||
if self.disabled {
|
||||
IconColor::Disabled
|
||||
TextColor::Disabled
|
||||
} else {
|
||||
IconColor::Selected
|
||||
TextColor::Selected
|
||||
},
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue