diff --git a/source/layout/boxview.cpp b/source/layout/boxview.cpp index 271427d..594e4cd 100644 --- a/source/layout/boxview.cpp +++ b/source/layout/boxview.cpp @@ -22,14 +22,14 @@ bool BoxView::isPrintMedia() const float BoxView::availableWidth() const { if(m_currentPage) - return m_currentPage->width(); + return m_currentPage->width() - m_currentPage->marginWidth(); return document()->viewportWidth(); } std::optional BoxView::availableHeight() const { if(m_currentPage) - return m_currentPage->height(); + return m_currentPage->height() - m_currentPage->marginHeight(); return document()->viewportHeight(); } diff --git a/source/layout/multicolumnbox.cpp b/source/layout/multicolumnbox.cpp index acdd70a..c4797e0 100644 --- a/source/layout/multicolumnbox.cpp +++ b/source/layout/multicolumnbox.cpp @@ -21,7 +21,9 @@ MultiColumnRowBox* MultiColumnRowBox::create(MultiColumnFlowBox* columnFlow, con void MultiColumnRowBox::updateOverflowRect() { BoxFrame::updateOverflowRect(); - addOverflowRect(columnRectAt(numberOfColumns() - 1)); + auto columnRect = columnRectAt(numberOfColumns() - 1); + auto overflowRect = m_columnFlowBox->visualOverflowRect().moved(columnRect.origin()); + addOverflowRect(columnRect.y, columnRect.bottom(), overflowRect.x, overflowRect.right()); } MultiColumnRowBox::MultiColumnRowBox(MultiColumnFlowBox* columnFlow, const RefPtr& style)