Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b3b67d0 authored by helencheuk's avatar helencheuk
Browse files

Add radius to widget internal focus to fit new focus outline design

Bug: 310953377
Test: Manual
Flag: ACONFIG com.android.launcher3.enable_focus_outline Development
Change-Id: I9b11e8bf21dbb5045586907f0fc13577e236c8e7
parent 78941419
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
    <item android:state_selected="true">
        <shape android:shape="rectangle">
            <stroke android:color="#fff" android:width="2dp" />
            <corners android:radius="@dimen/focus_outline_radius" />
        </shape>
    </item>
</selector>
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.launcher3.CheckLongPressHelper;
import com.android.launcher3.Flags;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
@@ -103,6 +104,9 @@ public class LauncherAppWidgetHostView extends BaseLauncherAppWidgetHostView
        mLongPressHelper = new CheckLongPressHelper(this, this);
        setAccessibilityDelegate(mLauncher.getAccessibilityDelegate());
        setBackgroundResource(R.drawable.widget_internal_focus_bg);
        if (Flags.enableFocusOutline()) {
            setDefaultFocusHighlightEnabled(false);
        }

        if (Utilities.ATLEAST_Q && Themes.getAttrBoolean(mLauncher, R.attr.isWorkspaceDarkText)) {
            setOnLightBackground(true);