mirror of
https://github.com/brl/mutter.git
synced 2025-02-17 21:54:10 +00:00
frames: Fix border-radius stupidity
Since we're breaking the theme format, we don't need to do this any logner.
This commit is contained in:
parent
cc3be6da4d
commit
f53e26bc39
@ -701,23 +701,14 @@ meta_frames_get_corner_radiuses (MetaFrames *frames,
|
|||||||
|
|
||||||
meta_frames_calc_geometry (frames, frame, &fgeom);
|
meta_frames_calc_geometry (frames, frame, &fgeom);
|
||||||
|
|
||||||
/* For compatibility with the code in get_visible_rect(), there's
|
|
||||||
* a mysterious sqrt() added to the corner radiuses:
|
|
||||||
*
|
|
||||||
* const float radius = sqrt(corner) + corner;
|
|
||||||
*
|
|
||||||
* It's unclear why the radius is calculated like this, but we
|
|
||||||
* need to be consistent with it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (top_left)
|
if (top_left)
|
||||||
*top_left = fgeom.top_left_corner_rounded_radius + sqrt(fgeom.top_left_corner_rounded_radius);
|
*top_left = fgeom.top_left_corner_rounded_radius;
|
||||||
if (top_right)
|
if (top_right)
|
||||||
*top_right = fgeom.top_right_corner_rounded_radius + sqrt(fgeom.top_right_corner_rounded_radius);
|
*top_right = fgeom.top_right_corner_rounded_radius;
|
||||||
if (bottom_left)
|
if (bottom_left)
|
||||||
*bottom_left = fgeom.bottom_left_corner_rounded_radius + sqrt(fgeom.bottom_left_corner_rounded_radius);
|
*bottom_left = fgeom.bottom_left_corner_rounded_radius;
|
||||||
if (bottom_right)
|
if (bottom_right)
|
||||||
*bottom_right = fgeom.bottom_right_corner_rounded_radius + sqrt(fgeom.bottom_right_corner_rounded_radius);
|
*bottom_right = fgeom.bottom_right_corner_rounded_radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -800,7 +791,7 @@ get_visible_region (MetaFrames *frames,
|
|||||||
if (fgeom->top_left_corner_rounded_radius != 0)
|
if (fgeom->top_left_corner_rounded_radius != 0)
|
||||||
{
|
{
|
||||||
const int corner = fgeom->top_left_corner_rounded_radius;
|
const int corner = fgeom->top_left_corner_rounded_radius;
|
||||||
const float radius = sqrt(corner) + corner;
|
const float radius = corner;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0; i<corner; i++)
|
for (i=0; i<corner; i++)
|
||||||
@ -818,7 +809,7 @@ get_visible_region (MetaFrames *frames,
|
|||||||
if (fgeom->top_right_corner_rounded_radius != 0)
|
if (fgeom->top_right_corner_rounded_radius != 0)
|
||||||
{
|
{
|
||||||
const int corner = fgeom->top_right_corner_rounded_radius;
|
const int corner = fgeom->top_right_corner_rounded_radius;
|
||||||
const float radius = sqrt(corner) + corner;
|
const float radius = corner;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0; i<corner; i++)
|
for (i=0; i<corner; i++)
|
||||||
@ -836,7 +827,7 @@ get_visible_region (MetaFrames *frames,
|
|||||||
if (fgeom->bottom_left_corner_rounded_radius != 0)
|
if (fgeom->bottom_left_corner_rounded_radius != 0)
|
||||||
{
|
{
|
||||||
const int corner = fgeom->bottom_left_corner_rounded_radius;
|
const int corner = fgeom->bottom_left_corner_rounded_radius;
|
||||||
const float radius = sqrt(corner) + corner;
|
const float radius = corner;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0; i<corner; i++)
|
for (i=0; i<corner; i++)
|
||||||
@ -854,7 +845,7 @@ get_visible_region (MetaFrames *frames,
|
|||||||
if (fgeom->bottom_right_corner_rounded_radius != 0)
|
if (fgeom->bottom_right_corner_rounded_radius != 0)
|
||||||
{
|
{
|
||||||
const int corner = fgeom->bottom_right_corner_rounded_radius;
|
const int corner = fgeom->bottom_right_corner_rounded_radius;
|
||||||
const float radius = sqrt(corner) + corner;
|
const float radius = corner;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0; i<corner; i++)
|
for (i=0; i<corner; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user