Conversation
AlanGriffiths
left a comment
There was a problem hiding this comment.
Sorry, don't have good suggestions: center_horizontally_with_clamp_left() is just as confusing and even longer
src/miral/basic_window_manager.cpp
Outdated
| namespace | ||
| { | ||
| void clamp_left(Rectangle const& zone, Rectangle& rect) | ||
| void center_horizontally_in_zone(Rectangle const& zone, Rectangle& rect) |
There was a problem hiding this comment.
Isn't the new name also confusing? If rect is wider than zone the placement is not centered horizontally, but clamped to the left. (No, that isn't a defense of the old name.)
src/miral/basic_window_manager.cpp
Outdated
| } | ||
|
|
||
| void clamp_top(Rectangle const& zone, Rectangle& rect) | ||
| void center_vertically_in_zone(Rectangle const& zone, Rectangle& rect) |
There was a problem hiding this comment.
Isn't the new name also confusing? If rect is taller than zone the placement is not centered vertically, but clamped to the top.
I believe this would be okay with a comment explaining when it centers and when it clamps. What do you think? Alternative: |
mattkae
left a comment
There was a problem hiding this comment.
A nit on my end, but all good otherwsie
I don't have a better idea |
450a8f4 to
82d3eaa
Compare
82d3eaa to
ff4f8d0
Compare
|
Seems to have hung waiting on "documentation-checks / Run documentation checks" -I'm just gonna land it |
Just some cleanups that I found while working on #4664 and don't quite fit there.