ZIm/crates/ui/src/components.rs
Marshall Bowers 9e36a66fec
ui: Add NumericStepper component (#13954)
This PR adds a `NumericStepper` component that can be used to display a
numeric value along with controls to increment, decrement, and reset the
value.

The `ApplicationMenu` has been updated to use the `NumericStepper` for
adjusting the buffer and UI font size.

Here it is in action:


https://github.com/zed-industries/zed/assets/1486634/03cffe67-1256-4283-aa3d-560fffa06dad

Note: Due to the way we do font adjustments, once modified the reset
button will be displayed until it is clicked (or the font size
adjustment is otherwise reset). Simply returning to the original value
will currently not hide the reset button.

Release Notes:

- N/A
2024-07-08 18:45:49 -04:00

57 lines
965 B
Rust

mod avatar;
mod button;
mod checkbox;
mod context_menu;
mod disclosure;
mod divider;
mod dropdown_menu;
mod facepile;
mod icon;
mod indicator;
mod keybinding;
mod label;
mod list;
mod modal;
mod numeric_stepper;
mod popover;
mod popover_menu;
mod radio;
mod right_click_menu;
mod setting;
mod stack;
mod tab;
mod tab_bar;
mod tool_strip;
mod tooltip;
#[cfg(feature = "stories")]
mod stories;
pub use avatar::*;
pub use button::*;
pub use checkbox::*;
pub use context_menu::*;
pub use disclosure::*;
pub use divider::*;
use dropdown_menu::*;
pub use facepile::*;
pub use icon::*;
pub use indicator::*;
pub use keybinding::*;
pub use label::*;
pub use list::*;
pub use modal::*;
pub use numeric_stepper::*;
pub use popover::*;
pub use popover_menu::*;
pub use radio::*;
pub use right_click_menu::*;
pub use setting::*;
pub use stack::*;
pub use tab::*;
pub use tab_bar::*;
pub use tool_strip::*;
pub use tooltip::*;
#[cfg(feature = "stories")]
pub use stories::*;