]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/list.cpp
Rename some get functions as find because they can return null
[libs/gltk.git] / source / list.cpp
index e0d2bd81c150d62918bedd77b7eebe3b1537baac..963b442775f982840f27b6d796437f02227e9fac 100644 (file)
@@ -330,7 +330,7 @@ bool List::navigate(Navigation nav)
 
 void List::on_style_change()
 {
-       items_part = (style ? style->get_part("items") : nullptr);
+       items_part = (style ? style->find_part("items") : nullptr);
 }
 
 void List::move_focus(Navigation nav, bool select)
@@ -615,7 +615,7 @@ void List::SimpleItem::on_style_change()
 
        Widget *child = children.front()->widget;
        child->autosize();
-       if(const Part *part = style->get_part("children"))
+       if(const Part *part = style->find_part("children"))
        {
                const Sides &margin = part->get_margin();
                child->set_position(margin.left, margin.bottom);
@@ -644,7 +644,7 @@ void List::MultiColumnItem::set_widths(const vector<unsigned> &widths)
        if(!style)
                return;
 
-       const Part *part = style->get_part("children");
+       const Part *part = style->find_part("children");
        if(!part)
                return;