| 277 | } |
| 278 | |
| 279 | RectI ScrollArea::contentBoundRect() const { |
| 280 | RectI res = RectI::null(); |
| 281 | for (auto child : m_members) { |
| 282 | if (child == m_vBar || child == m_hBar) // scroll bars don't count |
| 283 | continue; |
| 284 | if (!child->active()) // neither do hidden members |
| 285 | continue; |
| 286 | res.combine(child->relativeBoundRect()); |
| 287 | } |
| 288 | res.setMax({res.max()[0], res.max()[1] + 1}); |
| 289 | return res; |
| 290 | } |
| 291 | |
| 292 | Vec2I ScrollArea::contentSize() const { |
| 293 | return contentBoundRect().size(); |
nothing calls this directly
no test coverage detected