Relay Lists: Further narrow the search field

This commit is contained in:
Bu5hm4nn 2024-09-23 19:47:26 -04:00
parent 3e49b69d65
commit 16fe93d606
4 changed files with 4 additions and 3 deletions

View File

@ -23,7 +23,7 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
super::relay_sort_combo(app, ui); super::relay_sort_combo(app, ui);
btn_h_space!(ui); btn_h_space!(ui);
widgets::TextEdit::search(&app.theme, &app.assets, &mut app.relays.search) widgets::TextEdit::search(&app.theme, &app.assets, &mut app.relays.search)
.desired_width(150.0) .desired_width(super::SEARCH_WIDTH)
.show(ui); .show(ui);
if widgets::Button::primary(&app.theme, "Add Relay") if widgets::Button::primary(&app.theme, "Add Relay")
.show(ui) .show(ui)

View File

@ -19,7 +19,7 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
super::relay_sort_combo(app, ui); super::relay_sort_combo(app, ui);
btn_h_space!(ui); btn_h_space!(ui);
widgets::TextEdit::search(&app.theme, &app.assets, &mut app.relays.search) widgets::TextEdit::search(&app.theme, &app.assets, &mut app.relays.search)
.desired_width(150.0) .desired_width(super::SEARCH_WIDTH)
.show(ui); .show(ui);
if widgets::Button::primary(&app.theme, "Add Relay") if widgets::Button::primary(&app.theme, "Add Relay")
.show(ui) .show(ui)

View File

@ -19,7 +19,7 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
super::relay_sort_combo(app, ui); super::relay_sort_combo(app, ui);
btn_h_space!(ui); btn_h_space!(ui);
widgets::TextEdit::search(&app.theme, &app.assets, &mut app.relays.search) widgets::TextEdit::search(&app.theme, &app.assets, &mut app.relays.search)
.desired_width(150.0) .desired_width(super::SEARCH_WIDTH)
.show(ui); .show(ui);
if widgets::Button::primary(&app.theme, "Add Relay") if widgets::Button::primary(&app.theme, "Add Relay")
.show(ui) .show(ui)

View File

@ -15,6 +15,7 @@ mod coverage;
mod known; mod known;
mod mine; mod mine;
pub const SEARCH_WIDTH: f32 = 80.0;
pub const RELAY_URL_PREPOPULATE: &str = "wss://"; pub const RELAY_URL_PREPOPULATE: &str = "wss://";
pub(super) struct RelayUi { pub(super) struct RelayUi {