mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-27 04:44:30 +00:00
Remove unnecessarily general keystroke_label_for
function
This commit is contained in:
parent
c75207c4e5
commit
06b12bbb68
1 changed files with 1 additions and 17 deletions
|
@ -139,27 +139,11 @@ pub fn keystroke_label<V: View>(
|
|||
) -> Container<V> {
|
||||
// FIXME: Put the theme in it's own global so we can
|
||||
// query the keystroke style on our own
|
||||
keystroke_label_for(
|
||||
cx.handle().id(),
|
||||
label_text,
|
||||
label_style,
|
||||
keystroke_style,
|
||||
action,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn keystroke_label_for<V: View>(
|
||||
view_id: usize,
|
||||
label_text: &'static str,
|
||||
label_style: &ContainedText,
|
||||
keystroke_style: &ContainedText,
|
||||
action: Box<dyn Action>,
|
||||
) -> Container<V> {
|
||||
Flex::row()
|
||||
.with_child(Label::new(label_text, label_style.text.clone()).contained())
|
||||
.with_child(
|
||||
KeystrokeLabel::new(
|
||||
view_id,
|
||||
cx.view_id(),
|
||||
action,
|
||||
keystroke_style.container,
|
||||
keystroke_style.text.clone(),
|
||||
|
|
Loading…
Reference in a new issue