Update UI elements and implement user settings for customization
This commit is contained in:
parent
6e3393c93f
commit
289255d67a
9 changed files with 163 additions and 32 deletions
|
@ -1,9 +1,10 @@
|
|||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
|
||||
use gpui3::{DefiniteLength, Hsla, Interactive, MouseButton, WindowContext};
|
||||
use gpui3::{rems, DefiniteLength, Hsla, Interactive, MouseButton, WindowContext};
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::settings::user_settings;
|
||||
use crate::{h_stack, Icon, IconColor, IconElement, Label, LabelColor, LabelSize};
|
||||
|
||||
#[derive(Default, PartialEq, Clone, Copy)]
|
||||
|
@ -148,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 mut el = h_stack()
|
||||
.h_6()
|
||||
.px_1()
|
||||
.items_center()
|
||||
.p_1()
|
||||
.text_size(rems(1.125 * setting.ui_scale()))
|
||||
.rounded_md()
|
||||
.border()
|
||||
.border_color(border_color)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue