void Viewport::setScene(Scene *scene) { m_scene = scene; scene->setParentItem(this); setContentWidth(scene->width()); setContentHeight(scene->height()); setVisible(true); updateMaxOffsets(); }
void LineBox::handleLayout(LayoutEngine& eng, const Dimensions& containing) { calculateHorzMPB(containing.content_.width); calculateVertMPB(containing.content_.height); int child_height = 0; FixedPoint width = 0; for(auto& child : getChildren()) { if(!child->isFloat()) { //child_height += child->getMBPHeight() + child->getHeight(); child_height = std::max(child_height, child->getTop() + child->getMBPBottom() + child->getHeight()); width = std::max(width, child->getLeft() + child->getWidth() + child->getMBPWidth()); } } setContentHeight(child_height); setContentWidth(width); }
void HexView::recalcHeight() { setContentHeight( (1 + rowCount() ) * rowHeight() ); }
void Windowiki::setContentSize(int width, int height) { setContentWidth(width); setContentHeight(height); }