chromium/components/browser_ui/widget/android/java/res/values/dimens.xml

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2019 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">
    <!-- Miscellaneous -->
    <dimen name="action_bar_shadow_height">10dp</dimen>
    <dimen name="bottom_sheet_corner_radius">16dp</dimen>
    <dimen name="card_padding">16dp</dimen>
    <dimen name="clear_text_button_end_padding">10dp</dimen>
    <dimen name="default_rounded_corner_radius">8dp</dimen>
    <dimen name="card_rounded_corner_radius">16dp</dimen>
    <dimen name="card_rounded_corner_small_radius">4dp</dimen>
    <dimen name="dialog_corner_radius">24dp</dimen>
    <dimen name="sheet_background_elev">@dimen/default_elevation_0</dimen>

    <!-- DualControlLayout -->
    <dimen name="dual_control_margin_between_items">8dp</dimen>

    <!-- Dialogs -->
    <dimen name="dialog_max_width">600dp</dimen>
    <dimen name="dialog_header_margin">14dp</dimen>
    <dimen name="promo_dialog_illustration_margin">8dp</dimen>
    <dimen name="promo_dialog_illustration_width">150dp</dimen>
    <dimen name="promo_dialog_padding">16dp</dimen>
    <dimen name="promo_dialog_stacked_margin">16dp</dimen>
    <dimen name="promo_dialog_max_content_width">320dp</dimen>
    <dimen name="promo_dialog_min_scrollable_height">100dp</dimen>

    <!-- IphDialog -->
    <dimen name="iph_dialog_height">400dp</dimen>
    <dimen name="iph_dialog_top_margin">24dp</dimen>
    <dimen name="iph_dialog_text_top_margin_landscape">8dp</dimen>
    <dimen name="iph_dialog_text_top_margin_portrait">16dp</dimen>
    <dimen name="iph_dialog_text_side_margin">32dp</dimen>

    <!-- RadioButtonWithDescription -->
    <dimen name="radio_button_with_description_lateral_padding">16dp</dimen>
    <dimen name="radio_button_with_description_vertical_padding">10dp</dimen>
    <dimen name="radio_button_with_description_icon_size">24dp</dimen>

    <!-- RadioButtonWithDescriptionAndAuxButton -->
    <dimen name="radio_button_with_description_and_aux_button_spacing">10dp</dimen>
    <!-- The total width of expand_arrow_with_separator.xml, not used on WebView. -->
    <dimen name="radio_button_with_description_and_aux_button_aux_button_length"
        tools:ignore="UnusedResources">61dp</dimen>

    <!-- Drag-Reorderable List dimensions -->
    <dimen name="list_item_dragged_elevation">6dp</dimen>

    <!-- Modern List Item dimensions -->
    <dimen name="list_item_min_height">64dp</dimen>
    <dimen name="list_item_default_margin">16dp</dimen>
    <dimen name="list_item_start_icon_right_margin">20dp</dimen>
    <dimen name="list_item_start_icon_width">36dp</dimen>
    <dimen name="list_item_end_icon_width">56dp</dimen>
    <dimen name="list_item_start_icon_small_right_margin">16dp</dimen>
    <dimen name="list_item_start_icon_small_width">20dp</dimen>

    <!-- SelectableListLayout dimensions -->
    <dimen name="selectable_list_action_bar_end_padding">6dp</dimen>
    <dimen name="toolbar_wide_display_start_offset">13dp</dimen>
    <dimen name="search_toolbar_modern_bg_vertical_inset">8dp</dimen>
    <dimen name="search_toolbar_modern_bg_horizontal_inset">8dp</dimen>
    <dimen name="selectable_list_toolbar_nav_button_start_offset">4dp</dimen>
    <dimen name="selectable_list_search_icon_end_padding">4dp</dimen>
    <dimen name="selectable_list_toolbar_height">56dp</dimen>

    <!-- Modern toolbar dimensions -->
    <dimen name="modern_toolbar_background_size">40dp</dimen>
    <dimen name="modern_toolbar_tablet_background_size">48dp</dimen>
    <!-- Sometimes the modern toolbar is shown at 48dp so a corner radius of
         24dp is needed to completely round the corners. -->
    <dimen name="modern_toolbar_background_corner_radius">24dp</dimen>
    <!-- The offset is required for the background drawable used by the
         location bar on tablets. -->
    <dimen name="modern_toolbar_background_vertical_offset">4dp</dimen>
    <dimen name="toolbar_text_box_elevation">@dimen/default_elevation_2</dimen>

    <!-- Promo cards dimensions -->
    <dimen name="promo_image_size">24dp</dimen>
    <dimen name="promo_between_text_margin">8dp</dimen>

    <dimen name="promo_compact_padding">12dp</dimen>
    <dimen name="promo_compact_padding_bottom">7dp</dimen>
    <dimen name="promo_compact_header_margin_vertical">11dp</dimen>

    <dimen name="promo_slim_text_margin_horizontal">8dp</dimen>
    <dimen name="promo_slim_button_max_width">84dp</dimen>
    <dimen name="promo_slim_padding_vertical">10dp</dimen>

    <dimen name="promo_large_padding_vertical">8dp</dimen>
    <dimen name="promo_large_padding_horizontal">24dp</dimen>
    <dimen name="promo_large_illustration_margin_bottom">16dp</dimen>
    <dimen name="promo_large_text_group_bottom_margin">10dp</dimen>

    <!-- TextBubble dimensions -->
    <dimen name="text_bubble_margin">4dp</dimen>
    <dimen name="text_bubble_corner_radius">8dp</dimen>
    <dimen name="text_bubble_arrow_width">20dp</dimen>
    <dimen name="text_bubble_arrow_height">10dp</dimen>
    <dimen name="iph_pulse_baseline_radius">16dp</dimen>
    <dimen name="text_bubble_with_snooze_padding_horizontal">24dp</dimen>
    <dimen name="text_bubble_with_snooze_padding_end">4dp</dimen>

    <!-- Swipe gesture listener dimensions -->
    <dimen name="swipe_vertical_drag_threshold">5dp</dimen>
    <dimen name="swipe_horizontal_drag_threshold">10dp</dimen>

    <!-- Query tile dimensions -->
    <dimen name="tile_ideal_width">80dp</dimen>

    <!-- Query tile container dimensions -->
    <dimen name="tile_grid_inter_tile_padding">12dp</dimen>

    <!-- Tile view dimensions -->
    <dimen name="tile_view_width">80dp</dimen>
    <dimen name="tile_view_width_condensed">64dp</dimen>
    <dimen name="tile_view_min_height">86dp</dimen>
    <dimen name="tile_view_icon_size">48dp</dimen>
    <dimen name="tile_view_icon_size_modern">24dp</dimen>
    <!-- QueryTile view dimensions -->
    <dimen name="query_tile_view_width">80dp</dimen>
    <dimen name="query_tile_view_height">80dp</dimen>
    <!-- TODO(crbug.com/40600572): Fix and remove lint ignore -->
    <dimen tools:ignore="PxUsage" name="tile_view_icon_min_size">24px</dimen>
    <dimen name="tile_view_icon_corner_radius">4dp</dimen>
    <dimen name="tile_view_icon_text_size">20dp</dimen>
    <dimen name="tile_view_monogram_size_modern">26dp</dimen>
    <dimen name="tile_view_icon_margin_top_modern">19dp</dimen>
    <dimen name="tile_view_monogram_margin_top_modern">18dp</dimen>
    <dimen name="tile_view_icon_background_margin_top_modern">7dp</dimen>
    <dimen name="tile_view_offline_badge_size_modern">16dp</dimen>
    <dimen name="tile_view_offline_badge_margin_top_modern">7dp</dimen>
    <dimen name="tile_view_offline_badge_margin_end_modern">9dp</dimen>
    <dimen name="tile_view_offline_badge_margin_top_modern_condensed">6dp</dimen>
    <dimen name="tile_view_offline_badge_margin_end_modern_condensed">7dp</dimen>
    <dimen name="tile_view_padding">4dp</dimen>
    <dimen name="tile_view_padding_edge_portrait">12dp</dimen>
    <dimen name="tile_view_padding_landscape">16dp</dimen>
    <dimen name="tile_view_title_margin_top_modern">63dp</dimen>
    <dimen name="tile_view_padding_edge_tablet">20dp</dimen>
    <dimen name="tile_view_padding_interval_tablet">16dp</dimen>

    <!-- Chips default measures -->
    <item name="chip_outline_alpha" format="float" type="dimen">0.8</item>
    <item name="chip_outline_disabled_alpha" format="float" type="dimen">0.12</item>
    <item name="chip_outline_focused_alpha" format="float" type="dimen">1</item>

    <item name="chip_state_layer_hover_alpha_light" format="float" type="dimen">0.08</item>
    <item name="chip_state_layer_hover_alpha_dark" format="float" type="dimen">0.16</item>
    <item name="chip_state_layer_hover_alpha" format="float" type="dimen">@dimen/chip_state_layer_hover_alpha_light</item>
    <item name="chip_state_layer_focused_alpha_light" format="float" type="dimen">0.12</item>
    <item name="chip_state_layer_focused_alpha_dark" format="float" type="dimen">0.24</item>
    <item name="chip_state_layer_focused_alpha" format="float" type="dimen">@dimen/chip_state_layer_focused_alpha_light</item>
    <item name="chip_state_layer_pressed_alpha_light" format="float" type="dimen">0.12</item>
    <item name="chip_state_layer_pressed_alpha_dark" format="float" type="dimen">0.20</item>
    <item name="chip_state_layer_pressed_alpha" format="float" type="dimen">@dimen/chip_state_layer_pressed_alpha_light</item>
    <item name="chip_state_layer_selected_hover_alpha" format="float" type="dimen">0.08</item>
    <item name="chip_state_layer_selected_focused_alpha" format="float" type="dimen">0.12</item>
    <item name="chip_state_layer_selected_pressed_alpha" format="float" type="dimen">0.12</item>

    <dimen name="chip_solid_border_width">0dp</dimen>
    <dimen name="chip_border_width">1dp</dimen>
    <dimen name="chip_corner_radius">8dp</dimen>
    <dimen name="chip_default_height">32dp</dimen>
    <dimen name="chip_end_padding">16dp</dimen>
    <dimen name="chip_reduced_end_padding">12dp</dimen>
    <dimen name="chip_element_leading_padding">8dp</dimen>
    <dimen name="chip_element_extended_leading_padding">16dp</dimen>
    <dimen name="chip_bg_vertical_inset">8dp</dimen>
    <dimen name="chip_loading_view_size">12dp</dimen>
    <dimen name="chip_end_icon_margin_start">8dp</dimen>
    <dimen name="chip_end_icon_extended_margin_start">16dp</dimen>
    <dimen name="chip_end_padding_with_end_icon">6dp</dimen>
    <dimen name="chip_extended_end_padding_with_end_icon">16dp</dimen>
    <dimen name="chip_text_multiline_vertical_padding">12dp</dimen>
    <dimen name="chip_text_reduced_leading_padding">4dp</dimen>
    <!-- ( listPreferredItemHeightSmall(40dp) - text size(12sp) - top and bottom padding(8dp) ) / 2 -->
    <dimen name="menu_chip_vertical_inset">10dp</dimen>

    <!-- Chips layout dimensions -->
    <dimen name="chip_list_chip_spacing">2.5dp</dimen>
    <dimen name="chip_list_side_padding">16dp</dimen>

    <!-- Misc. app menu dimens -->
    <dimen name="app_menu_corner_size">8dp</dimen>
    <dimen name="app_menu_shadow_length">@dimen/default_shadow_length_elev_2</dimen>
    <dimen name="app_menu_elevation">@dimen/default_elevation_2</dimen>

    <!-- Surface color elevations -->
    <dimen name="menu_bg_color_elev">@dimen/default_elevation_0</dimen>
    <dimen name="dialog_elevation">@dimen/default_elevation_0</dimen>

    <!-- Empty view layout dimensions -->
    <dimen name="empty_state_text_width">341dp</dimen>
    <dimen name="empty_state_heading_padding_top">18dp</dimen>
    <dimen name="empty_state_subheading_padding_top">8dp</dimen>

    <!-- New Tab Page -->
    <dimen name="home_surface_background_color_elevation">@dimen/default_elevation_2</dimen>
    <item name="home_surface_search_box_background_alpha" format="float" type="dimen">0.15</item>
    <dimen name="home_surface_ui_background_color_elevation">@dimen/default_elevation_0</dimen>
    <dimen name="home_surface_ui_background_radius">24dp</dimen>
    <dimen name="home_surface_search_box_background_radius">100dp</dimen>

    <!-- Single Tab module -->
    <dimen name="favicon_background_color_elevation">@dimen/default_elevation_0</dimen>
    <dimen name="single_tab_module_tab_thumbnail_size_big">114dp</dimen>

    <!-- Tab Resumption module -->
    <dimen name="tab_resumption_module_icon_background_color_elevation">@dimen/default_elevation_2</dimen>

    <!-- Preference switch -->
    <!-- Work around to adopt the material switch . See crbug/1248590. -->
    <item type="fraction" name="material_switch_scale_fraction">0.8</item>
    <!-- Min height required to satisfy the min touch target size-->
    <dimen name="switch_pre_scale_min_height">60dp</dimen>
    <dimen name="switch_with_text_min_height">@dimen/min_touch_target_size</dimen>

    <!-- Default values for GradientParagraphLoadingIndicator. -->
    <item type="integer" name="loading_text_line_count">3</item>
    <dimen name="loading_text_line_height">14dp</dimen>
    <dimen name="loading_text_line_spacing">6dp</dimen>
    <item type="fraction" format="fraction" name="loading_text_last_line_width_fraction">50%</item>
</resources>