-
Notifications
You must be signed in to change notification settings - Fork 567
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
Re-export druid_shell::Scalable
& remove to_px/to_dp helpers on Scale
#1075
Re-export druid_shell::Scalable
& remove to_px/to_dp helpers on Scale
#1075
Conversation
9536699
to
2de2448
Compare
@xStrom does this make sense as public API to you? |
It kinda already is. When I initially drafted this PR I hadn't looked into these functions to much but now after using this branch for my project and poking around I think that the helper function on My specific use case of having this functionality provided to applications is that I'm using it to handle font size in a DPI aware way by converting to absolute pixel values. |
2de2448
to
9655156
Compare
I've removed the helper functions and corrected any callsites I could find with a quick grep. I decided to leave the |
ddd8ec1
to
3dccf7c
Compare
druid_shell::Scalable
druid_shell::Scalable
& remove to_px/to_dp helpers on Scale
After fixing the CI and fiddling with merge conflicts I think this is ready for a review. Thankfully removing those functions turned out to be a fairly small change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me. Just one nit about the changlog.
ef0a7f0
to
b6f0cf9
Compare
So none of the CI seems to be running and the changelog still has a merge conflict after manually fixing it so I'm just going to let this sit for a while and hope Github sorts itself out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't spot the changes made in #1081 so maybe those are missing?
CHANGELOG.md
Outdated
|
||
### Deprecated | ||
|
||
### Removed | ||
|
||
- `Scale::from_dpi`, `Scale::dpi_x`, and `Scale::dpi_y`. ([#1042] by [@xStrom]) | ||
- `Scale::to_px` and `Scale::to_dp` ([#1075] by [@ForLoveOfCats]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `Scale::to_px` and `Scale::to_dp` ([#1075] by [@ForLoveOfCats]) | |
- `Scale::to_px` and `Scale::to_dp`. ([#1075] by [@ForLoveOfCats]) |
CHANGELOG.md
Outdated
@@ -15,12 +15,14 @@ You can find its changes [documented below](#060---2020-06-01). | |||
- `Scale::from_scale` to `Scale::new`, and `Scale` methods `scale_x` / `scale_y` to `x` / `y`. ([#1042] by [@xStrom]) | |||
- Major rework of keyboard event handling ([#1049] by [@raphlinus]) | |||
- `Container::rounded` takes `KeyOrValue<f64>` instead of `f64`. ([#1054] by [@binomial0]) | |||
- Re-export `druid_shell::Scalable` under `druid` namespace ([#1075] by [@ForLoveOfCats]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Re-export `druid_shell::Scalable` under `druid` namespace ([#1075] by [@ForLoveOfCats]) | |
- Re-export `druid_shell::Scalable` under `druid` namespace. ([#1075] by [@ForLoveOfCats]) |
b6f0cf9
to
70d2ec1
Compare
70d2ec1
to
7a31086
Compare
I managed to fix the merge conflict by just moving the conflicting line up a line, not ideal but better than screwing up the PR's git log. The CI also seems to be functioning again, not sure if the conflict was blocking the CI from running as I'm 90% sure that I've had PRs run CI with merge conflicts but I don't know if the CI runs on just the PR's branch or on the master branch w/ the PR merged which would cause it to be blocked 🤷 |
Sorry for not taking a look sooner, but yeah I think this change is fine. |
This allows
use
-ingScalable
and thus various type's implementation ofto_px
ect