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::Scalabledruid_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 |
luleyleo
left a comment
There was a problem hiding this comment.
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 |
CHANGELOG.md
Outdated
| ### 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.
| - `Scale::to_px` and `Scale::to_dp` ([#1075] by [@ForLoveOfCats]) | |
| - `Scale::to_px` and `Scale::to_dp`. ([#1075] by [@ForLoveOfCats]) |
CHANGELOG.md
Outdated
| - `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.
| - 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-ingScalableand thus various type's implementation ofto_pxect