瀏覽代碼

LibWeb: Align text shadows the same way we align text

This makes the shadow line-up correctly on Acid3. :^)
Sam Atkins 3 年之前
父節點
當前提交
1499d2421e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibWeb/Painting/ShadowPainting.cpp

+ 1 - 1
Userland/Libraries/LibWeb/Painting/ShadowPainting.cpp

@@ -159,7 +159,7 @@ void paint_text_shadow(PaintContext& context, Layout::LineBoxFragment const& fra
         Gfx::Painter shadow_painter { *shadow_bitmap };
         Gfx::Painter shadow_painter { *shadow_bitmap };
         shadow_painter.set_font(context.painter().font());
         shadow_painter.set_font(context.painter().font());
         // FIXME: "Spread" the shadow somehow.
         // FIXME: "Spread" the shadow somehow.
-        shadow_painter.draw_text(text_rect, fragment.text(), Gfx::TextAlignment::TopLeft, layer.color);
+        shadow_painter.draw_text(text_rect, fragment.text(), Gfx::TextAlignment::CenterLeft, layer.color);
 
 
         // Blur
         // Blur
         Gfx::FastBoxBlurFilter filter(*shadow_bitmap);
         Gfx::FastBoxBlurFilter filter(*shadow_bitmap);