Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for timers waiting a full interval before first run #156

Open
wants to merge 902 commits into
base: master
Choose a base branch
from

Conversation

antonok-edm
Copy link
Contributor

As per the documentation for delayed timers, a Timer should execute immediately when no delay is specified. However, if the timer is on an interval, it will wait a full interval before firing. This is especially problematic for timers with large intervals (e.g. querying a system's memory usage every 2 minutes).

This PR removes the initial interval delay. The old behavior is still possible by explicitly adding a delay, like so:

Timer::new(timer_function).with_delay(interval_time).with_interval(interval_time);

fschutt and others added 30 commits December 28, 2018 10:22
Fixed calculator example, implemented proper business logic
Implement background-size:contain and background-size:cover
…peat

This was implemented by using LayoutPrimitiveInfo's clip_rect functionality.
If `no-repeat` is specified in CSS, the rect is clipped to the size of the image on both axis.
If `repeat-x` is specified, the rect's height is clipped to the image height.
If `repeat-y` is specified, the rect's width is clipped to the image width.`
Implement background-repeat: no-repeat | repeat | repeat-x | repeat-y
Due to the instability of crates.io, this gives way better
stability and versioning guarantees with the tradeoff that
now, users might compile crates twice. However, that is
generally better than code breaking every few days, so
it's the lesser evil.

Fixes fschutt#86 and fschutt#80.
Previously, ":nth-child(1)" did not parse correctly
because the tokenizer was broken to not include the "1"
in the actual parser.

This update also adds support (in the tokenizer, not the parser)
for ::selectors, @ rules in CSS and free-standing string
literals (necessary for @ keyframes and @ media).
Necessary for handling focusing callbacks on text fields and
other, menu-related things.
fschutt and others added 25 commits April 2, 2019 11:55
…nits

The first matching step can be processed in parallel, inheritance is now
done after the children have matched the parents.
This allows splitting the Dom<T> type out of the main crate,
which is necessary for people to write plugins that don't rely
on the entire azul API
Use correct resource paths for text shaping example
line 81 "/../examples/dragger.css" should be changed to "/../examples/slider/slider.css"
Fix wrong CSS file path in slider example
@fschutt
Copy link
Owner

fschutt commented Apr 18, 2019

Thanks for fixing it, but I'd rework the implementation a bit so it's easier to understand what's going on (and add comments for future maintainers). I'll do a review later.

@fschutt
Copy link
Owner

fschutt commented Apr 29, 2019

Just wanted to say, I haven't forgotten about this, but there are large refactorings in progress right now, may take a while to get merged.

@fschutt
Copy link
Owner

fschutt commented Jun 19, 2019

Yeah, I think I'll manually implement and check this again, I committed some huge files into git early on and needed to remove them via git-bfg, so this PR is kind of a mess right now sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.