Loading libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml +4 −5 Original line number Original line Diff line number Diff line Loading @@ -186,14 +186,13 @@ <ImageButton <ImageButton android:id="@+id/open_by_default_button" android:id="@+id/open_by_default_button" android:layout_width="20dp" android:layout_height="20dp" android:layout_gravity="end|center_vertical" android:layout_gravity="end|center_vertical" android:layout_marginStart="8dp" android:paddingStart="12dp" android:layout_marginEnd="16dp" android:paddingEnd="16dp" android:contentDescription="@string/open_by_default_settings_text" android:contentDescription="@string/open_by_default_settings_text" android:src="@drawable/desktop_mode_ic_handle_menu_open_by_default_settings" 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> </LinearLayout> </LinearLayout> libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +12 −7 Original line number Original line Diff line number Diff line Loading @@ -500,6 +500,12 @@ class HandleMenu( t = iconButtondrawableBaseInset, t = iconButtondrawableBaseInset, b = iconButtondrawableBaseInset, l = 0, r = iconButtondrawableShiftInset 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. // App Info Pill. private val appInfoPill = rootView.requireViewById<View>(R.id.app_info_pill) private val appInfoPill = rootView.requireViewById<View>(R.id.app_info_pill) Loading Loading @@ -760,16 +766,11 @@ class HandleMenu( desktopBtn.isEnabled = !taskInfo.isFreeform desktopBtn.isEnabled = !taskInfo.isFreeform desktopBtn.imageTintList = style.windowingButtonColor desktopBtn.imageTintList = style.windowingButtonColor val startInsets = if (context.isRtl) iconButtonDrawableInsetsRight else iconButtonDrawableInsetsLeft val endInsets = if (context.isRtl) iconButtonDrawableInsetsLeft else iconButtonDrawableInsetsRight fullscreenBtn.apply { fullscreenBtn.apply { background = createBackgroundDrawable( background = createBackgroundDrawable( color = style.textColor, color = style.textColor, cornerRadius = iconButtonRippleRadius, cornerRadius = iconButtonRippleRadius, drawableInsets = startInsets drawableInsets = iconButtonDrawableInsetStart ) ) } } Loading @@ -793,7 +794,7 @@ class HandleMenu( background = createBackgroundDrawable( background = createBackgroundDrawable( color = style.textColor, color = style.textColor, cornerRadius = iconButtonRippleRadius, cornerRadius = iconButtonRippleRadius, drawableInsets = endInsets drawableInsets = iconButtonDrawableInsetEnd ) ) } } } } Loading Loading @@ -843,6 +844,10 @@ class HandleMenu( openByDefaultBtn.apply { openByDefaultBtn.apply { isGone = isBrowserApp isGone = isBrowserApp imageTintList = ColorStateList.valueOf(style.textColor) imageTintList = ColorStateList.valueOf(style.textColor) background = createBackgroundDrawable( color = style.textColor, cornerRadius = iconButtonRippleRadius, drawableInsets = iconButtonDrawableInsetEnd) } } } } Loading Loading
libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml +4 −5 Original line number Original line Diff line number Diff line Loading @@ -186,14 +186,13 @@ <ImageButton <ImageButton android:id="@+id/open_by_default_button" android:id="@+id/open_by_default_button" android:layout_width="20dp" android:layout_height="20dp" android:layout_gravity="end|center_vertical" android:layout_gravity="end|center_vertical" android:layout_marginStart="8dp" android:paddingStart="12dp" android:layout_marginEnd="16dp" android:paddingEnd="16dp" android:contentDescription="@string/open_by_default_settings_text" android:contentDescription="@string/open_by_default_settings_text" android:src="@drawable/desktop_mode_ic_handle_menu_open_by_default_settings" 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> </LinearLayout> </LinearLayout>
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +12 −7 Original line number Original line Diff line number Diff line Loading @@ -500,6 +500,12 @@ class HandleMenu( t = iconButtondrawableBaseInset, t = iconButtondrawableBaseInset, b = iconButtondrawableBaseInset, l = 0, r = iconButtondrawableShiftInset 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. // App Info Pill. private val appInfoPill = rootView.requireViewById<View>(R.id.app_info_pill) private val appInfoPill = rootView.requireViewById<View>(R.id.app_info_pill) Loading Loading @@ -760,16 +766,11 @@ class HandleMenu( desktopBtn.isEnabled = !taskInfo.isFreeform desktopBtn.isEnabled = !taskInfo.isFreeform desktopBtn.imageTintList = style.windowingButtonColor desktopBtn.imageTintList = style.windowingButtonColor val startInsets = if (context.isRtl) iconButtonDrawableInsetsRight else iconButtonDrawableInsetsLeft val endInsets = if (context.isRtl) iconButtonDrawableInsetsLeft else iconButtonDrawableInsetsRight fullscreenBtn.apply { fullscreenBtn.apply { background = createBackgroundDrawable( background = createBackgroundDrawable( color = style.textColor, color = style.textColor, cornerRadius = iconButtonRippleRadius, cornerRadius = iconButtonRippleRadius, drawableInsets = startInsets drawableInsets = iconButtonDrawableInsetStart ) ) } } Loading @@ -793,7 +794,7 @@ class HandleMenu( background = createBackgroundDrawable( background = createBackgroundDrawable( color = style.textColor, color = style.textColor, cornerRadius = iconButtonRippleRadius, cornerRadius = iconButtonRippleRadius, drawableInsets = endInsets drawableInsets = iconButtonDrawableInsetEnd ) ) } } } } Loading Loading @@ -843,6 +844,10 @@ class HandleMenu( openByDefaultBtn.apply { openByDefaultBtn.apply { isGone = isBrowserApp isGone = isBrowserApp imageTintList = ColorStateList.valueOf(style.textColor) imageTintList = ColorStateList.valueOf(style.textColor) background = createBackgroundDrawable( color = style.textColor, cornerRadius = iconButtonRippleRadius, drawableInsets = iconButtonDrawableInsetEnd) } } } } Loading