Commit 469fffff authored by Eric Willigers's avatar Eric Willigers Committed by Commit Bot

Desktop PWAs: Minimal UI have round ink drops on hover

The ink drops when hovering were previously nearly square.

We limit the total insets to 4px, to avoid increasing the height
of the web app toolbar on Windows.

TBR=sky@chromium.org

Bug: 1007151
Change-Id: I724592633fd956e039af59af51916705929a0653
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1928375
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: default avatarAlan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718046}
parent 6e9f31ee
...@@ -137,6 +137,7 @@ IN_PROC_BROWSER_TEST_F(WebAppOpaqueBrowserFrameViewTest, StaticTitleBarHeight) { ...@@ -137,6 +137,7 @@ IN_PROC_BROWSER_TEST_F(WebAppOpaqueBrowserFrameViewTest, StaticTitleBarHeight) {
if (!InstallAndLaunchWebApp()) if (!InstallAndLaunchWebApp())
return; return;
opaque_browser_frame_view_->Layout();
const int title_bar_height = GetRestoredTitleBarHeight(); const int title_bar_height = GetRestoredTitleBarHeight();
EXPECT_GT(title_bar_height, 0); EXPECT_GT(title_bar_height, 0);
......
...@@ -105,8 +105,9 @@ int HorizontalPaddingBetweenItems() { ...@@ -105,8 +105,9 @@ int HorizontalPaddingBetweenItems() {
// Insets are kept small to avoid increasing web app frame toolbar height. // Insets are kept small to avoid increasing web app frame toolbar height.
void SetInsetsForWebAppToolbarButton(ToolbarButton* toolbar_button, void SetInsetsForWebAppToolbarButton(ToolbarButton* toolbar_button,
bool is_browser_focus_mode) { bool is_browser_focus_mode) {
toolbar_button->SetLayoutInsets(gfx::Insets());
if (!is_browser_focus_mode) { if (!is_browser_focus_mode) {
toolbar_button->SetLayoutInsets(gfx::Insets(2));
constexpr gfx::Insets kInkDropInsets(2); constexpr gfx::Insets kInkDropInsets(2);
toolbar_button->SetProperty(views::kInternalPaddingKey, kInkDropInsets); toolbar_button->SetProperty(views::kInternalPaddingKey, kInkDropInsets);
} }
......
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