chromium/ui/android/java/res/values/dimens.xml

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2013 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
    <!-- Common text sizes -->
    <dimen name="headline_size">22sp</dimen>
    <dimen name="headline2_size">18sp</dimen>
    <dimen name="text_size_large">16sp</dimen>
    <dimen name="text_size_medium">14sp</dimen>
    <dimen name="text_size_small">12sp</dimen>

    <dimen name="headline_size_leading" tools:ignore="UnusedResources">28sp</dimen>
    <dimen name="headline2_size_leading" tools:ignore="UnusedResources">24sp</dimen>
    <dimen name="text_size_large_leading" tools:ignore="UnusedResources">24sp</dimen>
    <dimen name="text_size_medium_leading" tools:ignore="UnusedResources">20sp</dimen>
    <dimen name="text_size_small_leading" tools:ignore="UnusedResources">16sp</dimen>

    <!-- Common alpha values -->
    <item name="default_enabled_alpha" format="float" type="dimen">1.0</item>
    <item name="default_disabled_alpha" format="float" type="dimen">0.38</item>
    <item name="default_pressed_alpha" format="float" type="dimen">0.06</item>
    <item name="default_focused_hovered_alpha" format="float" type="dimen">0.06</item>
    <item name="default_focused_alpha" format="float" type="dimen">0.06</item>
    <item name="default_hovered_alpha" format="float" type="dimen">0.04</item>
    <item name="default_icon_pressed_alpha" format="float" type="dimen" tools:ignore="UnusedResources">
        0.50
    </item>

    <!-- Minimum height/width for a touchable item -->
    <dimen name="min_touch_target_size">48dp</dimen>

    <!-- Button default measures -->
    <dimen name="button_min_width">88dp</dimen>
    <dimen name="button_bg_vertical_inset">4dp</dimen>
    <dimen name="button_outlined_border_width">1dp</dimen>

    <!-- Menu footer chip measures-->
    <!-- ( listPreferredItemHeightSmall(40dp) - text size(12sp) - top and bottom padding(12dp) ) / 2 -->
    <dimen name="menu_footer_chip_end_padding">8dp</dimen>
    <dimen name="menu_footer_chip_icon_size">16dp</dimen>
    <dimen name="menu_footer_chip_vertical_inset">8dp</dimen>

    <!-- Custom menu-->
    <dimen name="menu_negative_software_vertical_offset">0dp</dimen>

    <!-- Dropdown default measures -->
    <dimen name="dropdown_item_height">50dp</dimen>
    <dimen name="dropdown_item_divider_height">1px</dimen>
    <dimen name="dropdown_item_label_margin">10dp</dimen>
    <dimen name="dropdown_icon_margin">8dp</dimen>
    <dimen name="dropdown_elevation">2dp</dimen>

    <!-- Use arbitrary high number so that if the button text spans multiple
     lines with XL text, the corners will still look fully rounded
     TODO(crbug.com/40770875): Determine the corner radius based on button height-->
    <dimen name="button_compat_corner_radius">500dp</dimen>

    <dimen name="chrome_bullet_gap">12dp</dimen>
    <dimen name="chrome_bullet_leading_offset">1dp</dimen>

    <!-- Divider Dimensions -->
    <dimen name="divider_height">1dp</dimen>
    <dimen name="list_section_divider_padding">8dp</dimen>

    <!-- Drag shadow dimens -->
    <dimen name="drag_shadow_border_corner_radius">8dp</dimen>
    <dimen name="drag_shadow_border_size">1dp</dimen>
    <dimen name="drag_shadow_min_size">48dp</dimen>

    <!-- Misc -->
    <dimen name="default_ripple_background_border_size">0dp</dimen>
    <dimen name="popup_bg_corner_radius">4dp</dimen>

    <!--
         Fallback values if the corresponding com.android.internal.R dimensions
         cannot be retrieved by name.
         Note: Constants taken directly from Android's core/res/values/config.xml.
    -->
    <!-- TODO(crbug.com/40600572): Fix and remove lint ignore -->
    <dimen name="config_min_scaling_span" tools:ignore="InOrMmUsage">12.0mm</dimen>

    <!-- Elevation levels -->
    <dimen name="default_elevation_0">0dp</dimen>
    <dimen name="default_elevation_1">1dp</dimen>
    <dimen name="default_elevation_2">3dp</dimen>
    <dimen name="default_elevation_3">6dp</dimen>
    <dimen name="default_elevation_4">8dp</dimen>
    <dimen name="default_elevation_5">12dp</dimen>
    <dimen name="default_elevation_6">67dp</dimen>
    <!-- TODO(crbug.com/40782657): Remove once dynamic color is ready for all cards -->
    <dimen name="card_elevation">@dimen/default_elevation_1</dimen>

    <dimen name="toast_elevation">@dimen/default_elevation_4</dimen>

    <!-- Arbitrary shadow length for elevation levels -->
    <dimen name="default_shadow_length_elev_2">6dp</dimen>

    <dimen name="default_list_row_padding">16dp</dimen>

    <!-- List menu & item dimensions -->
    <dimen name="list_menu_bg_corner_radius">4dp</dimen>
    <dimen name="list_menu_vertical_padding">8dp</dimen>
    <dimen name="list_menu_width">180dp</dimen>
    <dimen name="list_menu_popup_min_width">112dp</dimen>
    <dimen name="list_menu_popup_max_width">280dp</dimen>
    <dimen name="list_menu_item_icon_size">24dp</dimen>
    <dimen name="list_menu_item_start_icon_end_margin">16dp</dimen>
    <dimen name="list_menu_item_horizontal_padding">12dp</dimen>
    <dimen name="list_menu_item_text_size">14sp</dimen>
    <dimen name="list_menu_elevation">@dimen/default_elevation_2</dimen>
    <dimen name="list_menu_item_min_height">48dp</dimen>

    <!-- Automotive -->
    <item name="automotive_ui_scale_factor" format="float" type="dimen">1.34</item>
</resources>