Added
- Build rows whose first or last cells stay in place (#1364).
Window.ScrollWindowbuilds the part of a row that scrolls sideways, and
ContainerCfg.ScrollExtentXandScrollExtentMintell the scroll container
how wide its content is and how narrow a row can be.TableandDataGrid
build their frozen and pinned columns with them, and an app can do the same
for a grid of its own. - Table: keep the row header and the first columns in place while the others
scroll sideways (#1363).TableCfg.FreezeColumnsis how many leading
columns stay in place: the left-most ones, or the right-most under RTL. It
counts data columns, and the row header stays with them.
TableCfg.FreezeRowHeaderkeeps the row header in place on its own. Both are
off by default and work with or withoutFreezeHeader. Scrolling cells are
cut off at the frozen edge, so a transparent table, a selected row or a
gradient behind it shows no text underneath. Without cell borders a 1px line
marks the edge. A table too narrow for its frozen columns scrolls them away
first, so every column can be reached. Seeexamples/table_freeze/. - Table row header: style the marker and let the app own the current row
(#1156).TableCfg.RowHeaderTextStylestyles the current-row marker and the
corner glyph. Left zero, they takeTextStyleandTextStyleHeadas before.
TableCfg.RowHeaderMarkerreplaces the default▶. The row header cell now
centres its glyph vertically, so a small marker sits mid-row when a large
TextStylesets the row height.TableCfg.CurrentRow(Opt[int]) sets the
row that shows the marker and wins over the row a click stored. An app whose
keyboard navigation lives outside the table can now move the marker without
writing internal table state.Some(-1), or an index outsideData, shows no
marker. It moves only the marker: a focusable table's active row and arrow-key
position do not change.
Changed
- Bump go-glyph v1.29.2 to v1.29.3 (#1367). When
TextStyle.CellWidthis
set, a fallback CJK ideograph is sized to fill exactly two cells (scale
clamped to 0.8×–1.3×). Other callers keep the cap-height fit. The public API
does not change. Tableallocates about a quarter less per frame (#1363). Its row and cell
lists come from the frame arena now. A table of 12 columns and a row header
with 48 visible rows went from 2267 to 1643 allocations per frame.- BREAKING: the horizontal scroll offset of an RTL
ColumnorStackcounts
from its right edge (#1345). It counted from the left edge. Now it works as
it already did for an RTLRow:ScrollHorizontalTo(id, 0)and
ScrollHorizontalToPct(id, 0)show the start of the content, a negative
offset moves toward the left, andScrollHorizontalOffsetand
ScrollHorizontalPctreport the same. LTR, aCanvasand a multilineInput
do not change. Migration: an app that scrolled an RTL column to its far end to
show the start should drop that call. An app that stored such an offset, or
computes one from the left edge, should count from the right edge: the new
offset is the most negative offset allowed, minus the old one.
Fixed
- DataGrid: a pinned column stays in place (#1364).
GridColumnCfg.Pinonly
moved a column to the front or the end of the row, and it scrolled away with
the others. A left-pinned column now stays at the start of the grid and a
right-pinned one at its end, in the header, the filter row, the frozen top
rows and the data rows. Under RTL the start is the right edge, and the arrows
of the pin button point the right way there. A group header stays in view, and
the row-delete button stays with the right-pinned columns. A grid too narrow
for its pinned columns scrolls them away first. The columns of a grid with no
pinned column, or with every column pinned, scroll as before. - DataGrid: the quick filter stays in place while the columns scroll sideways
(#1364). It was as wide as the columns and scrolled with them, so its match
count and Clear button were out of view until the end, and the search text was
out of view there. It is now as wide as the grid, in a grid without pinned
columns too. - DataGrid: the header is in line with its columns (#1364). Every header
cell sat 1px beside its column, because the rows had an invisible border of
their own. The rows now start 1px further left and up. - DataGrid: the horizontal scrollbar does not cover the last row (#1364).
The grid keeps a strip under its rows for the bar, asTabledoes since
#1293, so a grid that sizes to its rows is 12px taller with the stock
scrollbar. The End key and the arrow keys scroll by the height the rows are
really shown in.Scrollbar: ScrollbarHiddenkeeps no strip. - A touch drag on a slider or a splitter handle drags it inside a page that
scrolls on the same axis (#1226). Before, a touch pan along a horizontal
slider in a container that scrolls sideways scrolled the container, and the
thumb did not move. Only a tap set the value. Now a pan that runs more along
the control than across it goes to the control. A pan across it still scrolls,
so a list of horizontal sliders still scrolls up and down. This applies to the
stockSlider, aSliderwith aLook, and theSplitterhandle. iOS and
Android behave the same way. - Under RTL, a scroll container opens at the start of content wider than
itself (#1345). A right-to-leftColumnorStackpinned a child wider
than itself at its left edge, which under RTL is the end. A wideTableor
datagridopened at its last column, and a narrowTreehid its expand
arrows off screen. Now the child starts at the right edge and sticks out on
the left, as on a web page withdir="rtl", and the scrollbar thumb starts at
the right. ADragScrollpan in an RTL row moved against the pointer and now
follows it. Window.TestStepalso drives the recheck of SVG files (#1360). A
file-backed SVG is checked for edits at most every 500 ms. In a test on the
manual clock that interval ran on wall time, so what a test saw depended on
how fast the machine was. It now follows the window clock, as animations and
tooltip delays do. A test that edits an SVG file steps the clock past the
interval. A live window behaves as before.