-
Notifications
You must be signed in to change notification settings - Fork 2k
egui egui::TextEdit::singleline long text will make ui.horizontal invalid #5597
Copy link
Copy link
Closed
Labels
bugSomething is brokenSomething is broken
Description
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The width of singleline has not changed. Horizontal should use the width of singleline instead of the length of the text.
Screenshots
Desktop (please complete the following information):
- OS: win11
- Browser
- Version
Smartphone (please complete the following information):
- Device:
- OS:
- Browser
- Version
Additional context
cargo --version
cargo 1.84.0 (66221abde 2024-11-19)[dependencies]
eframe = { version = "0.30.0", default-features = false, features = ["accesskit", "glow", "persistence"]}
egui_extras = { version = "0.30", features = ["image"] }ui.horizontal(|ui| {
egui::TextEdit::singleline(&mut httpConfig.name)
.desired_width(100.0)
.show(ui);
egui::ComboBox::from_id_source("method")
.selected_text(httpConfig.req_cfg.method.as_ref())
.show_ui(ui, |ui| {
for m in &METHODS {
ui.selectable_value(
&mut httpConfig.req_cfg.method,
m.to_owned(),
m.as_ref(),
);
}
});
ui.add(
egui::TextEdit::singleline(&mut httpConfig.req_cfg.url)
.desired_width(300.)
.hint_text("http url"),
);
ui.add(
egui::TextEdit::singleline(&mut httpConfig.send_count_ui)
.desired_width(60.)
.hint_text("Count"),
);
if ui
.add_enabled(!httpConfig.req_cfg.url.is_empty(), egui::Button::new("Send"))
.clicked()
{
}
ui.separator();
// request result count
let (s, e, r) = httpConfig.get_request_reper();
ui.label(format!("s:{s}, e:{e}, r:{r}"));
ui.separator();
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething is brokenSomething is broken
