diff --git a/src/vte.c b/src/vte.c
index 9c757fe..129ce16 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -9604,23 +9604,11 @@ vte_terminal_draw_graphic(VteTerminal *terminal, vteunistr c,
         case 0x2586: /* lower three quarters block */
         case 0x2587: /* lower seven eighths block */
         {
-                const guint v = c - 0x2580;
-                int h, half;
+                /* number of eights from the top, so that 2584 aligns with 2596..259f */
+                const guint v = 8 - (c - 0x2580);
+                int h = MAX(row_height * v / 8, 1);  /* height of the skipped part */
 
-                if (v & 4) {
-                        half = upper_half;
-                        h = lower_half;
-                } else {
-                        half = lower_half;
-                        h = 0;
-                }
-
-                half /= 2;
-                if (v & 2) h += half;
-                half /= 2;
-                if (v & 1) h += half;
-
-                cairo_rectangle(cr, x, y + row_height - h, width, h);
+                cairo_rectangle(cr, x, y + h, width, row_height - h);
                 cairo_fill (cr);
                 break;
         }
@@ -9634,20 +9622,9 @@ vte_terminal_draw_graphic(VteTerminal *terminal, vteunistr c,
         case 0x258e: /* left one quarter block */
         case 0x258f: /* left one eighth block */
         {
-                const guint v = c - 0x2588;
-                int w, half;
-
-                if (v & 4) {
-                        w = half = left_half;
-                } else {
-                        w = width;
-                        half = right_half;
-                }
-
-                half /= 2;
-                if (v & 2) w -= half;
-                half /= 2;
-                if (v & 1) w -= half;
+                /* number of eights from the left, so that 258c aligns with 2596..259f */
+                const guint v = 8 - (c - 0x2588);
+                int w = MAX(width * v / 8, 1);
 
                 cairo_rectangle(cr, x, y, w, row_height);
                 cairo_fill (cr);
@@ -9672,14 +9649,20 @@ vte_terminal_draw_graphic(VteTerminal *terminal, vteunistr c,
                 break;
 
         case 0x2594: /* upper one eighth block */
-                cairo_rectangle(cr, x, y, width, upper_half / 4);
+        {
+                int h = MAX(row_height / 8, 1);  /* align with 2587 */
+                cairo_rectangle(cr, x, y, width, h);
                 cairo_fill (cr);
                 break;
+        }
 
         case 0x2595: /* right one eighth block */
-                cairo_rectangle(cr, x + width - right_half / 4, y, right_half / 4, row_height);
+        {
+                int w = MAX(width * 7 / 8, 1);  /* align with 2589 */
+                cairo_rectangle(cr, x + w, y, width - w, row_height);
                 cairo_fill (cr);
                 break;
+        }
 
         case 0x2596: /* quadrant lower left */
                 cairo_rectangle(cr, x, y + upper_half, left_half, lower_half);
