There was some confusion about junctions...
switch (edge)
{
case GDK_WINDOW_EDGE_NORTH_WEST:
switch (edge)
{
case GDK_WINDOW_EDGE_NORTH_WEST:
- sides = GTK_JUNCTION_TOP | GTK_JUNCTION_LEFT;
+ sides = GTK_JUNCTION_CORNER_TOPLEFT;
break;
case GDK_WINDOW_EDGE_NORTH:
sides = GTK_JUNCTION_TOP;
break;
case GDK_WINDOW_EDGE_NORTH_EAST:
break;
case GDK_WINDOW_EDGE_NORTH:
sides = GTK_JUNCTION_TOP;
break;
case GDK_WINDOW_EDGE_NORTH_EAST:
- sides = GTK_JUNCTION_TOP | GTK_JUNCTION_RIGHT;
+ sides = GTK_JUNCTION_CORNER_TOPRIGHT;
break;
case GDK_WINDOW_EDGE_WEST:
sides = GTK_JUNCTION_LEFT;
break;
case GDK_WINDOW_EDGE_WEST:
sides = GTK_JUNCTION_LEFT;
sides = GTK_JUNCTION_RIGHT;
break;
case GDK_WINDOW_EDGE_SOUTH_WEST:
sides = GTK_JUNCTION_RIGHT;
break;
case GDK_WINDOW_EDGE_SOUTH_WEST:
- sides = GTK_JUNCTION_BOTTOM | GTK_JUNCTION_LEFT;
+ sides = GTK_JUNCTION_CORNER_BOTTOMLEFT;
break;
case GDK_WINDOW_EDGE_SOUTH:
sides = GTK_JUNCTION_BOTTOM;
break;
case GDK_WINDOW_EDGE_SOUTH_EAST:
break;
case GDK_WINDOW_EDGE_SOUTH:
sides = GTK_JUNCTION_BOTTOM;
break;
case GDK_WINDOW_EDGE_SOUTH_EAST:
- sides = GTK_JUNCTION_BOTTOM | GTK_JUNCTION_RIGHT;
+ sides = GTK_JUNCTION_CORNER_BOTTOMRIGHT;
sides = gtk_theming_engine_get_junction_sides (engine);
/* reduce confusing values to a meaningful state */
sides = gtk_theming_engine_get_junction_sides (engine);
/* reduce confusing values to a meaningful state */
- if ((sides & (GTK_JUNCTION_LEFT | GTK_JUNCTION_RIGHT)) == (GTK_JUNCTION_LEFT | GTK_JUNCTION_RIGHT))
- sides &= ~GTK_JUNCTION_LEFT;
+ if ((sides & (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_BOTTOMRIGHT)) == (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_BOTTOMRIGHT))
+ sides &= ~GTK_JUNCTION_CORNER_TOPLEFT;
- if ((sides & (GTK_JUNCTION_TOP | GTK_JUNCTION_BOTTOM)) == (GTK_JUNCTION_TOP | GTK_JUNCTION_BOTTOM))
- sides &= ~GTK_JUNCTION_TOP;
+ if ((sides & (GTK_JUNCTION_CORNER_TOPRIGHT | GTK_JUNCTION_CORNER_BOTTOMLEFT)) == (GTK_JUNCTION_CORNER_TOPRIGHT | GTK_JUNCTION_CORNER_BOTTOMLEFT))
+ sides &= ~GTK_JUNCTION_CORNER_TOPRIGHT;
- sides = (GTK_JUNCTION_BOTTOM | GTK_JUNCTION_RIGHT);
+ sides = GTK_JUNCTION_CORNER_BOTTOMRIGHT;
/* align drawing area to the connected side */
if (sides == GTK_JUNCTION_LEFT)
/* align drawing area to the connected side */
if (sides == GTK_JUNCTION_LEFT)
if (height < width)
width = height;
}
if (height < width)
width = height;
}
- else if (sides == (GTK_JUNCTION_LEFT | GTK_JUNCTION_TOP))
+ else if (sides == GTK_JUNCTION_CORNER_TOPLEFT)
{
if (width < height)
height = width;
{
if (width < height)
height = width;
- else if (sides == (GTK_JUNCTION_LEFT | GTK_JUNCTION_BOTTOM))
+ else if (sides == GTK_JUNCTION_CORNER_BOTTOMLEFT)
{
/* make it square, aligning to bottom left */
if (width < height)
{
/* make it square, aligning to bottom left */
if (width < height)
- else if (sides == (GTK_JUNCTION_RIGHT | GTK_JUNCTION_TOP))
+ else if (sides == GTK_JUNCTION_CORNER_TOPRIGHT)
{
if (width < height)
height = width;
{
if (width < height)
height = width;
- else if (sides == (GTK_JUNCTION_RIGHT | GTK_JUNCTION_BOTTOM))
+ else if (sides == GTK_JUNCTION_CORNER_BOTTOMRIGHT)
{
/* make it square, aligning to bottom right */
if (width < height)
{
/* make it square, aligning to bottom right */
if (width < height)
- else if (sides == (GTK_JUNCTION_TOP | GTK_JUNCTION_LEFT))
+ else if (sides == GTK_JUNCTION_CORNER_TOPLEFT)
- else if (sides == (GTK_JUNCTION_TOP | GTK_JUNCTION_RIGHT))
+ else if (sides == GTK_JUNCTION_CORNER_TOPRIGHT)
- else if (sides == (GTK_JUNCTION_BOTTOM | GTK_JUNCTION_LEFT))
+ else if (sides == GTK_JUNCTION_CORNER_BOTTOMLEFT)
- else if (sides == (GTK_JUNCTION_BOTTOM | GTK_JUNCTION_RIGHT))
+ else if (sides == GTK_JUNCTION_CORNER_BOTTOMRIGHT)
get_grip_junction (GtkWidget *widget)
{
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
get_grip_junction (GtkWidget *widget)
{
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
- return GTK_JUNCTION_BOTTOM | GTK_JUNCTION_RIGHT;
+ return GTK_JUNCTION_CORNER_BOTTOMRIGHT;
- return GTK_JUNCTION_BOTTOM | GTK_JUNCTION_LEFT;
+ return GTK_JUNCTION_CORNER_BOTTOMLEFT;
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
cairo_paint (cr);
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0);
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
cairo_paint (cr);
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0);
- if (get_grip_junction (GTK_WIDGET (window)) & GTK_JUNCTION_RIGHT)
+ if (get_grip_junction (GTK_WIDGET (window)) & GTK_JUNCTION_CORNER_BOTTOMRIGHT)
{
cairo_move_to (cr, width, 0.0);
cairo_line_to (cr, width, height);
{
cairo_move_to (cr, width, 0.0);
cairo_line_to (cr, width, height);