mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Update icon badges to match spec
- Size defined as percentage of app icon size
- Width changes when there are 2 or 3 digits (round rect)
- Offset slightly away from the app icon
- Had to move drawing to BubbleTextView instead of
FastBitmapDrawable
- Hide badge when dragging and while popup is open
- Tweaks for some color/text parameters
Bug: 35744066
Change-Id: Ibb15ca634abaa0729aea637c904c4c6889a58c7c
This commit is contained in:
@@ -2247,16 +2247,12 @@ public class Workspace extends PagedView
|
||||
Point dragVisualizeOffset = null;
|
||||
Rect dragRect = null;
|
||||
if (child instanceof BubbleTextView) {
|
||||
int iconSize = grid.iconSizePx;
|
||||
int top = child.getPaddingTop();
|
||||
int left = (b.getWidth() - iconSize) / 2;
|
||||
int right = left + iconSize;
|
||||
int bottom = top + iconSize;
|
||||
dragLayerY += top;
|
||||
// Note: The drag region is used to calculate drag layer offsets, but the
|
||||
dragRect = new Rect();
|
||||
((BubbleTextView) child).getIconBounds(dragRect);
|
||||
dragLayerY += dragRect.top;
|
||||
// Note: The dragRect is used to calculate drag layer offsets, but the
|
||||
// dragVisualizeOffset in addition to the dragRect (the size) to position the outline.
|
||||
dragVisualizeOffset = new Point(- halfPadding, halfPadding);
|
||||
dragRect = new Rect(left, top, right, bottom);
|
||||
} else if (child instanceof FolderIcon) {
|
||||
int previewSize = grid.folderIconSizePx;
|
||||
dragVisualizeOffset = new Point(- halfPadding, halfPadding - child.getPaddingTop());
|
||||
|
||||
Reference in New Issue
Block a user