Loading libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_maximize_menu.xml +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ style="?android:attr/buttonBarButtonStyle" android:layout_width="41dp" android:layout_height="@dimen/desktop_mode_maximize_menu_button_height" android:layout_marginRight="4dp" android:layout_marginEnd="4dp" android:background="@drawable/desktop_mode_maximize_menu_button_background" android:importantForAccessibility="yes" android:contentDescription="@string/desktop_mode_maximize_menu_snap_left_button_text" Loading libs/WindowManager/Shell/res/values/dimen.xml +3 −5 Original line number Diff line number Diff line Loading @@ -504,17 +504,15 @@ <dimen name="desktop_mode_maximize_menu_buttons_fill_radius">4dp</dimen> <!-- The padding between the outline and fill of the maximize menu snap and maximize buttons. --> <dimen name="desktop_mode_maximize_menu_snap_and_maximize_buttons_fill_padding">4dp</dimen> <!-- The padding between the outline and fill of the maximize menu snap and maximize buttons. --> <dimen name="desktop_mode_maximize_menu_snap_and_maximize_buttons_fill_padding_bottom">8dp</dimen> <!-- The vertical padding between the outline and fill of the maximize menu restore button. --> <dimen name="desktop_mode_maximize_menu_restore_button_fill_vertical_padding">13dp</dimen> <!-- The horizontal padding between the outline and fill of the maximize menu restore button. --> <dimen name="desktop_mode_maximize_menu_restore_button_fill_horizontal_padding">21dp</dimen> <dimen name="desktop_mode_maximize_menu_restore_button_fill_horizontal_padding">15dp</dimen> <!-- The padding between the outline and fill of the maximize menu immersive button. --> <dimen name="desktop_mode_maximize_menu_immersive_button_fill_padding">4dp</dimen> <dimen name="desktop_mode_maximize_menu_immersive_button_fill_padding">0dp</dimen> <!-- The corner radius of the maximize menu. --> <dimen name="desktop_mode_maximize_menu_corner_radius">8dp</dimen> <dimen name="desktop_mode_maximize_menu_corner_radius">16dp</dimen> <!-- The radius of the Maximize menu shadow. --> <dimen name="desktop_mode_maximize_menu_shadow_radius">8dp</dimen> Loading libs/WindowManager/Shell/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -318,7 +318,7 @@ <!-- Maximize menu maximize button string. --> <string name="desktop_mode_maximize_menu_maximize_text">Maximize Screen</string> <!-- Maximize menu snap buttons string. --> <string name="desktop_mode_maximize_menu_snap_text">Snap Screen</string> <string name="desktop_mode_maximize_menu_snap_text">Resize</string> <!-- Snap resizing non-resizable string. --> <string name="desktop_mode_non_resizable_snap_text">App can\'t be moved here</string> <!-- Accessibility text for the Maximize Menu's immersive button [CHAR LIMIT=NONE] --> Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MaximizeMenu.kt +11 −9 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalViewHo import com.android.wm.shell.windowdecor.common.DecorThemeUtil import com.android.wm.shell.windowdecor.common.OPACITY_12 import com.android.wm.shell.windowdecor.common.OPACITY_40 import com.android.wm.shell.windowdecor.common.OPACITY_60 import com.android.wm.shell.windowdecor.common.withAlpha import java.util.function.Supplier Loading Loading @@ -310,8 +311,6 @@ class MaximizeMenu( .desktop_mode_maximize_menu_immersive_button_fill_padding) private val maximizeFillPaddingDefault = context.resources.getDimensionPixelSize(R.dimen .desktop_mode_maximize_menu_snap_and_maximize_buttons_fill_padding) private val maximizeFillPaddingBottom = context.resources.getDimensionPixelSize(R.dimen .desktop_mode_maximize_menu_snap_and_maximize_buttons_fill_padding_bottom) private val maximizeRestoreFillPaddingVertical = context.resources.getDimensionPixelSize( R.dimen.desktop_mode_maximize_menu_restore_button_fill_vertical_padding) private val maximizeRestoreFillPaddingHorizontal = context.resources.getDimensionPixelSize( Loading @@ -320,7 +319,7 @@ class MaximizeMenu( maximizeFillPaddingDefault, maximizeFillPaddingDefault, maximizeFillPaddingDefault, maximizeFillPaddingBottom maximizeFillPaddingDefault ) private val maximizeRestoreFillPaddingRect = Rect( maximizeRestoreFillPaddingHorizontal, Loading Loading @@ -684,7 +683,7 @@ class MaximizeMenu( inactiveSnapSideColor = colorScheme.outlineVariant.toArgb(), semiActiveSnapSideColor = colorScheme.primary.toArgb().withAlpha(OPACITY_40), activeSnapSideColor = colorScheme.primary.toArgb(), inactiveStrokeColor = colorScheme.outlineVariant.toArgb(), inactiveStrokeColor = colorScheme.outlineVariant.toArgb().withAlpha(OPACITY_60), activeStrokeColor = colorScheme.primary.toArgb(), inactiveBackgroundColor = menuBackgroundColor, activeBackgroundColor = colorScheme.primary.toArgb().withAlpha(OPACITY_12) Loading Loading @@ -753,7 +752,8 @@ class MaximizeMenu( val activeStrokeAndFill = colorScheme.primary.toArgb() val activeBackground = colorScheme.primary.toArgb().withAlpha(OPACITY_12) val activeDrawable = createMaximizeOrImmersiveButtonDrawable( strokeAndFillColor = activeStrokeAndFill, strokeColor = activeStrokeAndFill, fillColor = activeStrokeAndFill, backgroundColor = activeBackground, // Add a mask with the menu background's color because the active background color is // semi transparent, otherwise the transparency will reveal the stroke/fill color Loading @@ -770,7 +770,8 @@ class MaximizeMenu( addState( StateSet.WILD_CARD, createMaximizeOrImmersiveButtonDrawable( strokeAndFillColor = colorScheme.outlineVariant.toArgb(), strokeColor = colorScheme.outlineVariant.toArgb().withAlpha(OPACITY_60), fillColor = colorScheme.outlineVariant.toArgb(), backgroundColor = colorScheme.surfaceContainerLow.toArgb(), backgroundMask = null, // not needed because the bg color is fully opaque fillPadding = fillPadding, Loading @@ -780,7 +781,8 @@ class MaximizeMenu( } private fun createMaximizeOrImmersiveButtonDrawable( @ColorInt strokeAndFillColor: Int, @ColorInt strokeColor: Int, @ColorInt fillColor: Int, @ColorInt backgroundColor: Int, @ColorInt backgroundMask: Int?, fillPadding: Rect, Loading @@ -794,7 +796,7 @@ class MaximizeMenu( null /* inset */, null /* innerRadii */ ) paint.color = strokeAndFillColor paint.color = strokeColor paint.style = Paint.Style.FILL }) // Second layer, a mask for the next (background) layer if needed because of Loading Loading @@ -829,7 +831,7 @@ class MaximizeMenu( null /* inset */, null /* innerRadii */ ) paint.color = strokeAndFillColor paint.color = fillColor paint.style = Paint.Style.FILL }) Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/common/ThemeUtils.kt +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ const val OPACITY_12 = 31 const val OPACITY_15 = 38 const val OPACITY_40 = 102 const val OPACITY_55 = 140 const val OPACITY_60 = 153 const val OPACITY_65 = 166 /** Loading Loading
libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_maximize_menu.xml +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ style="?android:attr/buttonBarButtonStyle" android:layout_width="41dp" android:layout_height="@dimen/desktop_mode_maximize_menu_button_height" android:layout_marginRight="4dp" android:layout_marginEnd="4dp" android:background="@drawable/desktop_mode_maximize_menu_button_background" android:importantForAccessibility="yes" android:contentDescription="@string/desktop_mode_maximize_menu_snap_left_button_text" Loading
libs/WindowManager/Shell/res/values/dimen.xml +3 −5 Original line number Diff line number Diff line Loading @@ -504,17 +504,15 @@ <dimen name="desktop_mode_maximize_menu_buttons_fill_radius">4dp</dimen> <!-- The padding between the outline and fill of the maximize menu snap and maximize buttons. --> <dimen name="desktop_mode_maximize_menu_snap_and_maximize_buttons_fill_padding">4dp</dimen> <!-- The padding between the outline and fill of the maximize menu snap and maximize buttons. --> <dimen name="desktop_mode_maximize_menu_snap_and_maximize_buttons_fill_padding_bottom">8dp</dimen> <!-- The vertical padding between the outline and fill of the maximize menu restore button. --> <dimen name="desktop_mode_maximize_menu_restore_button_fill_vertical_padding">13dp</dimen> <!-- The horizontal padding between the outline and fill of the maximize menu restore button. --> <dimen name="desktop_mode_maximize_menu_restore_button_fill_horizontal_padding">21dp</dimen> <dimen name="desktop_mode_maximize_menu_restore_button_fill_horizontal_padding">15dp</dimen> <!-- The padding between the outline and fill of the maximize menu immersive button. --> <dimen name="desktop_mode_maximize_menu_immersive_button_fill_padding">4dp</dimen> <dimen name="desktop_mode_maximize_menu_immersive_button_fill_padding">0dp</dimen> <!-- The corner radius of the maximize menu. --> <dimen name="desktop_mode_maximize_menu_corner_radius">8dp</dimen> <dimen name="desktop_mode_maximize_menu_corner_radius">16dp</dimen> <!-- The radius of the Maximize menu shadow. --> <dimen name="desktop_mode_maximize_menu_shadow_radius">8dp</dimen> Loading
libs/WindowManager/Shell/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -318,7 +318,7 @@ <!-- Maximize menu maximize button string. --> <string name="desktop_mode_maximize_menu_maximize_text">Maximize Screen</string> <!-- Maximize menu snap buttons string. --> <string name="desktop_mode_maximize_menu_snap_text">Snap Screen</string> <string name="desktop_mode_maximize_menu_snap_text">Resize</string> <!-- Snap resizing non-resizable string. --> <string name="desktop_mode_non_resizable_snap_text">App can\'t be moved here</string> <!-- Accessibility text for the Maximize Menu's immersive button [CHAR LIMIT=NONE] --> Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MaximizeMenu.kt +11 −9 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalViewHo import com.android.wm.shell.windowdecor.common.DecorThemeUtil import com.android.wm.shell.windowdecor.common.OPACITY_12 import com.android.wm.shell.windowdecor.common.OPACITY_40 import com.android.wm.shell.windowdecor.common.OPACITY_60 import com.android.wm.shell.windowdecor.common.withAlpha import java.util.function.Supplier Loading Loading @@ -310,8 +311,6 @@ class MaximizeMenu( .desktop_mode_maximize_menu_immersive_button_fill_padding) private val maximizeFillPaddingDefault = context.resources.getDimensionPixelSize(R.dimen .desktop_mode_maximize_menu_snap_and_maximize_buttons_fill_padding) private val maximizeFillPaddingBottom = context.resources.getDimensionPixelSize(R.dimen .desktop_mode_maximize_menu_snap_and_maximize_buttons_fill_padding_bottom) private val maximizeRestoreFillPaddingVertical = context.resources.getDimensionPixelSize( R.dimen.desktop_mode_maximize_menu_restore_button_fill_vertical_padding) private val maximizeRestoreFillPaddingHorizontal = context.resources.getDimensionPixelSize( Loading @@ -320,7 +319,7 @@ class MaximizeMenu( maximizeFillPaddingDefault, maximizeFillPaddingDefault, maximizeFillPaddingDefault, maximizeFillPaddingBottom maximizeFillPaddingDefault ) private val maximizeRestoreFillPaddingRect = Rect( maximizeRestoreFillPaddingHorizontal, Loading Loading @@ -684,7 +683,7 @@ class MaximizeMenu( inactiveSnapSideColor = colorScheme.outlineVariant.toArgb(), semiActiveSnapSideColor = colorScheme.primary.toArgb().withAlpha(OPACITY_40), activeSnapSideColor = colorScheme.primary.toArgb(), inactiveStrokeColor = colorScheme.outlineVariant.toArgb(), inactiveStrokeColor = colorScheme.outlineVariant.toArgb().withAlpha(OPACITY_60), activeStrokeColor = colorScheme.primary.toArgb(), inactiveBackgroundColor = menuBackgroundColor, activeBackgroundColor = colorScheme.primary.toArgb().withAlpha(OPACITY_12) Loading Loading @@ -753,7 +752,8 @@ class MaximizeMenu( val activeStrokeAndFill = colorScheme.primary.toArgb() val activeBackground = colorScheme.primary.toArgb().withAlpha(OPACITY_12) val activeDrawable = createMaximizeOrImmersiveButtonDrawable( strokeAndFillColor = activeStrokeAndFill, strokeColor = activeStrokeAndFill, fillColor = activeStrokeAndFill, backgroundColor = activeBackground, // Add a mask with the menu background's color because the active background color is // semi transparent, otherwise the transparency will reveal the stroke/fill color Loading @@ -770,7 +770,8 @@ class MaximizeMenu( addState( StateSet.WILD_CARD, createMaximizeOrImmersiveButtonDrawable( strokeAndFillColor = colorScheme.outlineVariant.toArgb(), strokeColor = colorScheme.outlineVariant.toArgb().withAlpha(OPACITY_60), fillColor = colorScheme.outlineVariant.toArgb(), backgroundColor = colorScheme.surfaceContainerLow.toArgb(), backgroundMask = null, // not needed because the bg color is fully opaque fillPadding = fillPadding, Loading @@ -780,7 +781,8 @@ class MaximizeMenu( } private fun createMaximizeOrImmersiveButtonDrawable( @ColorInt strokeAndFillColor: Int, @ColorInt strokeColor: Int, @ColorInt fillColor: Int, @ColorInt backgroundColor: Int, @ColorInt backgroundMask: Int?, fillPadding: Rect, Loading @@ -794,7 +796,7 @@ class MaximizeMenu( null /* inset */, null /* innerRadii */ ) paint.color = strokeAndFillColor paint.color = strokeColor paint.style = Paint.Style.FILL }) // Second layer, a mask for the next (background) layer if needed because of Loading Loading @@ -829,7 +831,7 @@ class MaximizeMenu( null /* inset */, null /* innerRadii */ ) paint.color = strokeAndFillColor paint.color = fillColor paint.style = Paint.Style.FILL }) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/common/ThemeUtils.kt +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ const val OPACITY_12 = 31 const val OPACITY_15 = 38 const val OPACITY_40 = 102 const val OPACITY_55 = 140 const val OPACITY_60 = 153 const val OPACITY_65 = 166 /** Loading