Commit 58b0c9dc authored by Christian Dullweber's avatar Christian Dullweber Committed by Commit Bot

Use small paddings for PageInfo descriptions

Use 8dp instead of 16dp padding around description text in PageInfo.
Some additional layout changes for PageInfoRow and the connection
view.

Screenshot: https://crbug.com/1077766#c89
Bug: 1077766
Change-Id: I6e0a0d1d530dd2e76ac8685b3e6cfe8bed9fc816
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522080Reviewed-by: default avatarNatalie Chouinard <chouinard@chromium.org>
Reviewed-by: default avatarEhimare Okoyomon <eokoyomon@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826273}
parent 57f97b28
......@@ -56,6 +56,7 @@ android_resources("java_resources") {
"java/res/layout/page_info_container.xml",
"java/res/layout/page_info_permission_row.xml",
"java/res/layout/page_info_row.xml",
"java/res/layout/page_info_summary.xml",
"java/res/layout/page_info_v2.xml",
"java/res/values/colors.xml",
"java/res/values/dimens.xml",
......
......@@ -34,6 +34,7 @@
android:id="@+id/page_info_row_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textAppearance="@style/TextAppearance.TextLarge.Primary" />
<org.chromium.ui.widget.TextViewWithLeading
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<!-- Layout for a preference with only a summary and small top and bottom margins. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingHorizontal="@dimen/page_info_popup_padding_sides"
android:paddingVertical="8dp">
<TextView
android:id="@android:id/summary"
style="@style/PreferenceSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
......@@ -6,10 +6,9 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!-- TODO(crbug.com/1077766): Add link. -->
<org.chromium.components.browser_ui.settings.TextMessagePreference
android:key="cookie_summary"
app:iconSpaceReserved="false"/>
android:layout="@layout/page_info_summary" />
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
android:key="cookie_switch"
......
......@@ -88,11 +88,11 @@ public class ConnectionInfoView implements OnClickListener {
// TODO(crbug.com/1077766): Rename mPaddingWide and mPaddingThin to mPaddingSides and
// mPaddingVertical respectively when cleaning up V2 enabled tags
if (mIsV2Enabled) {
mPaddingWide = (int) context.getResources().getDimension(
mPaddingWide = context.getResources().getDimensionPixelSize(
R.dimen.page_info_popup_padding_sides);
mPaddingThin = (int) context.getResources().getDimension(
mPaddingThin = context.getResources().getDimensionPixelSize(
R.dimen.page_info_popup_padding_vertical);
mContainer.setPadding(mPaddingWide, mPaddingThin, mPaddingThin, 0);
mContainer.setPadding(mPaddingWide, mPaddingThin, mPaddingWide, 0);
} else {
mPaddingWide =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment