Skip to content

Commit

Permalink
Update pagination algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
sammycage committed Dec 8, 2024
1 parent be05812 commit c938838
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions source/layout/fragmentbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ PageBuilder::PageBuilder(const Book* book)

float PageBuilder::applyFragmentBreakBefore(const BoxFrame* child, float offset)
{
return 0.f;
return offset;
}

float PageBuilder::applyFragmentBreakAfter(const BoxFrame* child, float offset)
{
return 0.f;
return offset;
}

float PageBuilder::applyFragmentBreakInside(const BoxFrame* child, float offset)
{
return 0.f;
return offset;
}

float PageBuilder::fragmentHeightForOffset(float offset) const
Expand Down
2 changes: 1 addition & 1 deletion source/plutobook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ Document* Book::layoutIfNeeded() const
{
auto document = buildIfNeeded();
if(document && m_needsLayout) {
if(m_mediaType != MediaType::Print) {
if(m_mediaType == MediaType::Print) {
PageBuilder builder(this);
document->layout(&builder);
} else {
Expand Down

0 comments on commit c938838

Please sign in to comment.