diff --git a/.gitignore b/.gitignore index 3a886c1..03b9e93 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,4 @@ result # misc docs-gpui-components -src-svelte \ No newline at end of file +src-svelte diff --git a/Cargo.toml b/Cargo.toml index 9c1f571..ebf1748 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,3 +43,6 @@ lto = true # Enables link-time-optimizations however is not stable. opt-level = 3 # Prioritizes speed. Use `z` if you prefer small binary size. panic = "abort" # Higher performance by disabling panic handlers. strip = true # Ensures debug symbols are removed. + +[alias] +run-watch = "watch -c -x check -x run" diff --git a/src/ui/components/button.rs b/src/ui/components/button.rs index 790e5af..3548b5e 100644 --- a/src/ui/components/button.rs +++ b/src/ui/components/button.rs @@ -1,3 +1,5 @@ +// TODO: convert this from an entity to a stateless button component. + use crate::ui::colors; use gpui::prelude::*; use gpui::*; diff --git a/src/ui/views/config.rs b/src/ui/views/config.rs index 8f33c96..ff84eef 100644 --- a/src/ui/views/config.rs +++ b/src/ui/views/config.rs @@ -1,8 +1,10 @@ use crate::device::io; use crate::device::types::{AppConfigInput, FullDeviceStatus}; +use crate::ui::colors; use crate::ui::components::{card::Card, page_view::PageView}; use crate::ui::ui_types::{LedDriverType, UsbIdentityPreset}; use gpui::*; +use gpui_component::button::{ButtonCustomVariant, ButtonVariants}; use gpui_component::{ ActiveTheme, Disableable, Icon, Theme, button::Button, @@ -400,7 +402,7 @@ impl ConfigView { v_flex() .gap_2() .child("Vendor Preset") - .child(Select::new(&self.vendor_select).w_full()), + .child(Select::new(&self.vendor_select).bg(rgb(0x222225)).w_full()), ) .child( div() @@ -427,7 +429,7 @@ impl ConfigView { v_flex() .gap_2() .child("Product Name") - .child(Input::new(&self.product_name_input)), + .child(Input::new(&self.product_name_input).bg(rgb(0x222225))), ); Card::new() @@ -458,13 +460,14 @@ impl ConfigView { v_flex() .gap_2() .child("LED GPIO Pin") - .child(Input::new(&self.led_gpio_input)), + .child(Input::new(&self.led_gpio_input).bg(rgb(0x222225))), ) .child( - v_flex() - .gap_2() - .child("LED Driver") - .child(Select::new(&self.led_driver_select).w_full()), + v_flex().gap_2().child("LED Driver").child( + Select::new(&self.led_driver_select) + .w_full() + .bg(rgb(0x222225)), + ), ) .child(div().h_px().bg(theme.border)) .child( @@ -530,7 +533,7 @@ impl ConfigView { v_flex() .gap_2() .child("Touch Timeout (seconds)") - .child(Input::new(&self.touch_timeout_input)), + .child(Input::new(&self.touch_timeout_input).bg(rgb(0x222225))), ); Card::new() @@ -652,6 +655,13 @@ impl Render for ConfigView { .icon(Icon::default().path("icons/save.svg")) .child("Apply Changes") .disabled(self.loading) + .custom( + ButtonCustomVariant::new(cx) + .color(rgb(0xe3e3e6).into()) + .hover(rgb(0xcfcfd1).into()) + .active(rgb(0xe3e3e6).into()) + .foreground(rgb(0x4b4b4e).into()), + ) .on_click(cx.listener(|this, _, window, cx| { this.apply_changes(window, cx); })),