Skip to content

Commit f04c91f

Browse files
committed
Adjust text decoration warning
1 parent e882782 commit f04c91f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/elements/text_decoration.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
22
component_wise::ComponentWise,
3-
render_util::{draw_text_bg, enum_combo},
3+
render_util::{draw_text_bg, enum_combo, helper_warn},
44
};
55
use nexus::imgui::{ComboBoxFlags, Ui};
66
use serde::{Deserialize, Serialize};
@@ -77,8 +77,10 @@ impl TextDecoration {
7777

7878
pub fn render_select(&mut self, ui: &Ui) {
7979
enum_combo(ui, "Decoration", self, ComboBoxFlags::empty());
80-
if ui.is_item_hovered() {
81-
ui.tooltip_text("Warning: many text decorations may negatively impact performance");
80+
if *self != Self::None {
81+
helper_warn(ui, || {
82+
ui.text("Warning: many text decorations may negatively impact performance")
83+
});
8284
}
8385
}
8486
}

0 commit comments

Comments
 (0)