Commit e3a4fe74 authored by Connie Wan's avatar Connie Wan Committed by Commit Bot

Fix tabstrip on Windows with TabScrolling turned on

While the widths of everything were working correctly with the tabstrip, it seems the height was not. This corrects that, and it seems to be a common pattern with other ScrollViews as well.

Bug: 1093529
Change-Id: I31250a62c06c0534c1ab21868df2419313515563
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252633Reviewed-by: default avatarTaylor Bergquist <tbergquist@chromium.org>
Commit-Queue: Connie Wan <connily@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780989}
parent 894f5e79
......@@ -5,6 +5,7 @@
#include "chrome/browser/ui/views/frame/tab_strip_region_view.h"
#include "base/bind.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/ui_features.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/layout/flex_layout.h"
......@@ -32,6 +33,7 @@ TabStrip* TabStripRegionView::AddTabStrip(std::unique_ptr<TabStrip> tab_strip) {
AddChildView(std::make_unique<views::ScrollView>());
tab_strip_scroll_container->SetBackgroundColor(base::nullopt);
tab_strip_scroll_container->SetHideHorizontalScrollBar(true);
tab_strip_scroll_container->ClipHeightTo(0, GetLayoutConstant(TAB_HEIGHT));
tab_strip_container_ = tab_strip_scroll_container;
return tab_strip_scroll_container->SetContents(std::move(tab_strip));
} else {
......
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