diff options
| -rw-r--r-- | libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml | 9 | ||||
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt | 19 |
2 files changed, 16 insertions, 12 deletions
diff --git a/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml b/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml index bfaa40771894..c33669636be4 100644 --- a/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml +++ b/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml @@ -186,14 +186,13 @@ <ImageButton android:id="@+id/open_by_default_button" - android:layout_width="20dp" - android:layout_height="20dp" android:layout_gravity="end|center_vertical" - android:layout_marginStart="8dp" - android:layout_marginEnd="16dp" + android:paddingStart="12dp" + android:paddingEnd="16dp" android:contentDescription="@string/open_by_default_settings_text" android:src="@drawable/desktop_mode_ic_handle_menu_open_by_default_settings" - android:tint="@androidprv:color/materialColorOnSurface"/> + android:tint="@androidprv:color/materialColorOnSurface" + style="@style/DesktopModeHandleMenuWindowingButton"/> </LinearLayout> </LinearLayout> diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt index 284fbc310cbe..2d44395b1340 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt @@ -500,6 +500,12 @@ class HandleMenu( t = iconButtondrawableBaseInset, b = iconButtondrawableBaseInset, l = 0, r = iconButtondrawableShiftInset ) + private val iconButtonDrawableInsetStart + get() = + if (context.isRtl) iconButtonDrawableInsetsRight else iconButtonDrawableInsetsLeft + private val iconButtonDrawableInsetEnd + get() = + if (context.isRtl) iconButtonDrawableInsetsLeft else iconButtonDrawableInsetsRight // App Info Pill. private val appInfoPill = rootView.requireViewById<View>(R.id.app_info_pill) @@ -760,16 +766,11 @@ class HandleMenu( desktopBtn.isEnabled = !taskInfo.isFreeform desktopBtn.imageTintList = style.windowingButtonColor - val startInsets = if (context.isRtl) iconButtonDrawableInsetsRight - else iconButtonDrawableInsetsLeft - val endInsets = if (context.isRtl) iconButtonDrawableInsetsLeft - else iconButtonDrawableInsetsRight - fullscreenBtn.apply { background = createBackgroundDrawable( color = style.textColor, cornerRadius = iconButtonRippleRadius, - drawableInsets = startInsets + drawableInsets = iconButtonDrawableInsetStart ) } @@ -793,7 +794,7 @@ class HandleMenu( background = createBackgroundDrawable( color = style.textColor, cornerRadius = iconButtonRippleRadius, - drawableInsets = endInsets + drawableInsets = iconButtonDrawableInsetEnd ) } } @@ -843,6 +844,10 @@ class HandleMenu( openByDefaultBtn.apply { isGone = isBrowserApp imageTintList = ColorStateList.valueOf(style.textColor) + background = createBackgroundDrawable( + color = style.textColor, + cornerRadius = iconButtonRippleRadius, + drawableInsets = iconButtonDrawableInsetEnd) } } |