mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 10:18:20 +00:00
Merge "Android U: GM3 Color Tokens for Taskbar and quickstep" into udc-dev am: 990aef6c00
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23220591 Change-Id: I700a064f9f891c5d62ae86f5e882d1050e091798 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
18
quickstep/res/color/taskbar_nav_icon_dark_color.xml
Normal file
18
quickstep/res/color/taskbar_nav_icon_dark_color.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@android:color/system_neutral2_700"/>
|
||||
</selector>
|
||||
18
quickstep/res/color/taskbar_nav_icon_light_color.xml
Normal file
18
quickstep/res/color/taskbar_nav_icon_light_color.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@android:color/system_neutral2_200"/>
|
||||
</selector>
|
||||
@@ -18,5 +18,5 @@
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/dialogCornerRadius" />
|
||||
<solid android:color="?androidprv:attr/colorSurface" />
|
||||
<solid android:color="?androidprv:attr/materialColorSurfaceBright"/>
|
||||
</shape>
|
||||
@@ -15,14 +15,13 @@
|
||||
-->
|
||||
|
||||
<inset
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<ripple
|
||||
android:color="?android:attr/colorControlHighlight">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="16dp"/>
|
||||
<solid android:color="?androidprv:attr/colorAccentPrimary"/>
|
||||
<solid android:color="@color/taskbar_edu_button_color"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
|
||||
<!-- Taskbar -->
|
||||
<color name="taskbar_nav_icon_selection_ripple">#E0E0E0</color>
|
||||
<color name="taskbar_nav_icon_light_color">#ffffff</color>
|
||||
<!-- The dark navigation button color is only used in the rare cases that taskbar isn't drawing
|
||||
its background and the underlying app has requested dark buttons. -->
|
||||
<color name="taskbar_nav_icon_dark_color">#99000000</color>
|
||||
<color name="taskbar_stashed_handle_light_color">#EBffffff</color>
|
||||
<color name="taskbar_stashed_handle_dark_color">#99000000</color>
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.Rect
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.util.AttributeSet
|
||||
import android.view.Gravity
|
||||
import android.view.MotionEvent
|
||||
@@ -138,9 +139,29 @@ constructor(
|
||||
|
||||
private fun populateForView(view: View): TaskbarDividerPopupView<*> {
|
||||
dividerView = view
|
||||
tryUpdateBackground()
|
||||
return this
|
||||
}
|
||||
|
||||
/** Updates the text background to match the shape of this background (when applicable). */
|
||||
private fun tryUpdateBackground() {
|
||||
if (background !is GradientDrawable) {
|
||||
return
|
||||
}
|
||||
val background = background as GradientDrawable
|
||||
val color = context.getColor(R.color.popup_shade_first)
|
||||
val backgroundMask = GradientDrawable()
|
||||
backgroundMask.setColor(color)
|
||||
backgroundMask.shape = GradientDrawable.RECTANGLE
|
||||
if (background.cornerRadii != null) {
|
||||
backgroundMask.cornerRadii = background.cornerRadii
|
||||
} else {
|
||||
backgroundMask.cornerRadius = background.cornerRadius
|
||||
}
|
||||
|
||||
setBackground(backgroundMask)
|
||||
}
|
||||
|
||||
override fun addArrow() {
|
||||
super.addArrow()
|
||||
// Change arrow location to the middle of popup.
|
||||
@@ -161,7 +182,7 @@ constructor(
|
||||
0f, // arrowOffsetY
|
||||
false, // isPointingUp
|
||||
true, // leftAligned
|
||||
Themes.getAttrColor(context, R.attr.popupColorPrimary),
|
||||
context.getColor(R.color.popup_shade_first),
|
||||
)
|
||||
elevation = mElevation
|
||||
mArrow.elevation = mElevation
|
||||
|
||||
@@ -53,7 +53,7 @@ constructor(
|
||||
private val activityContext: ActivityContext = ActivityContext.lookupContext(context)
|
||||
|
||||
private val backgroundColor =
|
||||
Themes.getAttrColor(context, com.android.internal.R.attr.colorSurface)
|
||||
Themes.getAttrColor(context, com.android.internal.R.attr.materialColorSurfaceBright)
|
||||
|
||||
private val tooltipCornerRadius = Themes.getDialogCornerRadius(context)
|
||||
private val arrowWidth = resources.getDimension(R.dimen.popup_arrow_width)
|
||||
|
||||
18
res/color-night-v31/all_apps_button_color.xml
Normal file
18
res/color-night-v31/all_apps_button_color.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@android:color/system_neutral2_500" android:lStar="80" />
|
||||
</selector>
|
||||
@@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2021 The Android Open Source Project
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2021 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -13,8 +12,7 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item
|
||||
android:color="?attr/popupColorPrimary"
|
||||
android:lStar="20" />
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||
<item android:color="?androidprv:attr/materialColorSurfaceContainer"/>
|
||||
</selector>
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@android:color/system_neutral1_500" android:lStar="20" />
|
||||
<item android:color="@android:color/system_neutral1_500" android:lStar="6" />
|
||||
</selector>
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="#797869" android:lStar="60" />
|
||||
<item android:color="@android:color/system_neutral1_500" android:lStar="60" />
|
||||
</selector>
|
||||
|
||||
18
res/color-v31/all_apps_button_color.xml
Normal file
18
res/color-v31/all_apps_button_color.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@android:color/system_neutral2_500" android:lStar="30" />
|
||||
</selector>
|
||||
@@ -13,8 +13,7 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item
|
||||
android:color="?attr/popupColorPrimary"
|
||||
android:lStar="98" />
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||
<item android:color="?androidprv:attr/materialColorSurfaceContainer"/>
|
||||
</selector>
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="#797869" android:lStar="50" />
|
||||
<item android:color="@android:color/system_neutral2_500" android:lStar="50" />
|
||||
</selector>
|
||||
|
||||
18
res/color-v31/taskbar_edu_button_color.xml
Normal file
18
res/color-v31/taskbar_edu_button_color.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@android:color/system_accent1_100"/>
|
||||
</selector>
|
||||
@@ -13,6 +13,7 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:color="?attr/popupShadeFirst" />
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||
<item android:color="?androidprv:attr/materialColorSurfaceContainer"/>
|
||||
</selector>
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
<color name="home_settings_track_on_color">@android:color/system_accent2_700</color>
|
||||
<color name="home_settings_track_off_color">@android:color/system_neutral1_700</color>
|
||||
|
||||
<color name="all_apps_button_color">@android:color/system_neutral2_200</color>
|
||||
|
||||
<color name="widget_picker_title_color_dark">@android:color/system_neutral1_100</color>
|
||||
<color name="widget_picker_header_app_title_color_dark">
|
||||
@android:color/system_neutral1_100</color>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<color name="all_apps_button_color">#BFC8CC</color>
|
||||
</resources>
|
||||
@@ -73,8 +73,6 @@
|
||||
<color name="preload_icon_accent_color_dark">@android:color/system_accent1_300</color>
|
||||
<color name="preload_icon_background_color_dark">@android:color/system_neutral2_700</color>
|
||||
|
||||
<color name="all_apps_button_color">@android:color/system_neutral2_700</color>
|
||||
|
||||
<color name="widget_picker_title_color_light">
|
||||
@android:color/system_neutral1_900</color>
|
||||
<color name="widget_picker_header_app_title_color_light">
|
||||
|
||||
@@ -90,8 +90,6 @@
|
||||
<color name="drop_target_hover_button_color_light">#D3E3FD</color>
|
||||
<color name="drop_target_hover_button_color_dark">#0842A0</color>
|
||||
|
||||
<color name="all_apps_button_color">#40484B</color>
|
||||
|
||||
<color name="preload_icon_accent_color_light">#00668B</color>
|
||||
<color name="preload_icon_background_color_light">#B5CAD7</color>
|
||||
<color name="preload_icon_accent_color_dark">#4BB6E8</color>
|
||||
|
||||
Reference in New Issue
Block a user