Age | Commit message (Collapse) | Author |
|
Destination arrays contain a page number, a mode name, and parameters
specific to that mode. In many cases these parameters can be set to
"null", which our code wasn't taking into consideration.
This commit parses these parameters taking into account whether they are
null or actual numbers, and stores them as Optional<float> instead of
plain floats. The parameters are not yet used anywhere else other than
when formatting a Destination object, so the change is fairly small.
|
|
This was not correctly written, and thus printed confusing output.
|
|
Some favicons contain multiple icons of the same size, but with
increasing depth. Use the largest one to make things look nicer.
|
|
And while we're at it, handle the CardStack allocation (and failure
thereof) internally.
|
|
For example, in Solitaire, the vertical normal stacks cover the suit of
all but the topmost card in the stack. To see the suit of covered cards
the user currently has to move the cards on top of them out of the way.
This adds an API for games to set a card at a location to be previewed,
which will draw that card on top of all other cards without moving it.
|
|
This patch also updates corresponding functions from
`LibFileSystemAccessServerClient`.
From the FileSystemAccessClient point of view, it only makes the server
take `Core::Stream::OpenMode` instead of `Core::OpenMode`. So, `enum`
conversions only happen within deprecated functions and not in the new
`Core::Stream` friendly API.
On the server side, it just removes two usages of `Core::File::open()`.
|
|
|
|
|
|
No need to use a TextLayout here, we can just count the number of lines
and multiply that by the font's preferred line height.
In addition to being much simpler, it also fixes a bug where labels were
got too tall if we calculated their preferred height before assigning
a final width to them.
|
|
|
|
This is achieved by simplifying the logic in TextLayout. We get rid
of all the various ways that the layout bounding rect can get cropped.
Then we make sure to use the right pixel metrics.
Finally we use the font's own line gap metrics instead of hard-coding 4.
The end result is that text painted with vector fonts now gets pretty
reasonable vertical alignment in most cases.
|
|
This is the closest thing we have to the OpenType line gap metrics.
Using it here will allow us to unify more of the text painting logic.
|
|
|
|
We have to ceil the font size or we risk being 1px too small.
|
|
Instead of doing this manually, just use the helper we already have.
|
|
Also store the Font as a const reference instead of a raw pointer,
since we don't allow a null Font here.
|
|
This was returning the point height which didn't match BitmapFont and
led to bogus line heights in GUI::TextEditor.
|
|
|
|
Return a float, and fix a bogus calculation of ascender + descender.
|
|
|
|
|
|
Reuse the base size calculation from compute_base_size() instead of
duplicating it.
|
|
|
|
The height of a line or column doesn't change unless the font changes,
and we were already caching the line height. This patch extends it so
we also cache the column width.
|
|
When changing the font size, we now resize the terminal widget *before*
setting the font. This ensures that we keep the same logical terminal
size after the font change.
|
|
Instead of indicating which individual cards should be highlighted, card
games now indicate which stack is highlighted. This lets the stack draw
empty stacks with a highlight (e.g. the Foundation stack in Solitaire).
If the stack is non-empty, the stack can delegate highlighting to the
top-most card.
|
|
Currently, the outside of the card highlight has rounded corners, but
the inside has square corners. It looks a bit more polished if they are
both rounded.
|
|
Change column distribution to take in account is_length() and
is_percentage() width values instead of treating all cells like
they have auto width by implementing it in the way described
in CSS Tables 3 spec:
https://www.w3.org/TR/css-tables-3/#width-distribution-algorithm
distribute_width_to_column() is structured to follow schema:
w3.org/TR/css-tables-3/images/CSS-Tables-Column-Width-Assignment.svg
|
|
It is not possible to use width of containing block to resolve
cells width because by the time compute_table_measures() is
called row width is not known yet.
|
|
This commit ticks away two of the boxes in #15525
Temporal commits: tc39/proposal-temporal@f274678 and
tc39/proposal-temporal@a63a0fb
|
|
This commit ticks away one of the boxes in #15525
Temporal commit: tc39/proposal-temporal@9cd448a
|
|
ThrowableStringBuilder is a thin wrapper around StringBuilder to map
results from the try_* methods to a throw completion. This will let us
try to throw on OOM conditions rather than just blowing up.
|
|
Don't round float values to int values in
CanvasRenderingContext2D::fill_text when passing them to
Painter::draw_text.
This also fixes a fixme.
|
|
These don't deal with pixels so should not return CSSPixels. This
removes one suspicious looking cast.
|
|
This commit ticks away one of the boxes in #15525
Temporal commit: tc39/proposal-temporal@11aad40
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is a tiny change but I'm doing it now for the sake of completeness.
|
|
|
|
|
|
|
|
|