mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 09:57:32 +09:00
Issue #1925 - Remove use of NS_CORNER_{TOP|BOTTOM}_{LEFT|RIGHT} macros.
This commit is contained in:
parent
0a7f42b452
commit
d73f8c2e84
10 changed files with 96 additions and 93 deletions
|
|
@ -24,17 +24,25 @@ struct RoundedRect {
|
|||
rect.width = std::max(0., rect.width - aLeftWidth - aRightWidth);
|
||||
rect.height = std::max(0., rect.height - aTopWidth - aBottomWidth);
|
||||
|
||||
corners.radii[NS_CORNER_TOP_LEFT].width = std::max(0., corners.radii[NS_CORNER_TOP_LEFT].width - aLeftWidth);
|
||||
corners.radii[NS_CORNER_TOP_LEFT].height = std::max(0., corners.radii[NS_CORNER_TOP_LEFT].height - aTopWidth);
|
||||
corners.radii[mozilla::eCornerTopLeft].width =
|
||||
std::max(0., corners.radii[mozilla::eCornerTopLeft].width - aLeftWidth);
|
||||
corners.radii[mozilla::eCornerTopLeft].height =
|
||||
std::max(0., corners.radii[mozilla::eCornerTopLeft].height - aTopWidth);
|
||||
|
||||
corners.radii[NS_CORNER_TOP_RIGHT].width = std::max(0., corners.radii[NS_CORNER_TOP_RIGHT].width - aRightWidth);
|
||||
corners.radii[NS_CORNER_TOP_RIGHT].height = std::max(0., corners.radii[NS_CORNER_TOP_RIGHT].height - aTopWidth);
|
||||
corners.radii[mozilla::eCornerTopRight].width =
|
||||
std::max(0., corners.radii[mozilla::eCornerTopRight].width - aRightWidth);
|
||||
corners.radii[mozilla::eCornerTopRight].height =
|
||||
std::max(0., corners.radii[mozilla::eCornerTopRight].height - aTopWidth);
|
||||
|
||||
corners.radii[NS_CORNER_BOTTOM_LEFT].width = std::max(0., corners.radii[NS_CORNER_BOTTOM_LEFT].width - aLeftWidth);
|
||||
corners.radii[NS_CORNER_BOTTOM_LEFT].height = std::max(0., corners.radii[NS_CORNER_BOTTOM_LEFT].height - aBottomWidth);
|
||||
corners.radii[mozilla::eCornerBottomLeft].width =
|
||||
std::max(0., corners.radii[mozilla::eCornerBottomLeft].width - aLeftWidth);
|
||||
corners.radii[mozilla::eCornerBottomLeft].height =
|
||||
std::max(0., corners.radii[mozilla::eCornerBottomLeft].height - aBottomWidth);
|
||||
|
||||
corners.radii[NS_CORNER_BOTTOM_RIGHT].width = std::max(0., corners.radii[NS_CORNER_BOTTOM_RIGHT].width - aRightWidth);
|
||||
corners.radii[NS_CORNER_BOTTOM_RIGHT].height = std::max(0., corners.radii[NS_CORNER_BOTTOM_RIGHT].height - aBottomWidth);
|
||||
corners.radii[mozilla::eCornerBottomRight].width =
|
||||
std::max(0., corners.radii[mozilla::eCornerBottomRight].width - aRightWidth);
|
||||
corners.radii[mozilla::eCornerBottomRight].height =
|
||||
std::max(0., corners.radii[mozilla::eCornerBottomRight].height - aBottomWidth);
|
||||
}
|
||||
gfxRect rect;
|
||||
RectCornerRadii corners;
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ struct gfxRect :
|
|||
|
||||
gfxPoint AtCorner(mozilla::Corner corner) const {
|
||||
switch (corner) {
|
||||
case NS_CORNER_TOP_LEFT: return TopLeft();
|
||||
case NS_CORNER_TOP_RIGHT: return TopRight();
|
||||
case NS_CORNER_BOTTOM_RIGHT: return BottomRight();
|
||||
case NS_CORNER_BOTTOM_LEFT: return BottomLeft();
|
||||
case mozilla::eCornerTopLeft: return TopLeft();
|
||||
case mozilla::eCornerTopRight: return TopRight();
|
||||
case mozilla::eCornerBottomRight: return BottomRight();
|
||||
case mozilla::eCornerBottomLeft: return BottomLeft();
|
||||
}
|
||||
return gfxPoint(0.0, 0.0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue