Exemplo n.º 1
0
void Viewport::setScene(Scene *scene)
{
    m_scene = scene;
    scene->setParentItem(this);
    setContentWidth(scene->width());
    setContentHeight(scene->height());
    setVisible(true);
    updateMaxOffsets();
}
Exemplo n.º 2
0
	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);
	}
Exemplo n.º 3
0
void HexView::recalcHeight()
{
    setContentHeight( (1 + rowCount() ) * rowHeight()  );
}
Exemplo n.º 4
0
void Windowiki::setContentSize(int width, int height)
{
    setContentWidth(width);
    setContentHeight(height);
}