From a8e77927b460834e53e8e8f1e48d02191ab8ec82 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Thu, 7 Mar 2024 23:33:12 -0800 Subject: [PATCH] Remove line between bubble bar and arrow Bubble bar background is a drawable that consists of a rounded rect and a pointer arrow. In light theme, the rounded rect has a 1 pixel wide border around it. When drawing the arrow just above the rounded rect, the border is visible as a line between the background rounded rect and the arrow. Shifting the arrow down by 1 pixel to ensure that there is no visible arrow between bubble bar and arrow. Other option could be to draw the entire background as a single path. This path can combine the rounded rect background and arrow. But we need to control the alpha of the arrow separately from the background. This we can't do with a single path. Bug: 324442574 Flag: NA Test: manual Change-Id: Iaa58ae4700ed9ad43051cd386f03381e0c14e72c --- .../android/launcher3/taskbar/bubbles/BubbleBarBackground.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarBackground.kt b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarBackground.kt index 9f14ebffff..79fdedaf17 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarBackground.kt +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarBackground.kt @@ -138,7 +138,9 @@ class BubbleBarBackground(context: TaskbarActivityContext, private val backgroun if (showingArrow) { // Draw arrow. val transX = arrowPositionX - pointerSize / 2f - canvas.translate(transX, 0f) + // Shift arrow down by 1 pixel. Rounded rect has a 1 pixel border which will show up + // between background and arrow otherwise. + canvas.translate(transX, 1f) arrowDrawable.draw(canvas) }