mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 08:21:47 +00:00
cargo clippy (but I left some in unchanged code, and one that is due to temporary comment)
This commit is contained in:
parent
c3130f23f2
commit
5b5c929418
@ -88,6 +88,7 @@ pub fn switch_with_size_at(
|
||||
response
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn switch_custom_at(
|
||||
ui: &mut Ui,
|
||||
enabled: bool,
|
||||
|
@ -350,7 +350,7 @@ fn entry_dialog_step1(ui: &mut Ui, app: &mut GossipUi) {
|
||||
GLOBALS.status_queue.write().write( format!(
|
||||
"I asked the overlord to add relay {}. Check for it below.",
|
||||
&app.relays.new_relay_url
|
||||
).to_owned());
|
||||
));
|
||||
|
||||
// send user to known relays page (where the new entry should show up)
|
||||
app.set_page( Page::RelaysKnownNetwork );
|
||||
@ -439,7 +439,7 @@ pub(super) fn configure_list_btn(app: &mut GossipUi, ui: &mut Ui) {
|
||||
seen_on_popup_position.y += 18.0; // drop below the icon itself
|
||||
|
||||
let id: Id = "configure-list-menu".into();
|
||||
let mut frame = egui::Frame::popup(&ui.style());
|
||||
let mut frame = egui::Frame::popup(ui.style());
|
||||
let area = egui::Area::new(id)
|
||||
.movable(false)
|
||||
.interactable(true)
|
||||
|
@ -940,9 +940,7 @@ impl RelayEntry {
|
||||
let resp = ui.interact(rect, self.make_id("rank_sub"), Sense::click())
|
||||
.on_hover_cursor(CursorIcon::PointingHand);
|
||||
if resp.clicked() {
|
||||
if new_r > 0 {
|
||||
new_r -= 1;
|
||||
}
|
||||
new_r = new_r.saturating_sub(1)
|
||||
}
|
||||
let (fill, txt) = if resp.hovered() {
|
||||
(self.accent_hover, on_text)
|
||||
@ -973,7 +971,7 @@ impl RelayEntry {
|
||||
}
|
||||
let pos = pos+vec2(80.0,0.0);
|
||||
{
|
||||
ui.painter().text(pos, Align2::LEFT_TOP, "Relay-picker rank", font.clone(), txt_color);
|
||||
ui.painter().text(pos, Align2::LEFT_TOP, "Relay-picker rank", font, txt_color);
|
||||
}
|
||||
|
||||
if new_r != self.relay.rank {
|
||||
|
Loading…
Reference in New Issue
Block a user