Ignore rotation angle for non-gradient patterns.
This commit is contained in:
parent
51db71c250
commit
f54fdd3926
@ -89,6 +89,9 @@ BackgroundFill::BackgroundFill(const telegram_api::wallPaperSettings *settings)
|
||||
} else {
|
||||
bottom_color_ = top_color_;
|
||||
}
|
||||
if (get_type() != Type::Gradient) {
|
||||
rotation_angle_ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Result<BackgroundFill> BackgroundFill::get_background_fill(const td_api::BackgroundFill *fill) {
|
||||
|
@ -28,6 +28,9 @@ class BackgroundFill {
|
||||
}
|
||||
BackgroundFill(int32 top_color, int32 bottom_color, int32 rotation_angle)
|
||||
: top_color_(top_color), bottom_color_(bottom_color), rotation_angle_(rotation_angle) {
|
||||
if (get_type() != Type::Gradient) {
|
||||
rotation_angle_ = 0;
|
||||
}
|
||||
}
|
||||
BackgroundFill(int32 first_color, int32 second_color, int32 third_color, int32 fourth_color)
|
||||
: top_color_(first_color), bottom_color_(second_color), third_color_(third_color), fourth_color_(fourth_color) {
|
||||
|
@ -2299,7 +2299,7 @@ class CliClient final : public Actor {
|
||||
}
|
||||
|
||||
static td_api::object_ptr<td_api::BackgroundFill> as_background_fill(int32 top_color, int32 bottom_color) {
|
||||
return td_api::make_object<td_api::backgroundFillGradient>(top_color, bottom_color, Random::fast(0, 7) * 45);
|
||||
return td_api::make_object<td_api::backgroundFillGradient>(top_color, bottom_color, Random::fast(1, 7) * 45);
|
||||
}
|
||||
|
||||
static td_api::object_ptr<td_api::BackgroundFill> as_background_fill(vector<int32> colors) {
|
||||
|
Loading…
Reference in New Issue
Block a user