~whereswaldon/gio-x

6e5ccb80 — Dominik Honnef 15 days ago main
richtext: allow any value type in metadata

Users may want to associate complex metadata with spans, such as objects
that interactive spans refer to. Let users store them directly instead
of having to roundtrip through strings.

Performance wise, this makes storing string values more expensive,
because they have to be put in interface values. On the other hand,
users can now store pointer-typed values for "free". Additionally, if
users are concerned about performance, then they likely aren't
dynamically allocating strings and can use pointers to strings instead.

Signed-off-by: Dominik Honnef <dominik@honnef.co>
a0b26f7d — Dominik Honnef 25 days ago
richtext: add support for text alignment

Signed-off-by: Dominik Honnef <dominik@honnef.co>
richtext: add test for nil state

It should be valid to provide nil state for Text if no spans
are interactive.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
249e0ff7 — Dominik Honnef 25 days ago
richtext: don't require non-nil InteractiveText if there are no interactive spans

Signed-off-by: Dominik Honnef <dominik@honnef.co>
34c2fc95 — Dominik Honnef 29 days ago
outlay: undo transformations before returning from FlowWrap.Layout

Signed-off-by: Dominik Honnef <dominik@honnef.co>
dd943a72 — Dominik Honnef 30 days ago
outlay: allow grid cells to receive pointer events

Signed-off-by: Dominik Honnef <dominik@honnef.co>
outlay: add test for grid pointer events

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
markdown: bump default size

12 isn't readable on some low-dpi screens, at least not well.
Use a more reliably readable default size and allow applications
to override as needed.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
outlay: add test for grid sizing

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
43a7fd3a — Dominik Honnef 30 days ago
outlay: return actual size from Grid.Layout

Don't make the Grid as large as the Max constraint. Instead, make it at
least as large as the Min constraint, but otherwise limit it to the
height of the rows we actually drew.

Signed-off-by: Dominik Honnef <dominik@honnef.co>
outlay: add test for locked rows

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
cb9992f0 — Dominik Honnef a month ago
outlay: don't truncate grid when using locked rows

The old code accounted for the number of locked rows twice, which caused
it to render fewer total rows than needed.

Signed-off-by: Dominik Honnef <dominik@honnef.co>
markdown: fix nested emphases

This commit fixes a markdown rendering bug that would clear
the bold/italic state of text when either style ended, preventing
proper nesting.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
deps: update to latest gio

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
richtext: fix line wrapping on style boundaries

The change to Gio's text shaper that dropped support for breaking
within words subtly broke an assumption used by richtext's line wrapping.
This manifested as segments of text choosing not to wrap at style
boundaries.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
markdown: [API] revise text styling api

This commit enables consuming code to configure the text sizes
and colors generated by the markdown renderer by setting optional
fields on Renderer.Config. Additionally, the default header sizes
are now sane and no longer map 1:1 to the material design header
sizes. This commit has the side effect of dropping the dependency
on the material package.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
explorer: advertise linux support in README

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
component: adding a way to remove selected item

Signed-off-by: er <dever@alt.tf>
component: implement grid and table layouts

This commit adds support for material themed grid and table widgets
with appropriate scorllbars and headings.

Co-authored-by: Chris Waldon <christopher.waldon.dev@gmail.com>
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
outlay: implement grid layout

This patch implements a two dimensional grid that functions much
like layout.List. The API accepts a closure to provide the dimensions
of each row and column, and a separate closure to supply the contents
of each cell.

As an implementation simplification, all rows are presumed to have
the same height as the row with index 0, though we hope to remove this
constraint in the future.

Additionally, the grid supports locking the first N rows to the top
of the grid, though it does not currently support a corresponding
feature for columns.

Co-authored-by: Chris Waldon <christopher.waldon.dev@gmail.com>
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
Next