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

Commit 94247f95 authored by Sukesh Ram's avatar Sukesh Ram
Browse files

Fix Handle Menu Color & Enable NightMode Toggle

Implemented new themes for handle menu of OnSurface (text) and onSurfaceBright (background).

Also implemented theme toggling for menu when night mode is toggled as per spec, by triggering relayout whenever night mode is changed.

Tested by changing night mode setting manually (swipe down and enable Dark Theme). Manually validated new and existing windows’ handle menus as well as the handle menu with close button visible (on full screen)

Test: Manual
Bug: 276785394
Change-Id: I5604eb12325acc1f6d109dbc369a0f62949448ab
parent ddfe003f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -15,7 +15,8 @@
  ~ limitations under the License.
  -->
<shape android:shape="rectangle"
       xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@android:color/white" />
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <corners android:radius="@dimen/desktop_mode_handle_menu_corner_radius" />
    <solid android:color="?androidprv:attr/materialColorSurfaceBright" />
</shape>
+3 −2
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
  ~ limitations under the License.
  -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="@dimen/desktop_mode_handle_menu_width"
    android:layout_height="@dimen/desktop_mode_handle_menu_app_info_pill_height"
@@ -35,7 +36,7 @@
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        tools:text="Gmail"
        android:textColor="@color/desktop_mode_caption_menu_text_color"
        android:textColor="?androidprv:attr/materialColorOnSurface"
        android:textSize="14sp"
        android:textFontWeight="500"
        android:lineHeight="20dp"
@@ -52,6 +53,6 @@
        android:contentDescription="@string/collapse_menu_text"
        android:src="@drawable/ic_baseline_expand_more_24"
        android:rotation="180"
        android:tint="@color/desktop_mode_caption_menu_buttons_color_inactive"
        android:tint="?androidprv:attr/materialColorOnSurface"
        android:background="?android:selectableItemBackgroundBorderless"/>
</LinearLayout>
 No newline at end of file
+4 −4
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
  ~ limitations under the License.
  -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:layout_width="@dimen/desktop_mode_handle_menu_width"
    android:layout_height="@dimen/desktop_mode_handle_menu_more_actions_pill_height"
    android:orientation="vertical"
@@ -25,7 +26,7 @@
        android:contentDescription="@string/screenshot_text"
        android:text="@string/screenshot_text"
        android:drawableStart="@drawable/desktop_mode_ic_handle_menu_screenshot"
        android:drawableTint="@color/desktop_mode_caption_menu_buttons_color_inactive"
        android:drawableTint="?androidprv:attr/materialColorOnSurface"
        style="@style/DesktopModeHandleMenuActionButton"/>

    <Button
@@ -33,15 +34,14 @@
        android:contentDescription="@string/select_text"
        android:text="@string/select_text"
        android:drawableStart="@drawable/desktop_mode_ic_handle_menu_select"
        android:drawableTint="@color/desktop_mode_caption_menu_buttons_color_inactive"
        android:drawableTint="?androidprv:attr/materialColorOnSurface"
        style="@style/DesktopModeHandleMenuActionButton"/>

    <Button
        android:id="@+id/close_button"
        android:contentDescription="@string/close_text"
        android:text="@string/close_text"
        android:drawableStart="@drawable/desktop_mode_ic_handle_menu_close"
        android:drawableTint="@color/desktop_mode_caption_menu_buttons_color_inactive"
        android:drawableTint="?androidprv:attr/materialColorOnSurface"
        style="@style/DesktopModeHandleMenuActionButton"/>

</LinearLayout>
 No newline at end of file
+5 −4
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
  ~ limitations under the License.
  -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:layout_width="@dimen/desktop_mode_handle_menu_width"
    android:layout_height="@dimen/desktop_mode_handle_menu_windowing_pill_height"
    android:orientation="horizontal"
@@ -26,7 +27,7 @@
        android:layout_marginEnd="4dp"
        android:contentDescription="@string/fullscreen_text"
        android:src="@drawable/desktop_mode_ic_handle_menu_fullscreen"
        android:tint="@color/desktop_mode_caption_menu_buttons_color_inactive"
        android:tint="?androidprv:attr/materialColorOnSurface"
        android:layout_weight="1"
        style="@style/DesktopModeHandleMenuWindowingButton"/>

@@ -36,7 +37,7 @@
        android:layout_marginEnd="4dp"
        android:contentDescription="@string/split_screen_text"
        android:src="@drawable/desktop_mode_ic_handle_menu_splitscreen"
        android:tint="@color/desktop_mode_caption_menu_buttons_color_inactive"
        android:tint="?androidprv:attr/materialColorOnSurface"
        android:layout_weight="1"
        style="@style/DesktopModeHandleMenuWindowingButton"/>

@@ -46,7 +47,7 @@
        android:layout_marginEnd="4dp"
        android:contentDescription="@string/float_button_text"
        android:src="@drawable/desktop_mode_ic_handle_menu_floating"
        android:tint="@color/desktop_mode_caption_menu_buttons_color_inactive"
        android:tint="?androidprv:attr/materialColorOnSurface"
        android:layout_weight="1"
        style="@style/DesktopModeHandleMenuWindowingButton"/>

@@ -55,7 +56,7 @@
        android:layout_marginStart="4dp"
        android:contentDescription="@string/desktop_text"
        android:src="@drawable/desktop_mode_ic_handle_menu_desktop"
        android:tint="@color/desktop_mode_caption_menu_buttons_color_active"
        android:tint="?androidprv:attr/materialColorOnSurface"
        android:layout_weight="1"
        style="@style/DesktopModeHandleMenuWindowingButton"/>

+0 −3
Original line number Diff line number Diff line
@@ -68,9 +68,6 @@
    <color name="desktop_mode_caption_maximize_button_dark">#1C1C17</color>
    <color name="desktop_mode_caption_app_name_light">#EFF1F2</color>
    <color name="desktop_mode_caption_app_name_dark">#1C1C17</color>
    <color name="desktop_mode_caption_menu_text_color">#191C1D</color>
    <color name="desktop_mode_caption_menu_buttons_color_inactive">#191C1D</color>
    <color name="desktop_mode_caption_menu_buttons_color_active">#00677E</color>
    <color name="desktop_mode_resize_veil_light">#EFF1F2</color>
    <color name="desktop_mode_resize_veil_dark">#1C1C17</color>
    <color name="desktop_mode_maximize_menu_button">#DDDACD</color>
Loading