fix settings window
This commit is contained in:
parent
79782d84b1
commit
6eee88bb05
@ -36,6 +36,7 @@ impl FunctionManager {
|
||||
.fonts()
|
||||
.row_height(&egui::FontSelection::default().resolve(ui.style()));
|
||||
|
||||
let available_width = ui.available_width();
|
||||
let mut remove_i: Option<usize> = None;
|
||||
for (i, (uuid, function)) in self.functions.iter_mut().enumerate() {
|
||||
// render cool input box
|
||||
@ -50,7 +51,7 @@ impl FunctionManager {
|
||||
let te_id = ui.make_persistent_id(uuid);
|
||||
|
||||
// target size of text edit box
|
||||
let target_size = vec2(ui.available_width(), {
|
||||
let target_size = vec2(available_width, {
|
||||
// get the animated bool that stores how "in focus" the text box is
|
||||
let gotten_focus_value = {
|
||||
let ctx = ui.ctx();
|
||||
@ -78,10 +79,7 @@ impl FunctionManager {
|
||||
);
|
||||
|
||||
// if not fully open, return here as buttons cannot yet be displayed, therefore the user is inable to mark it for deletion
|
||||
if ui.ctx().animate_bool(te_id, re.has_focus()) < 1.0 {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ui.ctx().animate_bool(te_id, re.has_focus()) >= 1.0 {
|
||||
function.autocomplete.update_string(&new_string);
|
||||
|
||||
if !function.autocomplete.hint.is_none() {
|
||||
@ -179,7 +177,7 @@ impl FunctionManager {
|
||||
);
|
||||
|
||||
function.settings_opened.bitxor_assign(
|
||||
ui.add(button_area_button("⚙".to_owned()))
|
||||
ui.add(button_area_button("⚙"))
|
||||
.on_hover_text(match function.settings_opened {
|
||||
true => "Close Settings",
|
||||
false => "Open Settings",
|
||||
@ -189,6 +187,7 @@ impl FunctionManager {
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function.settings_window(ui.ctx());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user