git_ui: Update git panel commit editor, start on quick commit

- Fixes commit editor issues & updates style
- Starts on quick commit (not hooked up to anything)
- Updates some panel styles
- Adds SwitchWithLabel
- 
Release Notes:

- N/A
This commit is contained in:
Nate Butler 2025-02-10 10:52:09 -05:00 committed by GitHub
parent 69d415c8d0
commit de8d4d00ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 586 additions and 120 deletions

View file

@ -95,7 +95,7 @@ pub struct Button {
selected_icon: Option<IconName>,
selected_icon_color: Option<Color>,
key_binding: Option<KeyBinding>,
keybinding_position: KeybindingPosition,
key_binding_position: KeybindingPosition,
alpha: Option<f32>,
}
@ -121,7 +121,7 @@ impl Button {
selected_icon: None,
selected_icon_color: None,
key_binding: None,
keybinding_position: KeybindingPosition::default(),
key_binding_position: KeybindingPosition::default(),
alpha: None,
}
}
@ -197,7 +197,7 @@ impl Button {
/// This method allows you to specify where the keybinding should be displayed
/// in relation to the button's label.
pub fn key_binding_position(mut self, position: KeybindingPosition) -> Self {
self.keybinding_position = position;
self.key_binding_position = position;
self
}
@ -427,7 +427,7 @@ impl RenderOnce for Button {
.child(
h_flex()
.when(
self.keybinding_position == KeybindingPosition::Start,
self.key_binding_position == KeybindingPosition::Start,
|this| this.flex_row_reverse(),
)
.gap(DynamicSpacing::Base06.rems(cx))