From f3c70630ff2a14f76338c7e6ed5a451a28e065c7 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Tue, 1 Jul 2025 18:04:43 +0200 Subject: [PATCH] Show NTP at startup: Fix single tab module view --- build/patches/Show-NTP-at-startup.patch | 36 ++++++++++++++++++++----- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/build/patches/Show-NTP-at-startup.patch b/build/patches/Show-NTP-at-startup.patch index 785279b4..d3b0e35c 100644 --- a/build/patches/Show-NTP-at-startup.patch +++ b/build/patches/Show-NTP-at-startup.patch @@ -24,7 +24,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html chrome/browser/sessions/session_restore.cc | 9 ++++- chrome/browser/sessions/tab_loader.cc | 7 ++-- chrome/browser/sessions/tab_loader.h | 2 +- - .../res/layout/single_tab_module_layout.xml | 12 +++---- + .../res/layout/single_tab_module_layout.xml | 17 +++++----- .../SingleTabSwitcherCoordinator.java | 2 +- .../SingleTabSwitcherOnNtpMediator.java | 5 +-- .../show-ntp-at-startup.grdp | 9 +++++ @@ -34,7 +34,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../about_flags_cc/show-ntp-at-startup.inc | 12 +++++++ .../show-ntp-at-startup.inc | 5 +++ .../show-ntp-at-startup.inc | 1 + - 26 files changed, 140 insertions(+), 19 deletions(-) + 26 files changed, 142 insertions(+), 22 deletions(-) create mode 100644 chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/sShowNtpAtStartupAndroid.java create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/show-ntp-at-startup.grdp create mode 100644 cromite_flags/chrome/browser/about_flags_cc/show-ntp-at-startup.inc @@ -361,7 +361,13 @@ diff --git a/chrome/browser/sessions/tab_loader.h b/chrome/browser/sessions/tab_ diff --git a/chrome/browser/single_tab/android/java/res/layout/single_tab_module_layout.xml b/chrome/browser/single_tab/android/java/res/layout/single_tab_module_layout.xml --- a/chrome/browser/single_tab/android/java/res/layout/single_tab_module_layout.xml +++ b/chrome/browser/single_tab/android/java/res/layout/single_tab_module_layout.xml -@@ -72,7 +72,7 @@ found in the LICENSE file. +@@ -67,12 +67,12 @@ found in the LICENSE file. + + ++ android:layout_height="@dimen/single_tab_module_tab_thumbnail_size"> + -@@ -125,21 +125,21 @@ found in the LICENSE file. +@@ -85,8 +85,6 @@ found in the LICENSE file. + android:layout_marginStart="@dimen/single_tab_thumbnail_margin" + android:layout_marginEnd="@dimen/single_tab_thumbnail_margin" + android:layout_alignParentStart="true" +- android:layout_alignParentBottom="true" +- android:layout_alignParentTop="true" + android:adjustViewBounds="false" + android:gravity="center_horizontal" + android:importantForAccessibility="no" +@@ -117,7 +115,7 @@ found in the LICENSE file. +