diff --git a/src/chat/chat_history.rs b/src/chat/chat_history.rs index 95f3939e..29b414c6 100644 --- a/src/chat/chat_history.rs +++ b/src/chat/chat_history.rs @@ -169,7 +169,7 @@ impl Widget for ChatHistory { } Item::NoAgentsWarning(text) => { let item = list.item(cx, item_id, live_id!(NoAgentsWarning)); - item.set_text(cx,text); + item.set_text(cx, text); item.draw_all(cx, scope); } Item::AgentButton(agent) => { diff --git a/src/chat/chat_history_card.rs b/src/chat/chat_history_card.rs index 0d64913e..5cb824e1 100644 --- a/src/chat/chat_history_card.rs +++ b/src/chat/chat_history_card.rs @@ -450,12 +450,12 @@ impl ChatHistoryCard { } fn set_title_text(&mut self, cx: &mut Cx, text: &str, caption: &str) { - self.view.label(id!(title_label)).set_text(cx,text.trim()); + self.view.label(id!(title_label)).set_text(cx, text.trim()); if let TitleState::Editable = self.title_edition_state { - self.view.text_input(id!(title_input)).set_text(cx,text.trim()); + self.view.text_input(id!(title_input)).set_text(cx, text.trim()); } self.label(id!(model_or_agent_name_label)) - .set_text(cx,&human_readable_name(caption)); + .set_text(cx, &human_readable_name(caption)); } fn update_title_visibility(&mut self, cx: &mut Cx) { diff --git a/src/chat/chat_line.rs b/src/chat/chat_line.rs index 336c8fd0..28696979 100644 --- a/src/chat/chat_line.rs +++ b/src/chat/chat_line.rs @@ -413,7 +413,7 @@ impl ChatLineRef { let Some(inner) = self.borrow_mut() else { return; }; - inner.label(id!(sender_name)).set_text(cx,text); + inner.label(id!(sender_name)).set_text(cx, text); } pub fn set_model_avatar_text(&mut self, cx: &mut Cx, text: &str) { @@ -422,7 +422,7 @@ impl ChatLineRef { }; inner.view(id!(avatar_section.model)).set_visible(cx, true); inner.chat_agent_avatar(id!(avatar_section.agent)).set_visible(false); - inner.label(id!(avatar_label)).set_text(cx,text); + inner.label(id!(avatar_label)).set_text(cx, text); } pub fn set_model_avatar(&mut self, cx: &mut Cx, agent: &MofaAgent) { @@ -444,13 +444,13 @@ impl ChatLineRef { ChatLineState::Editable | ChatLineState::NotEditable => { if is_streaming && !text.is_empty() { let output = format!("{}{}", text, "●"); - inner.text_input(id!(input)).set_text(cx,&output.trim()); - inner.label(id!(plain_text_message)).set_text(cx,&output.trim()); - inner.markdown(id!(markdown_message)).set_text(cx,&output.trim()); + inner.text_input(id!(input)).set_text(cx, &output.trim()); + inner.label(id!(plain_text_message)).set_text(cx, &output.trim()); + inner.markdown(id!(markdown_message)).set_text(cx, &output.trim()); } else { - inner.text_input(id!(input)).set_text(cx,text.trim()); - inner.label(id!(plain_text_message)).set_text(cx,text.trim()); - inner.markdown(id!(markdown_message)).set_text(cx,text.trim()); + inner.text_input(id!(input)).set_text(cx, text.trim()); + inner.label(id!(plain_text_message)).set_text(cx, text.trim()); + inner.markdown(id!(markdown_message)).set_text(cx, text.trim()); } // We know only AI assistant messages could be empty, so it is never diff --git a/src/chat/chat_panel.rs b/src/chat/chat_panel.rs index 5cf6c265..e7c07a55 100644 --- a/src/chat/chat_panel.rs +++ b/src/chat/chat_panel.rs @@ -424,7 +424,7 @@ impl Widget for ChatPanel { if self.focus_on_prompt_input_pending { self.focus_on_prompt_input_pending = false; - self.prompt_input(id!(main_prompt_input)).reset_text(cx,true); + self.prompt_input(id!(main_prompt_input)).reset_text(cx, true); } let message_list_uid = self.portal_list(id!(chat)).widget_uid(); @@ -807,7 +807,7 @@ impl ChatPanel { store.send_message_to_current_entity(prompt, regenerate_from); } - self.prompt_input(id!(main_prompt_input)).reset_text(cx,false); + self.prompt_input(id!(main_prompt_input)).reset_text(cx, false); // Scroll to the bottom when the message is sent self.scroll_messages_to_bottom(cx); @@ -847,7 +847,7 @@ impl ChatPanel { empty_view .label(id!(avatar_label)) - .set_text(cx,&get_model_initial_letter(store).unwrap_or('A').to_string()); + .set_text(cx, &get_model_initial_letter(store).unwrap_or('A').to_string()); } } } @@ -920,7 +920,7 @@ impl ChatPanel { let username = chat_line_data.username.as_ref().map_or("", String::as_str); chat_line_item.set_sender_name(cx, &username); - chat_line_item.set_regenerate_button_visible(cx,false); + chat_line_item.set_regenerate_button_visible(cx, false); match &chat_line_data.entity { Some(ChatEntityId::Agent(agent_id)) => { diff --git a/src/chat/chat_params.rs b/src/chat/chat_params.rs index 09b4d4a4..d4226a57 100644 --- a/src/chat/chat_params.rs +++ b/src/chat/chat_params.rs @@ -275,10 +275,10 @@ impl Widget for ChatParams { max_tokens.set_value(cx, ip.max_tokens as f64); frequency_penalty.set_value(cx, ip.frequency_penalty as f64); presence_penalty.set_value(cx, ip.presence_penalty as f64); - stop.set_text(cx,&ip.stop); + stop.set_text(cx, &ip.stop); let system_prompt_value = chat.system_prompt.clone().unwrap_or_default(); - system_prompt.set_text(cx,&system_prompt_value); + system_prompt.set_text(cx, &system_prompt_value); // Currently, `selected` and `set_selected` interact with the animator of // the widget to do what they do. To avoid some visual issues, we should not diff --git a/src/chat/delete_chat_modal.rs b/src/chat/delete_chat_modal.rs index 73c7e93f..02317352 100644 --- a/src/chat/delete_chat_modal.rs +++ b/src/chat/delete_chat_modal.rs @@ -172,7 +172,7 @@ impl Widget for DeleteChatModal { chat_title ); self.label(id!(wrapper.body.delete_prompt)) - .set_text(cx,&prompt_text); + .set_text(cx, &prompt_text); self.view .draw_walk(cx, scope, walk.with_abs_pos(DVec2 { x: 0., y: 0. })) diff --git a/src/chat/entity_button.rs b/src/chat/entity_button.rs index c134ecc2..3ec6730f 100644 --- a/src/chat/entity_button.rs +++ b/src/chat/entity_button.rs @@ -173,21 +173,21 @@ impl EntityButton { let mut avatar = self.chat_agent_avatar(id!(agent_avatar)); let server_url = self.label(id!(server_url.label)); - name_label.set_text(cx,&entity.name()); + name_label.set_text(cx, &entity.name()); if let ChatEntityRef::Agent(agent) = entity { avatar.set_visible(true); avatar.set_agent(agent); - description_label.set_text(cx,&agent.description); + description_label.set_text(cx, &agent.description); let formatted_server_url = agent.server_id.0 .strip_prefix("https://") .or_else(|| agent.server_id.0.strip_prefix("http://")) .unwrap_or(&agent.server_id.0); - server_url.set_text(cx,formatted_server_url); + server_url.set_text(cx, formatted_server_url); } else { avatar.set_visible(false); - description_label.set_text(cx,""); + description_label.set_text(cx, ""); } self.entity = Some(entity.id()); diff --git a/src/chat/model_selector.rs b/src/chat/model_selector.rs index e8c1a833..85e9d89a 100644 --- a/src/chat/model_selector.rs +++ b/src/chat/model_selector.rs @@ -281,7 +281,7 @@ impl Widget for ModelSelector { self.view(id!(choose)).set_visible(cx, true); self.view(id!(selected_agent)).set_visible(cx, false); self.view(id!(selected_model)).set_visible(cx, false); - choose_label.set_text(cx,"Choose a Model or Agent"); + choose_label.set_text(cx, "Choose a Model or Agent"); let color = vec3(0.0, 0.0, 0.0); choose_label.apply_over( cx, diff --git a/src/chat/prompt_input.rs b/src/chat/prompt_input.rs index b8c40dd0..23eb9867 100644 --- a/src/chat/prompt_input.rs +++ b/src/chat/prompt_input.rs @@ -250,7 +250,7 @@ impl WidgetMatchEvent for PromptInput { { if idx == 0 { let label = WidgetRef::new_from_ptr(cx, self.section_label_template); - label.set_text(cx,"Agents"); + label.set_text(cx, "Agents"); prompt.add_unselectable_item(label); } @@ -271,7 +271,7 @@ impl WidgetMatchEvent for PromptInput { { if idx == 0 { let label = WidgetRef::new_from_ptr(cx, self.section_label_template); - label.set_text(cx,"Models"); + label.set_text(cx, "Models"); prompt.add_unselectable_item(label); } @@ -318,7 +318,7 @@ impl PromptInput { match entity { ChatEntityId::Agent(agent_id) => { let agent = store.chats.get_agent_or_placeholder(agent_id); - label.set_text(cx,&agent.name); + label.set_text(cx, &agent.name); agent_avatar.set_agent(agent); } ChatEntityId::ModelFile(file_id) => { @@ -327,7 +327,7 @@ impl PromptInput { .downloads .get_file(file_id) .expect("selected file not found"); - label.set_text(cx,&file.name); + label.set_text(cx, &file.name); agent_avatar.set_visible(false); } } diff --git a/src/landing/download_item.rs b/src/landing/download_item.rs index b0012f4c..42414d01 100644 --- a/src/landing/download_item.rs +++ b/src/landing/download_item.rs @@ -227,13 +227,13 @@ impl Widget for DownloadItem { self.file_id = Some(download.file.id.clone()); self.label(id!(filename)) - .set_text(cx,download.file.name.as_str()); + .set_text(cx, download.file.name.as_str()); self.label(id!(architecture_tag.caption)) - .set_text(cx,download.model.architecture.as_str()); + .set_text(cx, download.model.architecture.as_str()); self.label(id!(params_size_tag.caption)) - .set_text(cx,&&download.model.requires.as_str()); + .set_text(cx, &&download.model.requires.as_str()); let progress_bar_width = download.progress * 6.0; // 6.0 = 600px / 100% let label = self.label(id!(progress)); @@ -241,7 +241,7 @@ impl Widget for DownloadItem { PendingDownloadsStatus::Initializing => { let downloading_color = vec3(0.035, 0.572, 0.314); //#099250 - label.set_text(cx,&format!("Downloading {:.1}%", download.progress)); + label.set_text(cx, &format!("Downloading {:.1}%", download.progress)); label.apply_over( cx, live! { draw_text: { color: (downloading_color) } @@ -264,7 +264,7 @@ impl Widget for DownloadItem { PendingDownloadsStatus::Downloading => { let downloading_color = vec3(0.035, 0.572, 0.314); //#099250 - label.set_text(cx,&format!("Downloading {:.1}%", download.progress)); + label.set_text(cx, &format!("Downloading {:.1}%", download.progress)); label.apply_over( cx, live! { draw_text: { color: (downloading_color) } @@ -287,7 +287,7 @@ impl Widget for DownloadItem { PendingDownloadsStatus::Paused => { let paused_color = vec3(0.4, 0.44, 0.52); //#667085 - label.set_text(cx,&format!("Paused {:.1}%", download.progress)); + label.set_text(cx, &format!("Paused {:.1}%", download.progress)); label.apply_over( cx, live! { draw_text: { color: (paused_color) } @@ -310,7 +310,7 @@ impl Widget for DownloadItem { PendingDownloadsStatus::Error => { let failed_color = vec3(0.7, 0.11, 0.09); // #B42318 - label.set_text(cx,&format!("Error {:.1}%", download.progress)); + label.set_text(cx, &format!("Error {:.1}%", download.progress)); label.apply_over( cx, live! { draw_text: { color: (failed_color) } @@ -337,7 +337,7 @@ impl Widget for DownloadItem { .unwrap_or("-".to_string()); self.label(id!(downloaded_size)) - .set_text(cx,&format!("{} / {}", downloaded_size, total_size)); + .set_text(cx, &format!("{} / {}", downloaded_size, total_size)); self.view.draw_walk(cx, scope, walk) } diff --git a/src/landing/downloads.rs b/src/landing/downloads.rs index 95fac86f..f9fefe82 100644 --- a/src/landing/downloads.rs +++ b/src/landing/downloads.rs @@ -166,14 +166,14 @@ impl Widget for Downloads { }) .count(); self.label(id!(downloading_count)) - .set_text(cx,&format!("{} downloading", download_count)); + .set_text(cx, &format!("{} downloading", download_count)); let paused_count = pending_downloads .iter() .filter(|d| matches!(d.status, PendingDownloadsStatus::Paused)) .count(); self.label(id!(paused_count)) - .set_text(cx,&format!("{} paused", paused_count)); + .set_text(cx, &format!("{} paused", paused_count)); let failed_count = pending_downloads .iter() @@ -182,9 +182,9 @@ impl Widget for Downloads { if failed_count > 0 { self.label(id!(failed_count)) - .set_text(cx,&format!("{} failed", failed_count)); + .set_text(cx, &format!("{} failed", failed_count)); } else { - self.label(id!(failed_count)).set_text(cx,""); + self.label(id!(failed_count)).set_text(cx, ""); } while let Some(view_item) = self.view.draw_walk(cx, &mut Scope::empty(), walk).step() { diff --git a/src/landing/landing_screen.rs b/src/landing/landing_screen.rs index 908ab997..c1899491 100644 --- a/src/landing/landing_screen.rs +++ b/src/landing/landing_screen.rs @@ -91,9 +91,9 @@ impl Widget for LandingScreen { let models = &search.models; let models_count = models.len(); self.label(id!(heading_with_filters.results)) - .set_text(cx,&format!("{} Results", models_count)); + .set_text(cx, &format!("{} Results", models_count)); self.label(id!(heading_with_filters.keyword)) - .set_text(cx,&format!(" for \"{}\"", keyword)); + .set_text(cx, &format!(" for \"{}\"", keyword)); } else { self.view(id!(heading_with_filters)).set_visible(cx, false); } diff --git a/src/landing/model_card.rs b/src/landing/model_card.rs index bd49e094..ca6c7f92 100644 --- a/src/landing/model_card.rs +++ b/src/landing/model_card.rs @@ -348,26 +348,26 @@ impl Widget for ModelCard { self.model_id = model.model_id.clone(); let name = &model.name; - self.label(id!(model_name)).set_text(cx,name); + self.label(id!(model_name)).set_text(cx, name); let download_count = &model.download_count; self.label(id!(model_download_count.attr_value)) - .set_text(cx,&format!("{}", download_count)); + .set_text(cx, &format!("{}", download_count)); let like_count = &model.like_count; self.label(id!(model_like_count.attr_value)) - .set_text(cx,&format!("{}", like_count)); + .set_text(cx, &format!("{}", like_count)); let size = &model.size; - self.label(id!(model_size_tag.attr_value)).set_text(cx,size); + self.label(id!(model_size_tag.attr_value)).set_text(cx, size); let requires = &model.requires; self.label(id!(model_requires_tag.attr_value)) - .set_text(cx,requires); + .set_text(cx, requires); let architecture = &model.architecture; self.label(id!(model_architecture_tag.attr_value)) - .set_text(cx,architecture); + .set_text(cx, architecture); let summary = &model.summary; const MAX_SUMMARY_LENGTH: usize = 500; @@ -380,14 +380,14 @@ impl Widget for ModelCard { } else { summary.to_string() }; - self.label(id!(model_summary)).set_text(cx,&trimmed_summary); + self.label(id!(model_summary)).set_text(cx, &trimmed_summary); let author_name = &model.author.name; let author_url = &model.author.url; let mut author_external_link = self.external_link(id!(author_link)); author_external_link .link_label(id!(link)) - .set_text(cx,author_name); + .set_text(cx, author_name); author_external_link.set_url(author_url); let model_hugging_face_url = hugging_face_model_url(&model.model_id); @@ -396,11 +396,11 @@ impl Widget for ModelCard { let author_description = &model.author.description; self.label(id!(author_description)) - .set_text(cx,author_description); + .set_text(cx, author_description); let released_at_str = formatted_model_release_date(&model); self.label(id!(model_released_at_tag.attr_value)) - .set_text(cx,&released_at_str); + .set_text(cx, &released_at_str); self.view.draw_walk(cx, scope, walk) } @@ -444,10 +444,10 @@ impl Widget for ModelCardViewAllModal { let model = &scope.data.get::().unwrap(); let name = &model.name; - self.label(id!(view_all_model_name)).set_text(cx,name); + self.label(id!(view_all_model_name)).set_text(cx, name); let summary = &model.summary; - self.label(id!(view_all_model_summary)).set_text(cx,summary); + self.label(id!(view_all_model_summary)).set_text(cx, summary); self.view .draw_walk(cx, scope, walk.with_abs_pos(DVec2 { x: 0., y: 0. })) diff --git a/src/landing/model_files.rs b/src/landing/model_files.rs index ff9e8b2d..9531f9cf 100644 --- a/src/landing/model_files.rs +++ b/src/landing/model_files.rs @@ -208,10 +208,10 @@ impl Widget for ModelFiles { let featured_count = model.files.iter().filter(|f| f.file.featured).count(); let show_all_button = self.radio_button(id!(tab_buttons.show_all_button)); - show_all_button.set_text(cx,&format!("All Files ({})", files_count)); + show_all_button.set_text(cx, &format!("All Files ({})", files_count)); let show_all_button = self.radio_button(id!(tab_buttons.only_recommended_button)); - show_all_button.set_text(cx,&format!("Only Recommended Files ({})", featured_count)); + show_all_button.set_text(cx, &format!("Only Recommended Files ({})", featured_count)); let _ = self.view.draw_walk(cx, scope, walk); diff --git a/src/landing/model_list.rs b/src/landing/model_list.rs index 5102f59e..26b2fcc8 100644 --- a/src/landing/model_list.rs +++ b/src/landing/model_list.rs @@ -211,7 +211,7 @@ impl Widget for ModelList { match items[item_id] { Item::Header(text) => { let item = list.item(cx, item_id, live_id!(Header)); - item.set_text(cx,text); + item.set_text(cx, text); item.draw_all(cx, &mut Scope::empty()); } Item::AgentRow { @@ -249,7 +249,7 @@ impl Widget for ModelList { } Item::NoAgentsWarning(text) => { let item = list.item(cx, item_id, live_id!(NoAgentsWarning)); - item.set_text(cx,text); + item.set_text(cx, text); item.draw_all(cx, &mut Scope::empty()); } Item::Model(model) => { diff --git a/src/my_models/delete_model_modal.rs b/src/my_models/delete_model_modal.rs index 9810f155..d2d2171a 100644 --- a/src/my_models/delete_model_modal.rs +++ b/src/my_models/delete_model_modal.rs @@ -165,7 +165,7 @@ impl Widget for DeleteModelModal { downloaded_file.file.name ); self.label(id!(wrapper.body.delete_prompt)) - .set_text(cx,&prompt_text); + .set_text(cx, &prompt_text); self.view .draw_walk(cx, scope, walk.with_abs_pos(DVec2 { x: 0., y: 0. })) diff --git a/src/my_models/downloaded_files_row.rs b/src/my_models/downloaded_files_row.rs index 336e8f19..28fc2740 100644 --- a/src/my_models/downloaded_files_row.rs +++ b/src/my_models/downloaded_files_row.rs @@ -209,7 +209,7 @@ impl Widget for DownloadedFilesRow { // Name tag let name = human_readable_name(&downloaded_file.file.name); self.label(id!(h_wrapper.model_file.h_wrapper.name_tag.name)) - .set_text(cx,&name); + .set_text(cx, &name); // Base model tag let base_model = dash_if_empty(&downloaded_file.model.architecture); @@ -218,7 +218,7 @@ impl Widget for DownloadedFilesRow { .base_model_tag .base_model .attr_name)) - .set_text(cx,&base_model); + .set_text(cx, &base_model); // Parameters tag let parameters = dash_if_empty(&downloaded_file.model.size); @@ -227,7 +227,7 @@ impl Widget for DownloadedFilesRow { .parameters_tag .parameters .attr_name)) - .set_text(cx,¶meters); + .set_text(cx, ¶meters); // Version tag let filename = format!( @@ -235,17 +235,17 @@ impl Widget for DownloadedFilesRow { downloaded_file.model.name, downloaded_file.file.name ); self.label(id!(h_wrapper.model_file.model_version_tag.version)) - .set_text(cx,&filename); + .set_text(cx, &filename); // File size tag let file_size = format_model_size(&downloaded_file.file.size).unwrap_or("-".to_string()); self.label(id!(h_wrapper.file_size_tag.label)) - .set_text(cx,&file_size); + .set_text(cx, &file_size); // Added date tag let formatted_date = downloaded_file.downloaded_at.format("%d/%m/%Y").to_string(); self.label(id!(h_wrapper.date_added_tag.label)) - .set_text(cx,&formatted_date); + .set_text(cx, &formatted_date); self.view.draw_walk(cx, scope, walk) } diff --git a/src/my_models/model_info_modal.rs b/src/my_models/model_info_modal.rs index e42bd345..6ee228f0 100644 --- a/src/my_models/model_info_modal.rs +++ b/src/my_models/model_info_modal.rs @@ -191,12 +191,12 @@ impl Widget for ModelInfoModal { // filename self.label(id!(title.filename)) - .set_text(cx,&downloaded_file.file.name); + .set_text(cx, &downloaded_file.file.name); // file path if let Some(path) = &downloaded_file.file.downloaded_path { self.html(id!(file_dir.path)) - .set_text(cx,&format!("
{}
", path)); + .set_text(cx, &format!("
{}
", path)); } else { self.view(id!(file_dir)).set_visible(cx, false); } @@ -206,7 +206,7 @@ impl Widget for ModelInfoModal { .expect("Could not serialize model data into json"); let metadata = format!("
{}
", self.stringified_model_data); - self.html(id!(wrapper.body.metadata)).set_text(cx,&metadata); + self.html(id!(wrapper.body.metadata)).set_text(cx, &metadata); self.view .draw_walk(cx, scope, walk.with_abs_pos(DVec2 { x: 0., y: 0. })) diff --git a/src/my_models/my_models_screen.rs b/src/my_models/my_models_screen.rs index 36232928..fbd334df 100644 --- a/src/my_models/my_models_screen.rs +++ b/src/my_models/my_models_screen.rs @@ -195,11 +195,11 @@ impl Widget for MyModelsScreen { let summary = generate_models_summary(&downloaded_files); let models_summary_label = self.view.label(id!(header.models_summary)); - models_summary_label.set_text(cx,&summary); + models_summary_label.set_text(cx, &summary); self.view .button(id!(show_in_files)) - .set_text(cx,&file_manager_label()); + .set_text(cx, &file_manager_label()); self.view.draw_walk(cx, scope, walk) } diff --git a/src/settings/delete_server_modal.rs b/src/settings/delete_server_modal.rs index ecc30da5..95a1bcfe 100644 --- a/src/settings/delete_server_modal.rs +++ b/src/settings/delete_server_modal.rs @@ -165,7 +165,7 @@ impl Widget for DeleteServerModal { self.server_address ); - self.label(id!(delete_prompt)).set_text(cx,&prompt_text); + self.label(id!(delete_prompt)).set_text(cx, &prompt_text); self.view .draw_walk(cx, scope, walk.with_abs_pos(DVec2 { x: 0., y: 0. })) diff --git a/src/settings/mofa_settings.rs b/src/settings/mofa_settings.rs index 700960b5..221fc88b 100644 --- a/src/settings/mofa_settings.rs +++ b/src/settings/mofa_settings.rs @@ -302,7 +302,7 @@ impl WidgetMatchEvent for MofaServers { let add_server_input = self.view.text_input(id!(add_server_input)); if let Some(address) = add_server_input.returned(actions) { store.chats.register_mofa_server(address); - add_server_input.set_text(cx,""); + add_server_input.set_text(cx, ""); self.redraw(cx); } @@ -331,7 +331,7 @@ impl Widget for MofaServerItem { self.update_connection_status(cx, &server.connection_status); self.label(id!(address_editable.mofa_address_label)) - .set_text(cx,&server.client.address); + .set_text(cx, &server.client.address); if server.is_local() { self.view.view(id!(icon_local)).set_visible(cx, true); diff --git a/src/settings/settings_screen.rs b/src/settings/settings_screen.rs index 1407ada1..c56272bc 100644 --- a/src/settings/settings_screen.rs +++ b/src/settings/settings_screen.rs @@ -250,9 +250,9 @@ impl Widget for SettingsScreen { self.view .label(id!(port_number_label)) - .set_text(cx,&format!("{}", port)); + .set_text(cx, &format!("{}", port)); - self.view.code_view(id!(code_snippet)).set_text(cx,&format!( + self.view.code_view(id!(code_snippet)).set_text(cx, &format!( "# Load a model and run this example in your terminal # Choose between streaming and non-streaming mode by setting the \"stream\" field @@ -308,7 +308,7 @@ impl WidgetMatchEvent for SettingsScreen { let port = self.label(id!(port_number_label)).text(); port_number_input.set_key_focus(cx); - port_number_input.set_text(cx,&port); + port_number_input.set_text(cx, &port); self.redraw(cx); } diff --git a/src/shared/download_notification_popup.rs b/src/shared/download_notification_popup.rs index 003d7fda..dd0c716c 100644 --- a/src/shared/download_notification_popup.rs +++ b/src/shared/download_notification_popup.rs @@ -292,10 +292,10 @@ impl DownloadNotificationPopup { self.view(id!(failure_actions)).set_visible(cx, false); self.label(id!(title)) - .set_text(cx,"Model Downloaded Successfully"); + .set_text(cx, "Model Downloaded Successfully"); self.label(id!(summary)) - .set_text(cx,&(format!("{} successfuly downloaded.", &self.filename))); + .set_text(cx, &(format!("{} successfuly downloaded.", &self.filename))); } fn show_failure_content(&mut self, cx: &mut Cx) { @@ -306,7 +306,7 @@ impl DownloadNotificationPopup { self.view(id!(failure_actions)).set_visible(cx, true); self.label(id!(title)) - .set_text(cx,"Errors while downloading models"); + .set_text(cx, "Errors while downloading models"); self.label(id!(summary)).set_text(cx, &(format!( @@ -326,19 +326,19 @@ impl DownloadNotificationPopup { self.view(id!(failure_actions)).set_visible(cx, false); self.label(id!(title)) - .set_text(cx,"Retry"); + .set_text(cx, "Retry"); match self.count { 0 => { - content.set_text(cx,"Download interrupted. Will resume in 15 seconds."); + content.set_text(cx, "Download interrupted. Will resume in 15 seconds."); self.count += 1; }, 1 => { - content.set_text(cx,"Download interrupted. Will resume in 30 seconds."); + content.set_text(cx, "Download interrupted. Will resume in 30 seconds."); self.count += 1; }, 2 => { - content.set_text(cx,"Download interrupted. Will resume in 60 seconds."); + content.set_text(cx, "Download interrupted. Will resume in 60 seconds."); self.count += 1; }, _ => { diff --git a/src/shared/tooltip.rs b/src/shared/tooltip.rs index 5efecf0d..1bf66003 100644 --- a/src/shared/tooltip.rs +++ b/src/shared/tooltip.rs @@ -97,7 +97,7 @@ impl Widget for Tooltip { } fn set_text(&mut self, cx: &mut Cx, text: &str) { - self.label(id!(tooltip_label)).set_text(cx,text); + self.label(id!(tooltip_label)).set_text(cx, text); } } @@ -117,7 +117,7 @@ impl Tooltip { } pub fn show_with_options(&mut self, cx: &mut Cx, pos: DVec2, text: &str) { - self.set_text(cx,text); + self.set_text(cx, text); self.set_pos(cx, pos); self.show(cx); } @@ -131,7 +131,7 @@ impl Tooltip { impl TooltipRef { pub fn set_text(&mut self, cx: &mut Cx, text: &str) { if let Some(mut inner) = self.borrow_mut() { - inner.set_text(cx,text); + inner.set_text(cx, text); } }