mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Make Taskbar Divider PopUp Menu Width Dynamic
Test: Manual Bug: 327647761 Flag: com.android.launcher3.enable_taskbar_pinning Change-Id: Ib5c13324afee46b45b2c71e3af86c15a6384a278
This commit is contained in:
@@ -16,8 +16,9 @@
|
||||
-->
|
||||
<com.android.launcher3.taskbar.TaskbarDividerPopupView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/taskbar_pinning_popup_menu_width"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="@dimen/taskbar_pinning_popup_menu_width"
|
||||
android:focusable="true"
|
||||
android:background="@drawable/popup_background"
|
||||
android:orientation="vertical">
|
||||
@@ -55,10 +56,10 @@
|
||||
android:gravity="start|center_vertical"
|
||||
android:textAlignment="viewStart"
|
||||
android:paddingStart="12dp"
|
||||
android:switchPadding="12dp"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@*android:string/config_bodyFontFamilyMedium"
|
||||
android:lines="1"
|
||||
android:ellipsize="end"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:text="@string/always_show_taskbar" />
|
||||
|
||||
@@ -69,8 +69,6 @@ constructor(
|
||||
|
||||
private lateinit var dividerView: View
|
||||
|
||||
private val menuWidth =
|
||||
resources.getDimensionPixelSize(R.dimen.taskbar_pinning_popup_menu_width)
|
||||
private val popupCornerRadius = Themes.getDialogCornerRadius(context)
|
||||
private val arrowWidth = resources.getDimension(R.dimen.popup_arrow_width)
|
||||
private val arrowHeight = resources.getDimension(R.dimen.popup_arrow_height)
|
||||
@@ -125,7 +123,7 @@ constructor(
|
||||
/** Orient object as usual and then center object horizontally. */
|
||||
override fun orientAboutObject() {
|
||||
super.orientAboutObject()
|
||||
x = mTempRect.centerX() - menuWidth / 2f
|
||||
x = mTempRect.centerX() - measuredWidth / 2f
|
||||
}
|
||||
|
||||
override fun onControllerInterceptTouchEvent(ev: MotionEvent?): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user