diff options
| author | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 03:20:53 +0500 |
|---|---|---|
| committer | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 03:20:53 +0500 |
| commit | ddba971ebb304512ba9e0a01b77ec71b59b977b6 (patch) | |
| tree | 7e681b80b442ec86f19a3e19aa42770198946d35 /fluid/widgets | |
| parent | c19f34db2f4a64326d03cee7edae095051660f65 (diff) | |
wip
Diffstat (limited to 'fluid/widgets')
| -rw-r--r-- | fluid/widgets/Node_Browser.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fluid/widgets/Node_Browser.cxx b/fluid/widgets/Node_Browser.cxx index cf036f9b7..3343d6772 100644 --- a/fluid/widgets/Node_Browser.cxx +++ b/fluid/widgets/Node_Browser.cxx @@ -393,28 +393,28 @@ void Node_Browser::item_draw(void *v, int X, int Y, int, int) const { // Indent=12 per level: Now write the text that comes after the graphics representation Y += comment_incr; if (l->is_widget() || l->is_class()) { - std::string c = subclassname(l); - if (c.compare(0, 3, "Fl_")==0) c.erase(0, 3); + const char *c = subclassname(l); + if (c && strncmp(c, "Fl_", 3)==0) c += 3; // -- class fl_font(class_font, textsize()); if (l->new_selected) fl_color(fl_contrast(class_color, FL_SELECTION_COLOR)); else fl_color(class_color); - fl_draw(c.c_str(), X, Y+13); - X += int(fl_width(c.c_str())+fl_width('n')); + fl_draw(c, X, Y+13); + X += int(fl_width(c)+fl_width('n')); c = l->name() ? l->name() : ""; - if (!c.empty()) { + if (c && c[0]) { // -- name fl_font(name_font, textsize()); if (l->new_selected) fl_color(fl_contrast(name_color, FL_SELECTION_COLOR)); else fl_color(name_color); - fl_draw(c.c_str(), X, Y+13); + fl_draw(c, X, Y+13); } else if (l->label()) { // -- label c = l->label(); fl_font(label_font, textsize()); if (l->new_selected) fl_color(fl_contrast(label_color, FL_SELECTION_COLOR)); else fl_color(label_color); - copy_trunc(buf, c.c_str(), 32, 1, 0); // quoted string + copy_trunc(buf, c, 32, 1, 0); // quoted string fl_draw(buf, X, Y+13); } } else { |
