fix: remove false searchbar placeholders
This commit is contained in:
parent
a345091d4f
commit
19f577c0ea
10 changed files with 33 additions and 32 deletions
|
|
@ -113,7 +113,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn context_drawer(&self) -> Option<ContextDrawer<'_, crate::pages::Message>> {
|
||||
match &self.context {
|
||||
Some(Context::AddApplication(directory_type)) => {
|
||||
let search = widget::search_input(fl!("type-to-search"), &self.application_search)
|
||||
let search = widget::search_input("", &self.application_search)
|
||||
.on_input(|i| Message::ApplicationSearch(i).into())
|
||||
.on_clear(Message::ApplicationSearch(String::new()).into())
|
||||
.apply(Element::from);
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ impl Model {
|
|||
}
|
||||
|
||||
pub fn search_input(&self) -> Element<'_, crate::pages::Message> {
|
||||
widget::search_input(fl!("type-to-search"), &self.font_search)
|
||||
widget::search_input("", &self.font_search)
|
||||
.on_input(|input| Message::DrawerFont(drawer::FontMessage::Search(input)))
|
||||
.on_clear(Message::DrawerFont(drawer::FontMessage::Search(
|
||||
String::new(),
|
||||
|
|
|
|||
|
|
@ -598,17 +598,18 @@ impl Page {
|
|||
});
|
||||
|
||||
if let Some(dock_config_helper) = dock_config_helper.as_ref()
|
||||
&& let Some(dock_config) = dock_config.as_mut() {
|
||||
let padding = match roundness {
|
||||
Roundness::Round => 4,
|
||||
Roundness::SlightlyRound => 4,
|
||||
Roundness::Square => 0,
|
||||
};
|
||||
&& let Some(dock_config) = dock_config.as_mut()
|
||||
{
|
||||
let padding = match roundness {
|
||||
Roundness::Round => 4,
|
||||
Roundness::SlightlyRound => 4,
|
||||
Roundness::Square => 0,
|
||||
};
|
||||
|
||||
if let Err(why) = dock_config.set_padding(dock_config_helper, padding) {
|
||||
tracing::error!(?why, "Error updating dock padding");
|
||||
}
|
||||
if let Err(why) = dock_config.set_padding(dock_config_helper, padding) {
|
||||
tracing::error!(?why, "Error updating dock padding");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: cache panel and dock configs so that they needn't be re-read
|
||||
|
|
|
|||
|
|
@ -556,13 +556,14 @@ impl Page {
|
|||
}
|
||||
|
||||
if let Some(v) = self.mirror_map.get(k)
|
||||
&& v.equivalent(&self.active_display) {
|
||||
if let Some(output) = self.list.outputs.get(k) {
|
||||
return self.exec_randr(output, Randr::Toggle(true));
|
||||
} else {
|
||||
return Task::none();
|
||||
}
|
||||
&& v.equivalent(&self.active_display)
|
||||
{
|
||||
if let Some(output) = self.list.outputs.get(k) {
|
||||
return self.exec_randr(output, Randr::Toggle(true));
|
||||
} else {
|
||||
return Task::none();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Task::none();
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn context_drawer(&self) -> Option<ContextDrawer<'_, crate::pages::Message>> {
|
||||
self.context.as_ref().map(|context| match context {
|
||||
Context::ShowInputSourcesContext => {
|
||||
let search = widget::search_input(fl!("type-to-search"), &self.input_source_search)
|
||||
let search = widget::search_input("", &self.input_source_search)
|
||||
.on_input(Message::InputSourceSearch)
|
||||
.on_clear(Message::InputSourceSearch(String::new()))
|
||||
.apply(Element::from)
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ fn shortcuts() -> Section<crate::pages::Message> {
|
|||
.view::<Page>(move |_binder, page, section| {
|
||||
let descriptions = §ion.descriptions;
|
||||
|
||||
let search = widget::search_input(fl!("type-to-search"), &page.search.input)
|
||||
let search = widget::search_input("", &page.search.input)
|
||||
.width(314)
|
||||
.on_clear(Message::Search(String::new()))
|
||||
.on_input(Message::Search)
|
||||
|
|
|
|||
|
|
@ -651,10 +651,7 @@ impl Page {
|
|||
"username".to_string(),
|
||||
username.clone().unwrap_or_default().into(),
|
||||
),
|
||||
(
|
||||
"password".to_string(),
|
||||
password.clone(),
|
||||
),
|
||||
("password".to_string(), password.clone()),
|
||||
]),
|
||||
applied_tx,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -217,18 +217,20 @@ impl Page {
|
|||
self.amplification_sink = enabled;
|
||||
|
||||
if let Some(config) = &self.sound_config
|
||||
&& let Err(why) = config.set(AMPLIFICATION_SINK, enabled) {
|
||||
tracing::error!(?why, "Failed to save over amplification setting");
|
||||
}
|
||||
&& let Err(why) = config.set(AMPLIFICATION_SINK, enabled)
|
||||
{
|
||||
tracing::error!(?why, "Failed to save over amplification setting");
|
||||
}
|
||||
}
|
||||
|
||||
Message::ToggleOverAmplificationSource(enabled) => {
|
||||
self.amplification_source = enabled;
|
||||
|
||||
if let Some(config) = &self.sound_config
|
||||
&& let Err(why) = config.set(AMPLIFICATION_SOURCE, enabled) {
|
||||
tracing::error!(?why, "Failed to save over amplification setting");
|
||||
}
|
||||
&& let Err(why) = config.set(AMPLIFICATION_SOURCE, enabled)
|
||||
{
|
||||
tracing::error!(?why, "Failed to save over amplification setting");
|
||||
}
|
||||
}
|
||||
|
||||
Message::SetProfile(object_id, index) => {
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
|
||||
fn context_drawer(&self) -> Option<ContextDrawer<'_, crate::pages::Message>> {
|
||||
if self.timezone_context {
|
||||
let search = widget::search_input(fl!("type-to-search"), &self.timezone_search)
|
||||
let search = widget::search_input("", &self.timezone_search)
|
||||
.on_input(Message::TimezoneSearch)
|
||||
.on_clear(Message::TimezoneSearch(String::new()))
|
||||
.apply(Element::from)
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn context_drawer(&self) -> Option<ContextDrawer<'_, crate::pages::Message>> {
|
||||
Some(match self.context.as_ref()? {
|
||||
ContextView::AddLanguage => {
|
||||
let search = widget::search_input(fl!("type-to-search"), &self.add_language_search)
|
||||
let search = widget::search_input("", &self.add_language_search)
|
||||
.on_input(Message::AddLanguageSearch)
|
||||
.on_clear(Message::AddLanguageSearch(String::new()))
|
||||
.apply(Element::from)
|
||||
|
|
@ -183,7 +183,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
.footer(install_additional_button)
|
||||
}
|
||||
ContextView::Region => {
|
||||
let search = widget::search_input(fl!("type-to-search"), &self.add_language_search)
|
||||
let search = widget::search_input("", &self.add_language_search)
|
||||
.on_input(Message::AddLanguageSearch)
|
||||
.on_clear(Message::AddLanguageSearch(String::new()))
|
||||
.apply(Element::from)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue