ui: Refine TitleBar
component (#9415)
This PR continues the refinements to the `TitleBar` component. Here are the notable changes: - `KeyBindingDisplay` and `PlatformStyle` have been unified into a single `PlatformStyle`. - This provides us a consistent way for adapting UI to different platform styles. - `PlatformTitlebar` has been renamed to `TitleBar`. - The `Platform` prefix was irrelevant. - The Windows window controls have been factored out into a separate module and have been componentized. <img width="1283" alt="Screenshot 2024-03-15 at 3 34 38 PM" src="https://github.com/zed-industries/zed/assets/1486634/07da391f-828b-48bf-8849-58863f4ccce7"> > I'm missing the Segoe Fluent Icons font, so that's why the aren't rendering properly. Release Notes: - N/A
This commit is contained in:
parent
dd33330648
commit
c1f1c5e75f
16 changed files with 369 additions and 335 deletions
|
@ -29,10 +29,10 @@ pub enum ComponentStory {
|
|||
ListHeader,
|
||||
ListItem,
|
||||
OverflowScroll,
|
||||
PlatformTitlebar,
|
||||
Scroll,
|
||||
Tab,
|
||||
TabBar,
|
||||
TitleBar,
|
||||
ToggleButton,
|
||||
Text,
|
||||
ViewportUnits,
|
||||
|
@ -61,11 +61,11 @@ impl ComponentStory {
|
|||
Self::ListHeader => cx.new_view(|_| ui::ListHeaderStory).into(),
|
||||
Self::ListItem => cx.new_view(|_| ui::ListItemStory).into(),
|
||||
Self::OverflowScroll => cx.new_view(|_| crate::stories::OverflowScrollStory).into(),
|
||||
Self::PlatformTitlebar => cx.new_view(|_| ui::PlatformTitlebarStory).into(),
|
||||
Self::Scroll => ScrollStory::view(cx).into(),
|
||||
Self::Text => TextStory::view(cx).into(),
|
||||
Self::Tab => cx.new_view(|_| ui::TabStory).into(),
|
||||
Self::TabBar => cx.new_view(|_| ui::TabBarStory).into(),
|
||||
Self::TitleBar => cx.new_view(|_| ui::TitleBarStory).into(),
|
||||
Self::ToggleButton => cx.new_view(|_| ui::ToggleButtonStory).into(),
|
||||
Self::ViewportUnits => cx.new_view(|_| crate::stories::ViewportUnitsStory).into(),
|
||||
Self::Picker => PickerStory::new(cx).into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue