Another "paper cuts" weekend #156
graemeg
announced in
Announcements
Replies: 1 comment
-
|
Great job Graeme! Thank you very much for the "select and copy" feature. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I like to call small and annoying bugs "paper cuts". I
collected a few and this weekend was time I got rid
of them - and then some!
Below is an update of recent changes in
developbranch. Some very nice rendering fixes, new
features in DocView, plenty of bug fixes in DocView etc.
fpGUI Development Summary
Commits 6d7d22d..3e9e24b (30 commits)
Overview
16 bug fixes
1 new feature
3 documentation updates
4 docview application improvements
3 refactoring / cleanup changes
2 rendering pipeline improvements
1 layout manager fix
Bug Fixes
Docview rendering stopped prematurely leaving a blank area
at the bottom. DrawRichTextLayout was using Widget.Height
(preferred/intent size) instead of Widget.ActualHeight
(real rendered size) to determine when to stop rendering
lines.
4-bit BMP decoder: fixed row stride calculation for
odd-width images. When width mod 8 == 1 (e.g. 9, 17, 25),
the row padding was 4 bytes too short, causing diagonal
shearing of OS/2 bitmap images displayed in docview.
RichTextView CopyPlainTextToBuffer: output buffer was not
null-terminated after stripping formatting tags, causing
clipboard paste to include raw tag text such as
from uninitialised memory.
RichTextView scroll-to-top on click: MakeRowAndColumnVisible
was being called for mouse clicks, scrolling the view
unexpectedly. Mouse clicks target an already-visible
position, so the scroll-into-view logic is now skipped for
mouse-initiated cursor positioning.
Scrollbar thumb not updating when position set
programmatically. SetSBPosition now sets FRecalc before
Invalidate, and RichTextView.Clear resets all scroll state
so topic changes start from the top.
Rich text content rendering over widget border during
scrolling. Restored the border inset in GetTextAreaRect,
matched to each BorderStyle.
Treeview node text vertical centering on X11 canvas.
Changed from GetAscent/2 to (GetAscent + GetDescent)/2
for consistent centering across backends.
AggCanvas GetHeight now returns ascent + descent (excluding
FreeType line-leading) for consistency with the X11 backend.
Treeview node layout: improved expand/collapse box rendering
to prevent connector lines showing through, better row
spacing, and corrected text centering.
Always repaint all virtual children to keep the shared
off-screen buffer complete in the alien-windows model.
The old partial-child-repaint optimisation left areas as
plain background after content-change paint cycles.
Blit full buffer to screen after repainting all virtual
children. Only blitting the dirty rect caused regions
outside it to show stale content.
Access violation fix due to render pipeline changes.
Layout manager: no longer reduces developer-set
MinWidth/MinHeight values. Only increases them when the
layout's computed minimum exceeds the current value.
MigLayout Grow shortcut was missing SetGrowWeight calls on
both axes, causing widgets using .Grow to receive no extra
space during layout.
MigLayout PushX/PushY column growth: GetDefaultGrowWeights
was reading component grow weights instead of push weights,
preventing column-level growth from working.
Docview: fixed missing encoding combobox after toolbar
migration to MigLayout.
New Feature
now click and drag to select text in help topics, then copy
to the clipboard via Ctrl+C, Ctrl+Insert, Ctrl+A (select
all), or the right-click context menu. The underlying
CopyPlainTextToBuffer was rewritten for UTF-8 support, and
SetSelectionEndInternal/ClearSelection were fixed to use
Repaint instead of direct Canvas access which caused access
violations.
Documentation
Updated virtual_window_architecture document for current
paint and font models.
Clarified GrowX vs PushX distinction in MigLayout quick
start guide with code examples.
Fixed asciidoc rendering warnings.
Rendering Pipeline
Optimised rendering pipeline for the alien-windows
(single OS window handle) model, replacing old per-widget
OS window code with efficient in-memory buffer operations.
Removed FInvalidRect dead code from TfpgWidget, as all
virtual children are now unconditionally repainted.
Docview Application
Revised toolbar layout after PushX support was implemented.
More sensible minimum window sizes for better UX.
Removed unnecessary property settings (were defaults).
Removed ProfileEvent debug output calls.
Regards,
Beta Was this translation helpful? Give feedback.
All reactions