Closed djowel closed 4 months ago
Digging in, I see that this:
template <typename Base, default_button_styler::direction Direction>
inline float button_styler_rounded_half<Base, Direction>::get_corner_radius_top_right() const
{
if constexpr (Direction == direction_t::up || Direction == direction_t::right)
return _radius;
else
return Base::get_corner_radius_top_right();
}
is getting the default corner radius:
inline float default_button_styler::get_corner_radius() const
{
return get_theme().button_corner_radius;
}
Instead of just 0.0.
Is that intentional? What is the rationale for this behavior?
Ah I see that this:
return Base::get_corner_radius_top_right();
Allows concatenation of stylers. Hmmm...
Fixed. The solution is to only call the Base if the base is non-default. Otherwise, return 0.0.
If you zoom in, the right-top and right-bottom corners are not sharp. It is fixed by using
.corner_radius(10, 0, 0, 10)
Or is it intentional? Assuming the default radius when not specified? It does not seem right, no?
Originally posted by @djowel in https://github.com/cycfi/elements/issues/401#issuecomment-2124728198