mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
resolved conflicts for merge of a3e22d6a to master
Change-Id: I8770574acf86e280a9d15d4309686111260e09d9
This commit is contained in:
@@ -178,6 +178,7 @@ public class BubbleTextView extends TextView {
|
||||
// The translate of scrollX and scrollY is necessary when drawing TextViews, because
|
||||
// they set scrollX and scrollY to large values to achieve centered text
|
||||
destCanvas.save();
|
||||
destCanvas.scale(getScaleX(), getScaleY(), getWidth() / 2, getHeight() / 2);
|
||||
destCanvas.translate(-getScrollX() + padding / 2, -getScrollY() + padding / 2);
|
||||
destCanvas.clipRect(clipRect, Op.REPLACE);
|
||||
draw(destCanvas);
|
||||
@@ -292,6 +293,14 @@ public class BubbleTextView extends TextView {
|
||||
canvas.translate(-scrollX, -scrollY);
|
||||
}
|
||||
}
|
||||
|
||||
// If text is transparent, don't draw any shadow
|
||||
if (getCurrentTextColor() == android.R.color.transparent) {
|
||||
getPaint().clearShadowLayer();
|
||||
super.draw(canvas);
|
||||
return;
|
||||
}
|
||||
|
||||
// We enhance the shadow by drawing the shadow twice
|
||||
getPaint().setShadowLayer(SHADOW_LARGE_RADIUS, 0.0f, SHADOW_Y_OFFSET, SHADOW_LARGE_COLOUR);
|
||||
super.draw(canvas);
|
||||
|
||||
Reference in New Issue
Block a user