Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 663723d7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix hover effect on open_by_default_button" into main

parents 6c6dd65f c9f8e2d6
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -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>
+12 −7
Original line number Original line Diff line number Diff line
@@ -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)
@@ -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
                )
                )
            }
            }


@@ -793,7 +794,7 @@ class HandleMenu(
                background = createBackgroundDrawable(
                background = createBackgroundDrawable(
                    color = style.textColor,
                    color = style.textColor,
                    cornerRadius = iconButtonRippleRadius,
                    cornerRadius = iconButtonRippleRadius,
                    drawableInsets = endInsets
                    drawableInsets = iconButtonDrawableInsetEnd
                )
                )
            }
            }
        }
        }
@@ -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)
            }
            }
        }
        }