Repository navigation
fix(linux): text-shadow colour, <input> text-shadow, early wrapping, px gradient stops - #244
Merged
Merged
Conversation
- Text: every run carries its colour as a Pango foreground attribute, which overrode the colour the shadows were drawn with, so shadows came out in the text's colour. Shadows now draw copies of the layouts without the colour attributes. - Input and textarea: hand text-shadow to the GTK text through the element's CSS (EditableElement.SetTextShadow), like Windows and iOS.
Layout rounding could shrink a label's box a fraction below its measured width, and the text then wrapped when drawn (DRESS ME UP! split over two lines).
Stops given in px arrive as `p`/`l` beside the stop list, and were ignored, so `repeating-linear-gradient(115deg, transparent 0 26px, ... 26px 40px)` drew nothing. They're now resolved against the gradient line (the ray for radial), as on Windows, and a repeating gradient repeats over its first to last stop instead of the whole line. Backgrounds and masks both.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four Linux fixes:
append_layoutfor the shadows: white text lost its outline, coloured text with an outline smeared into a blob. Shadows now draw copies of the layouts with the colour attributes removed (foreground, background, decoration colours).<input>/<textarea>had notext-shadow.EditableElement.SetTextShadowhands the shadows tomason_gtk_text_set_shadow, and the input's GTK CSS gets atext-shadowrule built from them, as on Windows and iOS.measure_inlinenow rounds the measured width up to a whole pixel.p/lstop positions are now resolved against the gradient line (the ray for radial) as on Windows, and a repeating gradient repeats over its first-to-last stop span, in backgrounds and masks.repeating-linear-gradient(115deg, transparent 0 26px, rgba(255,255,255,.16) 26px 40px)drew nothing before.libmasonkit.sofor x64 and arm64 (glibc 2.28).cargo test -p mason-linux:pointer::tests::pointer_sequencesfails, as it does onmain; the rest pass.