[GH-ISSUE #380] RichTextCtrl header's and footer's zoom doesn't update #103

Open
opened 2026-05-05 03:40:18 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @litesoftwered on GitHub (Apr 15, 2026).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/380

calling Upp::RichTextCtrl::Pick(RichText&& txt, Zoom z) doesn't apply z on header and footer.

suggest:

// /uppsrc/RichText/TxtPaint.cpp
void RichTxt::ApplyZoom(Zoom z, const RichStyles& ostyle, const RichStyles& zstyle)
{
	for(int i = 0; i < GetPartCount(); i++)
		if(IsTable(i))
			part[i].Get<RichTable>().ApplyZoom(z, ostyle, zstyle);
		else {
			RichPara p = Get(i, ostyle);
			p.ApplyZoom(z);
			Set(i, p, zstyle);
		}
	
	// update header and footer zoom
	if (header) header->ApplyZoom(z);
	if (footer) footer->ApplyZoom(z);
}
Originally created by @litesoftwered on GitHub (Apr 15, 2026). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/380 calling Upp::RichTextCtrl::Pick(RichText&& txt, Zoom z) doesn't apply z on header and footer. suggest: ```c++ // /uppsrc/RichText/TxtPaint.cpp void RichTxt::ApplyZoom(Zoom z, const RichStyles& ostyle, const RichStyles& zstyle) { for(int i = 0; i < GetPartCount(); i++) if(IsTable(i)) part[i].Get<RichTable>().ApplyZoom(z, ostyle, zstyle); else { RichPara p = Get(i, ostyle); p.ApplyZoom(z); Set(i, p, zstyle); } // update header and footer zoom if (header) header->ApplyZoom(z); if (footer) footer->ApplyZoom(z); }
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#103
No description provided.