Merge branch 'gpui2' into gpui2-theme-to-color

This commit is contained in:
Marshall Bowers 2023-10-19 16:10:44 -04:00
commit 3932c1064e
38 changed files with 2036 additions and 340 deletions

View file

@ -149,11 +149,11 @@ impl<S: 'static + Send + Sync + Clone> Button<S> {
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
let icon_color = self.icon_color();
let border_color = self.border_color(cx);
let setting = user_settings();
let settings = user_settings(cx);
let mut el = h_stack()
.p_1()
.text_size(ui_size(1.))
.text_size(ui_size(cx, 1.))
.rounded_md()
.border()
.border_color(border_color)

View file

@ -180,8 +180,8 @@ impl<S: 'static + Send + Sync> IconElement<S> {
let color = ThemeColor::new(cx);
let fill = self.color.color(cx);
let svg_size = match self.size {
IconSize::Small => ui_size(12. / 14.),
IconSize::Medium => ui_size(15. / 14.),
IconSize::Small => ui_size(cx, 12. / 14.),
IconSize::Medium => ui_size(cx, 15. / 14.),
};
svg()

View file

@ -90,6 +90,7 @@ impl<S: 'static + Send + Sync + Clone> Input<S> {
});
div()
.id("input")
.h_7()
.w_full()
.px_2()
@ -97,7 +98,7 @@ impl<S: 'static + Send + Sync + Clone> Input<S> {
.border_color(system_color.transparent)
.bg(input_bg)
.hover(|style| style.bg(input_hover_bg))
// .active(|style| style.bg(input_active_bg))
.active(|style| style.bg(input_active_bg))
.flex()
.items_center()
.child(

View file

@ -98,7 +98,7 @@ impl<S: 'static + Send + Sync + Clone> Label<S> {
.bg(LabelColor::Hidden.hsla(cx)),
)
})
.text_size(ui_size(1.))
.text_size(ui_size(cx, 1.))
.when(self.line_height_style == LineHeightStyle::UILabel, |this| {
this.line_height(relative(1.))
})