2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Replace different side enums with RectPart.

Including Ui::Shadow::Side, App::RectPart and ImportantTooltip::Side.
This commit is contained in:
John Preston
2017-05-24 15:20:50 +03:00
parent c91e29d15d
commit 25587d7e8e
21 changed files with 90 additions and 142 deletions

View File

@@ -2731,11 +2731,11 @@ namespace {
void complexAdjustRect(ImageRoundCorners corners, QRect &rect, RectParts &parts) {
if (corners & ImageRoundCorner::TopLeft) {
if (!(corners & ImageRoundCorner::BottomLeft)) {
parts = RectPart::NoTopBottom | RectPart::TopFull;
parts = RectPart::NoTopBottom | RectPart::FullTop;
rect.setHeight(rect.height() + msgRadius());
}
} else if (corners & ImageRoundCorner::BottomLeft) {
parts = RectPart::NoTopBottom | RectPart::BottomFull;
parts = RectPart::NoTopBottom | RectPart::FullBottom;
rect.setTop(rect.y() - msgRadius());
} else {
parts = RectPart::NoTopBottom;