Migrate views::Background factory methods to ColorVariant
Bug: b:400775304 Change-Id: I3b74afd8ad610beca5aa646b3d693ccfdc3a20b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6313744 Reviewed-by: Xiyuan Xia <xiyuan@chromium.org> Commit-Queue: Zoraiz Naeem <zoraiznaeem@chromium.org> Cr-Commit-Position: refs/heads/main@{#1427993}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
3f8dd92fec
commit
57c6b11bc6
ash
app_list
views
assistant
ui
main_stage
auth
views
boca
on_task
capture_mode
action_button_container_view.ccaction_button_view.cccapture_label_view.cccapture_mode_bar_view.cccapture_mode_camera_preview_view.cccapture_mode_session.cccapture_mode_settings_view.cccapture_mode_util.ccdisclaimer_view.ccrecording_type_menu_view.ccsearch_results_panel.cc
clipboard
game_dashboard
game_dashboard_button.ccgame_dashboard_main_menu_view.ccgame_dashboard_toolbar_view.ccgame_dashboard_welcome_dialog.cc
glanceables
login
ui
arrow_button_view.ccauth_panel_debug_view.ccdisabled_auth_message_view.cclocal_authentication_request_view.cclock_contents_view.cclock_debug_view.cclocked_tpm_message_view.cclogin_base_bubble_view.cclogin_big_user_view.cclogin_expanded_public_account_view.cclogin_password_view.cclogin_user_view.ccpin_request_view.cc
quick_insert
views
quick_insert_async_preview_image_view.ccquick_insert_badge_view.ccquick_insert_caps_lock_state_view.ccquick_insert_emoji_bar_view.ccquick_insert_feature_tour.ccquick_insert_gif_view.ccquick_insert_item_view.ccquick_insert_main_container_view.ccquick_insert_preview_bubble.ccquick_insert_submenu_view.cc
shelf
style
close_button.cccombobox.ccdrop_down_checkbox.ccerror_message_toast.ccicon_button.ccpill_button.ccrounded_container.ccrounded_label.ccstyle_util.cc
style_viewer
system_dialog_delegate_view.ccsystem_textfield.ccsystem
channel_indicator
focus_mode
holding_space
magic_boost
mahi
network
notification_center
phonehub
pods_overflow_tray.ccpower
toast
system_nudge_view.ccsystem_nudge_view_pixeltest.ccsystem_toast_view.ccsystem_toast_view_pixeltest.cc
unified
feature_tile.ccfeature_tile_pixeltest.ccglanceable_tray_bubble_view.ccglanceable_tray_child_bubble.cc
update
video_conference
wm
desks
float
overview
splitview
tablet_mode
window_cycle
window_restore
informed_restore_app_image_view.ccinformed_restore_contents_view.ccinformed_restore_item_view.ccinformed_restore_items_container_view.ccinformed_restore_items_overflow_view.ccinformed_restore_screenshot_icon_row_view.cc
workspace
chrome/browser
ash
arc
input_overlay
policy
dlp
dialogs
picture_in_picture
ui
ash
editor_menu
input_method
login
magic_boost
quick_answers
toasts
views
autofill
payments
card_unmask_prompt_views.cclocal_card_migration_dialog_view.ccmigratable_card_view.ccpromo_code_label_button.cc
popup
bookmarks
saved_tab_groups
borealis
desktop_capture
desktop_media_content_pane_view.ccdesktop_media_permission_pane_view_mac.mmshare_this_tab_dialog_views.cc
download
extensions
frame
global_media_controls
infobars
intent_picker_bubble_view.ccmahi
media_preview
omnibox
overlay
page_info
passwords
password_change
password_cross_domain_confirmation_popup_view_views.ccpassword_generation_popup_view_views.ccpayments
payment_handler_web_flow_view_controller.ccpayment_request_dialog_view.ccpayment_request_row_view.ccpayment_request_sheet_controller.cc
performance_controls
plus_addresses
profiles
sad_tab_view.ccscreen_capture_notification_ui_views.ccsend_tab_to_self
sharing_hub
side_panel
tabs
fade_footer_view.ccrecent_activity_bubble_dialog_view.cctab_group_editor_bubble_view.cctab_hover_card_bubble_view.cc
task_manager_view.cctoolbar
web_apps
chromeos
ash
components
auth_panel
impl
experiences
arc
compat_mode
components
magic_boost
public
cpp
views
ui
frame
multitask_menu
components/global_media_controls/public/views
content/shell/browser
ui
@ -178,8 +178,8 @@ AppListBubbleView::AppListBubbleView(AppListViewDelegate* view_delegate)
|
||||
chromeos::features::IsSystemBlurEnabled()
|
||||
? cros_tokens::kCrosSysSystemBaseElevated
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(background_color_id,
|
||||
kBubbleCornerRadius));
|
||||
SetBackground(views::CreateRoundedRectBackground(background_color_id,
|
||||
kBubbleCornerRadius));
|
||||
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
kBubbleCornerRadius,
|
||||
|
@ -681,7 +681,7 @@ AppListFolderView::AppListFolderView(AppListFolderController* folder_controller,
|
||||
? cros_tokens::kCrosSysSystemBaseElevated
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
background_view_->SetBackground(
|
||||
views::CreateThemedSolidBackground(background_color_id));
|
||||
views::CreateSolidBackground(background_color_id));
|
||||
background_view_->SetVisible(false);
|
||||
|
||||
animating_background_ = AddChildView(std::make_unique<views::View>());
|
||||
|
@ -226,14 +226,14 @@ AppListToastView::AppListToastView(const std::u16string& title,
|
||||
chromeos::features::IsSystemBlurEnabled()
|
||||
? cros_tokens::kCrosSysSystemBaseElevated
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(background_color_id,
|
||||
kCornerRadius));
|
||||
SetBackground(
|
||||
views::CreateRoundedRectBackground(background_color_id, kCornerRadius));
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
kCornerRadius, views::HighlightBorder::Type::kHighlightBorderNoShadow));
|
||||
} else {
|
||||
const ui::ColorId background_color_id = cros_tokens::kCrosSysSystemOnBase;
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(background_color_id,
|
||||
kCornerRadius));
|
||||
SetBackground(
|
||||
views::CreateRoundedRectBackground(background_color_id, kCornerRadius));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ AppsCollectionSectionView::AppsCollectionSectionView(
|
||||
apps_container_->SetLayoutManager(
|
||||
std::make_unique<SimpleGridLayout>(kAppsPerColumn));
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase, kCornerRadius));
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ AppsCollectionsDismissDialog::AppsCollectionsDismissDialog(
|
||||
SetLayoutManager(std::make_unique<views::BoxLayout>(
|
||||
views::BoxLayout::Orientation::kVertical, kDialogContentInsets));
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysBaseElevated, kDialogRoundedCornerRadius));
|
||||
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
|
@ -122,7 +122,7 @@ ContinueTaskView::ContinueTaskView(AppListViewDelegate* view_delegate,
|
||||
chromeos::features::IsSystemBlurEnabled()
|
||||
? cros_tokens::kCrosSysSystemBaseElevated
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
SetBackground(views::CreateThemedSolidBackground(background_color_id));
|
||||
SetBackground(views::CreateSolidBackground(background_color_id));
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
GetCornerRadius(/*tablet_mode=*/true),
|
||||
views::HighlightBorder::Type::kHighlightBorderNoShadow));
|
||||
|
@ -1837,7 +1837,7 @@ void SearchBoxView::UpdateIphViewVisibility(bool can_show_iph) {
|
||||
|
||||
auto radii = base::i18n::IsRTL() ? kAssistantButtonBackgroundRadiiRTL
|
||||
: kAssistantButtonBackgroundRadiiLTR;
|
||||
assistant_button()->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
assistant_button()->SetBackground(views::CreateRoundedRectBackground(
|
||||
kColorAshControlBackgroundColorInactive, radii));
|
||||
|
||||
auto highlight_path_generator =
|
||||
|
@ -68,7 +68,7 @@ void SearchResultInlineIconView::SetIcon(const gfx::VectorIcon& icon) {
|
||||
? cros_tokens::kCrosSysSystemOnPrimaryContainer
|
||||
: cros_tokens::kCrosSysOnSurface);
|
||||
|
||||
icon_image_->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
icon_image_->SetBackground(views::CreateRoundedRectBackground(
|
||||
use_modified_styling_ ? cros_tokens::kCrosSysSystemPrimaryContainer
|
||||
: cros_tokens::kCrosSysSurface,
|
||||
kContentCornerRadius));
|
||||
@ -105,7 +105,7 @@ void SearchResultInlineIconView::SetText(const std::u16string& text) {
|
||||
label_->SetEnabledColor(use_modified_styling_
|
||||
? cros_tokens::kCrosSysSystemOnPrimaryContainer
|
||||
: cros_tokens::kCrosSysOnSurface);
|
||||
label_->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
label_->SetBackground(views::CreateRoundedRectBackground(
|
||||
use_modified_styling_ ? cros_tokens::kCrosSysSystemPrimaryContainer
|
||||
: cros_tokens::kCrosSysSurface,
|
||||
kContentCornerRadius));
|
||||
|
@ -99,7 +99,7 @@ SearchResultPageView::SearchResultPageView() {
|
||||
chromeos::features::IsSystemBlurEnabled()
|
||||
? static_cast<ui::ColorId>(kColorAshShieldAndBase80)
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
SetBackground(views::CreateThemedSolidBackground(background_color_id));
|
||||
SetBackground(views::CreateSolidBackground(background_color_id));
|
||||
|
||||
if (chromeos::features::IsSystemBlurEnabled()) {
|
||||
layer()->SetFillsBoundsOpaquely(false);
|
||||
|
@ -54,7 +54,7 @@ TopIconAnimationView::TopIconAnimationView(AppsGridView* grid,
|
||||
background_diameter, background_diameter,
|
||||
app_list_config->GetShortcutHostBadgeIconContainerDimension() / 2,
|
||||
background_diameter);
|
||||
icon_background_->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
icon_background_->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBaseOpaque, rounded_corners, 0));
|
||||
}
|
||||
}
|
||||
@ -78,7 +78,7 @@ TopIconAnimationView::TopIconAnimationView(AppsGridView* grid,
|
||||
views::BoxLayout::Orientation::kHorizontal,
|
||||
gfx::Insets(
|
||||
app_list_config->shortcut_host_badge_icon_border_margin())));
|
||||
badge_container_->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
badge_container_->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBaseOpaque,
|
||||
app_list_config->GetShortcutHostBadgeIconContainerDimension() / 2));
|
||||
if (item_in_folder_icon_) {
|
||||
|
@ -198,10 +198,10 @@ LauncherSearchIphView::LauncherSearchIphView(
|
||||
CreateChips(actions_container);
|
||||
|
||||
if (is_in_tablet_mode || location_ == UiLocation::kAssistantPage) {
|
||||
box_layout_view->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
box_layout_view->SetBackground(views::CreateRoundedRectBackground(
|
||||
kColorAshControlBackgroundColorInactive, kBackgroundRadiusTablet));
|
||||
} else {
|
||||
box_layout_view->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
box_layout_view->SetBackground(views::CreateRoundedRectBackground(
|
||||
kColorAshControlBackgroundColorInactive,
|
||||
base::i18n::IsRTL() ? kBackgroundRadiiClamshellRTL
|
||||
: kBackgroundRadiiClamshellLTR));
|
||||
|
@ -117,7 +117,7 @@ ActiveSessionAuthView::ActiveSessionAuthView(const AccountId& account_id,
|
||||
AddVerticalSpace(this, kAuthContainerBottomDistanceDp);
|
||||
|
||||
// Set the background.
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysBaseElevated, kActiveSessionAuthViewCornerRadiusDp));
|
||||
|
||||
// Set the view as a dialog for a11y purposes.
|
||||
|
@ -130,7 +130,7 @@ TEST_F(AuthContainerPixelTest, PasswordOnlyTest) {
|
||||
TEST_F(AuthContainerPixelTest, PinStatusTest) {
|
||||
// For better visibility
|
||||
container_view_->SetBackground(
|
||||
views::CreateThemedSolidBackground(cros_tokens::kCrosSysBaseElevated));
|
||||
views::CreateSolidBackground(cros_tokens::kCrosSysBaseElevated));
|
||||
|
||||
// Turn off the PIN factor availability.
|
||||
test_api_->GetView()->SetHasPin(false);
|
||||
@ -154,7 +154,7 @@ TEST_F(AuthContainerPixelTest, PinStatusTest) {
|
||||
TEST_F(AuthContainerPixelTest, PasswordWithFingerprintTest) {
|
||||
// For better visibility
|
||||
container_view_->SetBackground(
|
||||
views::CreateThemedSolidBackground(cros_tokens::kCrosSysBaseElevated));
|
||||
views::CreateSolidBackground(cros_tokens::kCrosSysBaseElevated));
|
||||
|
||||
test_api_->GetView()->SetHasPin(false);
|
||||
// Turn on the fingerprint factor availability.
|
||||
@ -172,7 +172,7 @@ TEST_F(AuthContainerPixelTest, PasswordWithFingerprintTest) {
|
||||
TEST_F(AuthContainerPixelTest, PasswordAndPinWithFingerprintTest) {
|
||||
// For better visibility
|
||||
container_view_->SetBackground(
|
||||
views::CreateThemedSolidBackground(cros_tokens::kCrosSysBaseElevated));
|
||||
views::CreateSolidBackground(cros_tokens::kCrosSysBaseElevated));
|
||||
|
||||
test_api_->GetView()->SetHasPin(true);
|
||||
// Turn on the fingerprint factor availability.
|
||||
|
@ -62,7 +62,7 @@ class AuthHeaderPixelTest : public AshTestBase {
|
||||
std::unique_ptr<AuthHeaderView> header_view =
|
||||
std::make_unique<AuthHeaderView>(account_id, kTitle, kDescription);
|
||||
|
||||
header_view->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
header_view->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated, 0));
|
||||
|
||||
widget_->SetSize(header_view->GetPreferredSize());
|
||||
|
@ -184,7 +184,7 @@ void AuthInputRowView::CreateAndConfigureInputRow() {
|
||||
|
||||
input_row_ =
|
||||
input_row_container->AddChildView(std::make_unique<views::View>());
|
||||
input_row_->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
input_row_->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase, kInputRowCornerRadiusDp));
|
||||
|
||||
input_row_->SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
|
@ -65,7 +65,7 @@ class InputRowWithPasswordPixelTest : public AshTestBase {
|
||||
|
||||
container_view->SetPreferredSize(gfx::Size({500, 400}));
|
||||
|
||||
container_view->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
container_view->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated, 0));
|
||||
|
||||
auth_input_ =
|
||||
|
@ -63,7 +63,7 @@ class FingerprintViewPixelTest : public AshTestBase {
|
||||
|
||||
container_view->SetPreferredSize(gfx::Size({400, 300}));
|
||||
|
||||
container_view->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
container_view->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated, 0));
|
||||
|
||||
fingerprint_view_ =
|
||||
|
@ -60,7 +60,7 @@ class FingerprintViewUnitTest : public AshTestBase {
|
||||
|
||||
container_view->SetPreferredSize(gfx::Size({400, 300}));
|
||||
|
||||
container_view->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
container_view->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated, 0));
|
||||
|
||||
fingerprint_view_ =
|
||||
|
@ -44,7 +44,7 @@ OnTaskPodView::OnTaskPodView(OnTaskPodController* pod_controller)
|
||||
SetOrientation(views::BoxLayout::Orientation::kHorizontal);
|
||||
SetMainAxisAlignment(views::BoxLayout::MainAxisAlignment::kStart);
|
||||
SetCrossAxisAlignment(views::BoxLayout::CrossAxisAlignment::kStart);
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysPrimaryContainer, kPodBorderRadius));
|
||||
|
||||
AddShortcutButtons();
|
||||
|
@ -95,7 +95,7 @@ ActionButtonContainerView::ErrorView::ErrorView()
|
||||
SetOrientation(views::BoxLayout::Orientation::kHorizontal);
|
||||
SetInsideBorderInsets(kErrorViewBorderInsets);
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated,
|
||||
gfx::RoundedCornersF(kErrorViewCornerRadius)));
|
||||
SetPaintToLayer();
|
||||
|
@ -80,7 +80,7 @@ ActionButtonView::ActionButtonView(views::Button::PressedCallback callback,
|
||||
SetPaintToLayer();
|
||||
layer()->SetFillsBoundsOpaquely(false);
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated, kActionButtonRadius));
|
||||
shadow_->SetRoundedCornerRadius(kActionButtonRadius);
|
||||
capture_mode_util::SetHighlightBorder(
|
||||
|
@ -159,7 +159,7 @@ CaptureLabelView::CaptureLabelView(
|
||||
SetPaintToLayer();
|
||||
layer()->SetFillsBoundsOpaquely(false);
|
||||
|
||||
SetBackground(views::CreateThemedSolidBackground(kColorAshShieldAndBase80));
|
||||
SetBackground(views::CreateSolidBackground(kColorAshShieldAndBase80));
|
||||
layer()->SetRoundedCornerRadius(gfx::RoundedCornersF(kCaptureLabelRadius));
|
||||
layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma);
|
||||
layer()->SetBackdropFilterQuality(ColorProvider::kBackgroundBlurQuality);
|
||||
|
@ -94,7 +94,7 @@ CaptureModeBarView::CaptureModeBarView()
|
||||
: shadow_(SystemShadow::CreateShadowOnTextureLayer(
|
||||
SystemShadow::Type::kElevation12)) {
|
||||
SetPaintToLayer();
|
||||
SetBackground(views::CreateThemedSolidBackground(kColorAshShieldAndBase80));
|
||||
SetBackground(views::CreateSolidBackground(kColorAshShieldAndBase80));
|
||||
|
||||
const int border_radius = capture_mode::kCaptureBarHeight / 2;
|
||||
layer()->SetFillsBoundsOpaquely(false);
|
||||
|
@ -123,7 +123,7 @@ CameraPreviewView::CameraPreviewView(
|
||||
|
||||
resize_button_->SetPaintToLayer();
|
||||
resize_button_->layer()->SetFillsBoundsOpaquely(false);
|
||||
resize_button_->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
resize_button_->SetBackground(views::CreateRoundedRectBackground(
|
||||
kColorAshShieldAndBase80,
|
||||
resize_button_->GetPreferredSize().height() / 2.f));
|
||||
|
||||
|
@ -3038,7 +3038,7 @@ void CaptureModeSession::UpdateDimensionsLabelWidget(bool is_resizing) {
|
||||
|
||||
auto size_label = std::make_unique<views::Label>();
|
||||
size_label->SetEnabledColor(kColorAshTextColorPrimary);
|
||||
size_label->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
size_label->SetBackground(views::CreateRoundedRectBackground(
|
||||
kColorAshShieldAndBase80, kSizeLabelBorderRadius));
|
||||
size_label->SetAutoColorReadabilityEnabled(false);
|
||||
dimensions_label_widget_->SetContentsView(std::move(size_label));
|
||||
|
@ -239,7 +239,7 @@ CaptureModeSettingsView::CaptureModeSettingsView(
|
||||
/*enabled=*/!custom_folder_managed_by_policy);
|
||||
}
|
||||
|
||||
SetBackground(views::CreateThemedSolidBackground(kColorAshShieldAndBase80));
|
||||
SetBackground(views::CreateSolidBackground(kColorAshShieldAndBase80));
|
||||
layer()->SetFillsBoundsOpaquely(false);
|
||||
layer()->SetRoundedCornerRadius(kRoundedCorners);
|
||||
layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma);
|
||||
|
@ -337,7 +337,7 @@ std::unique_ptr<views::View> CreateBannerView() {
|
||||
kBannerIconTextSpacingDip));
|
||||
|
||||
const ui::ColorId background_color_id = cros_tokens::kCrosSysPrimary;
|
||||
banner_view->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
banner_view->SetBackground(views::CreateRoundedRectBackground(
|
||||
background_color_id, kBannerViewTopRadius, kBannerViewBottomRadius));
|
||||
|
||||
views::ImageView* icon =
|
||||
@ -373,7 +373,7 @@ std::unique_ptr<views::View> CreatePlayIconView() {
|
||||
kCaptureModePlayIcon, kColorAshIconColorPrimary, kPlayIconSizeDip));
|
||||
play_view->SetHorizontalAlignment(views::ImageView::Alignment::kCenter);
|
||||
play_view->SetVerticalAlignment(views::ImageView::Alignment::kCenter);
|
||||
play_view->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
play_view->SetBackground(views::CreateRoundedRectBackground(
|
||||
kColorAshShieldAndBase80, kPlayIconBackgroundCornerRadiusDip));
|
||||
return play_view;
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ DisclaimerView::DisclaimerView(
|
||||
SetLayoutManager(std::make_unique<views::BoxLayout>(
|
||||
views::BoxLayout::Orientation::kVertical));
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysDialogContainer, kRadius));
|
||||
SetPaintToLayer();
|
||||
AddChildView(views::Builder<views::ImageView>()
|
||||
|
@ -59,7 +59,7 @@ RecordingTypeMenuView::RecordingTypeMenuView(
|
||||
this,
|
||||
SystemShadow::Type::kElevation12)) {
|
||||
SetPaintToLayer();
|
||||
SetBackground(views::CreateThemedSolidBackground(kColorAshShieldAndBase80));
|
||||
SetBackground(views::CreateSolidBackground(kColorAshShieldAndBase80));
|
||||
layer()->SetFillsBoundsOpaquely(false);
|
||||
layer()->SetRoundedCornerRadius(kRoundedCorners);
|
||||
layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma);
|
||||
|
@ -106,7 +106,7 @@ class SunfishSearchBoxView : public views::View,
|
||||
.SetBorder(nullptr)
|
||||
.Build());
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase1, kSearchBoxRadius));
|
||||
|
||||
SetPreferredSize(gfx::Size(capture_mode::kSearchResultsPanelWebViewWidth,
|
||||
@ -239,7 +239,7 @@ SearchResultsPanel::SearchResultsPanel() {
|
||||
kSearchResultsViewSpacing);
|
||||
}
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated, kPanelCornerRadius));
|
||||
SetPaintToLayer();
|
||||
layer()->SetRoundedCornerRadius(gfx::RoundedCornersF{kPanelCornerRadius});
|
||||
|
@ -195,7 +195,7 @@ void InsertFooterContentV2(
|
||||
|
||||
container->AddChildView(
|
||||
views::Builder<views::BoxLayoutView>()
|
||||
.SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
.SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase1,
|
||||
ClipboardHistoryViews::kFooterContentV2BackgroundCornerRadius))
|
||||
.SetBetweenChildSpacing(
|
||||
|
@ -170,7 +170,7 @@ class ClipboardHistoryBitmapItemView::BitmapContentsView
|
||||
.BuildChildren();
|
||||
|
||||
// Distinguish the image from rest of the menu with a colored background.
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSeparator,
|
||||
ClipboardHistoryViews::kImageBackgroundCornerRadius));
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ void GameDashboardButton::UpdateViews() {
|
||||
kAlphaForButtonBorder)));
|
||||
|
||||
const bool enabled = GetEnabled();
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
enabled ? GetBackgroundEnabledColorId(is_recording_)
|
||||
: cros_tokens::kCrosSysDisabledContainer,
|
||||
container_corner_radius_));
|
||||
|
@ -258,7 +258,7 @@ views::BoxLayout* ConfigureFeatureRowLayout(views::Button* button,
|
||||
views::BoxLayout::CrossAxisAlignment::kCenter);
|
||||
button->SetNotifyEnterExitOnChild(true);
|
||||
button->SetEnabled(enabled);
|
||||
button->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
button->SetBackground(views::CreateRoundedRectBackground(
|
||||
enabled ? cros_tokens::kCrosSysSystemOnBase
|
||||
: cros_tokens::kCrosSysSystemOnBaseOpaque,
|
||||
corners));
|
||||
@ -307,9 +307,9 @@ class FeatureHeader : public views::View {
|
||||
|
||||
// Add icon.
|
||||
icon_view_ = AddChildView(std::make_unique<views::ImageView>());
|
||||
icon_view_->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase,
|
||||
/*radius=*/12.0f));
|
||||
icon_view_->SetBackground(
|
||||
views::CreateRoundedRectBackground(cros_tokens::kCrosSysSystemOnBase,
|
||||
/*radius=*/12.0f));
|
||||
icon_view_->SetBorder(views::CreateEmptyBorder(gfx::Insets::VH(6, 6)));
|
||||
icon_view_->SetProperty(views::kMarginsKey, gfx::Insets::TLBR(0, 0, 0, 16));
|
||||
|
||||
@ -632,7 +632,7 @@ class GameDashboardMainMenuView::GameControlsDetailsRow : public views::Button {
|
||||
}
|
||||
|
||||
void UpdateColors(bool enabled) {
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
enabled ? cros_tokens::kCrosSysSystemOnBase
|
||||
: cros_tokens::kCrosSysSystemOnBaseOpaque,
|
||||
kTopMultiRowCorners));
|
||||
@ -1360,16 +1360,15 @@ void GameDashboardMainMenuView::AddWelcomeDialogSettingsRow() {
|
||||
welcome_settings_container->SetOrientation(
|
||||
views::BoxLayout::Orientation::kHorizontal);
|
||||
welcome_settings_container->SetInsideBorderInsets(gfx::Insets::VH(16, 16));
|
||||
welcome_settings_container->SetBackground(
|
||||
views::CreateThemedRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase, kBubbleCornerRadius));
|
||||
welcome_settings_container->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase, kBubbleCornerRadius));
|
||||
|
||||
// Add icon.
|
||||
auto* icon_container = welcome_settings_container->AddChildView(
|
||||
std::make_unique<views::FlexLayoutView>());
|
||||
icon_container->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase,
|
||||
/*radius=*/12.0f));
|
||||
icon_container->SetBackground(
|
||||
views::CreateRoundedRectBackground(cros_tokens::kCrosSysSystemOnBase,
|
||||
/*radius=*/12.0f));
|
||||
icon_container->SetBorder(views::CreateEmptyBorder(gfx::Insets::VH(6, 6)));
|
||||
icon_container->SetProperty(views::kMarginsKey,
|
||||
gfx::Insets::TLBR(0, 0, 0, 16));
|
||||
|
@ -243,7 +243,7 @@ GameDashboardToolbarView::GameDashboardToolbarView(
|
||||
SetInsideBorderInsets(gfx::Insets::VH(kVerticalInset, kHorizontalInset));
|
||||
SetBetweenChildSpacing(kBetweenChildSpacing);
|
||||
SetCrossAxisAlignment(views::BoxLayout::CrossAxisAlignment::kCenter);
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevatedOpaque, kCornerRadius));
|
||||
SetBorder(views::CreateThemedRoundedRectBorder(
|
||||
1, kCornerRadius, ui::ColorIds::kColorCrosSystemHighlightBorder));
|
||||
|
@ -61,7 +61,7 @@ GameDashboardWelcomeDialog::GameDashboardWelcomeDialog() {
|
||||
SetDefault(views::kMarginsKey, gfx::Insets::TLBR(kRowPadding, 0, 0, 0));
|
||||
SetInteriorMargin(
|
||||
gfx::Insets::VH(kPrimaryLayoutInsideBorder, kPrimaryLayoutInsideBorder));
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevatedOpaque, kDialogCornerRadius));
|
||||
SetBorder(views::CreateThemedRoundedRectBorder(
|
||||
game_dashboard::kWelcomeDialogBorderThickness, kDialogCornerRadius,
|
||||
@ -165,7 +165,7 @@ void GameDashboardWelcomeDialog::AddTitleAndIconRow() {
|
||||
kIconSize)));
|
||||
icon->SetPreferredSize(
|
||||
gfx::Size(kIconBackgroundRadius, kIconBackgroundRadius));
|
||||
icon->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
icon->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysPrimary, kIconBackgroundRadius));
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ void GameDashboardWelcomeDialog::AddShortcutInfoRow() {
|
||||
styled_label->SetText(
|
||||
l10n_util::GetStringFUTF16(IDS_ASH_GAME_DASHBOARD_WELCOME_DIALOG_SHORTCUT,
|
||||
u"", &inline_icon_offset));
|
||||
styled_label->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
styled_label->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase, /*radius=*/16.0f));
|
||||
styled_label->SetBorder(views::CreateEmptyBorder(gfx::Insets::VH(14, 18)));
|
||||
|
||||
|
@ -117,7 +117,7 @@ std::u16string GetFormattedDueTime(const base::Time& due) {
|
||||
|
||||
std::unique_ptr<views::View> BuildIcon() {
|
||||
return views::Builder<views::ImageView>()
|
||||
.SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
.SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase1, kIconViewBackgroundRadius))
|
||||
.SetID(base::to_underlying(GlanceablesViewId::kClassroomItemIcon))
|
||||
.SetImage(ui::ImageModel::FromVectorIcon(
|
||||
|
@ -330,7 +330,7 @@ void GlanceablesTimeManagementBubbleView::RemoveObserver(Observer* observer) {
|
||||
}
|
||||
|
||||
void GlanceablesTimeManagementBubbleView::CreateElevatedBackground() {
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBaseOpaque, 16.f));
|
||||
UpdateInteriorMargin();
|
||||
|
||||
|
@ -195,7 +195,7 @@ void ArrowButtonView::LoadingAnimationDelegate::AnimationProgressed(
|
||||
}
|
||||
|
||||
void ArrowButtonView::SetBackgroundColorId(ui::ColorId color_id) {
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
color_id, GetPreferredSize().width() / 2, 2 * kBorderForFocusRingDp));
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ AuthPanelDebugView::AuthPanelDebugView(const AccountId& account_id,
|
||||
.SetCollapseMargins(false);
|
||||
|
||||
ui::ColorId background_color_id = cros_tokens::kCrosSysSystemBaseElevated;
|
||||
SetBackground(views::CreateThemedSolidBackground(background_color_id));
|
||||
SetBackground(views::CreateSolidBackground(background_color_id));
|
||||
|
||||
if (use_legacy_authpanel) {
|
||||
auto* auth_hub = AuthHub::Get();
|
||||
@ -65,7 +65,7 @@ AuthPanelDebugView::AuthPanelDebugView(const AccountId& account_id,
|
||||
} else {
|
||||
auto* auth_panel = AddChildView(std::make_unique<AuthContainerView>(
|
||||
AuthFactorSet{AuthInputType::kPassword, AuthInputType::kPin}));
|
||||
auth_panel->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
auth_panel->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBase, /*radius=*/8));
|
||||
}
|
||||
}
|
||||
@ -108,7 +108,7 @@ void AuthPanelDebugView::OnUserAuthAttemptConfirmed(
|
||||
base::BindRepeating(&AuthPanelDebugView::OnAuthPanelPreferredSizeChanged,
|
||||
weak_ptr_factory_.GetWeakPtr()),
|
||||
connector));
|
||||
auth_panel->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
auth_panel->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBase, /*radius=*/8));
|
||||
LOG(ERROR) << "auth panel visible: " << auth_panel->GetVisible();
|
||||
LOG(ERROR) << "auth panel visible bounds: "
|
||||
|
@ -166,8 +166,8 @@ DisabledAuthMessageView::DisabledAuthMessageView() {
|
||||
SetPaintToLayer();
|
||||
layer()->SetFillsBoundsOpaquely(false);
|
||||
SetFocusBehavior(FocusBehavior::ALWAYS);
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
kColorAshShieldAndBaseOpaque, kRoundedCornerRadiusDp));
|
||||
SetBackground(views::CreateRoundedRectBackground(kColorAshShieldAndBaseOpaque,
|
||||
kRoundedCornerRadiusDp));
|
||||
|
||||
// The icon size has to be defined later if the image will be visible.
|
||||
message_icon_ = AddChildView(std::make_unique<views::ImageView>());
|
||||
|
@ -168,7 +168,7 @@ LocalAuthenticationRequestView::LocalAuthenticationRequestView(
|
||||
chromeos::features::IsSystemBlurEnabled()
|
||||
? cros_tokens::kCrosSysSystemBaseElevated
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
background_color_id,
|
||||
kLocalAuthenticationRequestViewRoundedCornerRadiusDp));
|
||||
|
||||
|
@ -269,8 +269,8 @@ class UserAddingScreenIndicator : public views::View {
|
||||
layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma);
|
||||
layer()->SetBackdropFilterQuality(ColorProvider::kBackgroundBlurQuality);
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
kColorAshShieldAndBase80, kBubbleBorderRadius));
|
||||
SetBackground(views::CreateRoundedRectBackground(kColorAshShieldAndBase80,
|
||||
kBubbleBorderRadius));
|
||||
}
|
||||
|
||||
UserAddingScreenIndicator(const UserAddingScreenIndicator&) = delete;
|
||||
|
@ -1108,7 +1108,7 @@ void LockDebugView::AuthInputRowView() {
|
||||
|
||||
container_view->SetPreferredSize(gfx::Size({500, 400}));
|
||||
|
||||
container_view->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
container_view->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated, 0));
|
||||
|
||||
container_view->AddChildView(std::make_unique<ash::AuthInputRowView>(
|
||||
|
@ -53,8 +53,8 @@ LockedTpmMessageView::LockedTpmMessageView() {
|
||||
SetPreferredSize(gfx::Size(kWidthDp, kHeightDp));
|
||||
SetFocusBehavior(FocusBehavior::ALWAYS);
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
kColorAshShieldAndBaseOpaque, kRoundedCornerRadiusDp, 0));
|
||||
SetBackground(views::CreateRoundedRectBackground(kColorAshShieldAndBaseOpaque,
|
||||
kRoundedCornerRadiusDp, 0));
|
||||
|
||||
message_icon_ = AddChildView(std::make_unique<views::ImageView>());
|
||||
message_icon_->SetImage(ui::ImageModel::FromVectorIcon(
|
||||
|
@ -156,8 +156,8 @@ LoginBaseBubbleView::LoginBaseBubbleView(base::WeakPtr<views::View> anchor_view,
|
||||
? cros_tokens::kCrosSysSystemBaseElevated
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque);
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(background_color_id,
|
||||
kBubbleBorderRadius));
|
||||
SetBackground(views::CreateRoundedRectBackground(background_color_id,
|
||||
kBubbleBorderRadius));
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
kBubbleBorderRadius,
|
||||
views::HighlightBorder::Type::kHighlightBorderOnShadow));
|
||||
|
@ -130,7 +130,7 @@ void LoginBigUserView::OnWallpaperBlurChanged() {
|
||||
SetPaintToLayer();
|
||||
layer()->SetFillsBoundsOpaquely(false);
|
||||
const ui::ColorId background_color_id = cros_tokens::kCrosSysScrim2;
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
background_color_id, login::kNonBlurredWallpaperBackgroundRadiusDp, 0));
|
||||
}
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ LoginExpandedPublicAccountView::LoginExpandedPublicAccountView(
|
||||
on_dismissed_(on_dismissed),
|
||||
event_handler_(
|
||||
std::make_unique<LoginExpandedPublicAccountEventHandler>(this)) {
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated, kJellyRoundRectCornerRadiusDp));
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
kJellyRoundRectCornerRadiusDp,
|
||||
@ -829,8 +829,7 @@ LoginExpandedPublicAccountView::LoginExpandedPublicAccountView(
|
||||
separator_ = box_layout_view_->AddChildView(std::make_unique<views::View>());
|
||||
const ui::ColorId separator_color_id =
|
||||
static_cast<ui::ColorId>(cros_tokens::kCrosSysSeparator);
|
||||
separator_->SetBackground(
|
||||
views::CreateThemedSolidBackground(separator_color_id));
|
||||
separator_->SetBackground(views::CreateSolidBackground(separator_color_id));
|
||||
|
||||
right_pane_ = new RightPaneView(
|
||||
base::BindRepeating(&LoginExpandedPublicAccountView::ShowWarningDialog,
|
||||
|
@ -153,8 +153,8 @@ class LoginPasswordView::LoginPasswordRow : public views::View {
|
||||
const ui::ColorId background_color =
|
||||
cros_tokens::kCrosSysSystemBaseElevated;
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(background_color,
|
||||
corner_radius));
|
||||
SetBackground(
|
||||
views::CreateRoundedRectBackground(background_color, corner_radius));
|
||||
}
|
||||
|
||||
~LoginPasswordRow() override = default;
|
||||
@ -366,7 +366,7 @@ LoginPasswordView::LoginPasswordView()
|
||||
kJellyPasswordRowCornerRadiusDp,
|
||||
views::HighlightBorder::Type::kHighlightBorderOnShadow));
|
||||
|
||||
password_row_->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
password_row_->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase, kJellyPasswordRowCornerRadiusDp));
|
||||
|
||||
auto layout = std::make_unique<views::BoxLayout>(
|
||||
|
@ -183,7 +183,7 @@ class LoginUserView::UserImage : public NonAccessibleView {
|
||||
std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon(
|
||||
chromeos::kEnterpriseIcon, icon_color_id,
|
||||
icon_size * kIconProportion)));
|
||||
icon_->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
icon_->SetBackground(views::CreateRoundedRectBackground(
|
||||
icon_background_color_id, icon_size / 2));
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ PinRequestView::PinRequestView(PinRequest request, Delegate* delegate)
|
||||
chromeos::features::IsSystemBlurEnabled()
|
||||
? cros_tokens::kCrosSysSystemBaseElevated
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
background_color_id, kPinRequestViewRoundedCornerRadiusDp));
|
||||
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
|
@ -44,7 +44,7 @@ QuickInsertAsyncPreviewImageView::QuickInsertAsyncPreviewImageView(
|
||||
std::move(path),
|
||||
std::move(async_bitmap_resolver),
|
||||
CreateEmptyPlaceholderImageSkiaResolver()) {
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysAppBaseShaded, kCornerRadius));
|
||||
|
||||
// base::Unretained is safe here since `async_preview_subscription_` is a
|
||||
|
@ -42,7 +42,7 @@ QuickInsertBadgeView::QuickInsertBadgeView() {
|
||||
.SetOrientation(views::LayoutOrientation::kHorizontal)
|
||||
.SetMainAxisAlignment(views::LayoutAlignment::kStart)
|
||||
.SetCrossAxisAlignment(views::LayoutAlignment::kCenter)
|
||||
.SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
.SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysHoverOnSubtle, kBadgeCornerRadius))
|
||||
.SetBorder(views::CreateEmptyBorder(kBadgePadding))
|
||||
.AddChildren(
|
||||
|
@ -74,7 +74,7 @@ QuickInsertCapsLockStateView::QuickInsertCapsLockStateView(
|
||||
|
||||
BubbleDialogDelegateView::CreateBubble(this);
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
kQuickInsertContainerBackgroundColor, kQuickInsertContainerBorderRadius));
|
||||
|
||||
caret_bounds.Outset(kArrowGap);
|
||||
|
@ -221,7 +221,7 @@ class GifsButton : public views::LabelButton {
|
||||
}
|
||||
|
||||
void UpdateBackground() {
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
(is_checked_ ? cros_tokens::kCrosSysSystemPrimaryContainer
|
||||
: (GetState() == views::Button::ButtonState::STATE_HOVERED
|
||||
? cros_tokens::kCrosSysHoverOnSubtle
|
||||
@ -270,7 +270,7 @@ QuickInsertEmojiBarView::QuickInsertEmojiBarView(
|
||||
is_gifs_enabled ? IDS_PICKER_EMOJI_BAR_WITH_GIFS_GRID_ACCESSIBLE_NAME
|
||||
: IDS_PICKER_EMOJI_BAR_GRID_ACCESSIBLE_NAME));
|
||||
SetProperty(views::kElementIdentifierKey, kQuickInsertEmojiBarElementId);
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
kQuickInsertContainerBackgroundColor, kQuickInsertContainerBorderRadius));
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
kQuickInsertContainerBorderRadius,
|
||||
|
@ -115,7 +115,7 @@ std::unique_ptr<views::Widget> CreateWidget(
|
||||
.SetCancelCallback(std::move(learn_more_callback))
|
||||
.SetTopContentView(
|
||||
views::Builder<views::ImageView>()
|
||||
.SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
.SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysIlloColor12,
|
||||
kFeatureTourDialogIllustrationCornerRadii))
|
||||
.SetImage(GetIllustration()))
|
||||
|
@ -43,7 +43,7 @@ QuickInsertGifView::QuickInsertGifView(
|
||||
: original_dimensions_(original_dimensions) {
|
||||
// Show a placeholder rect while the gif loads.
|
||||
views::Builder<QuickInsertGifView>(this)
|
||||
.SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
.SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysAppBaseShaded, kQuickInsertGifCornerRadius))
|
||||
.SetImage(ui::ImageModel::FromImageSkia(
|
||||
image_util::CreateEmptyImage(original_dimensions)))
|
||||
|
@ -167,7 +167,7 @@ void QuickInsertItemView::UpdateClipPathForFocusRingWithInsetGap() {
|
||||
void QuickInsertItemView::UpdateBackground() {
|
||||
if (GetState() == views::Button::ButtonState::STATE_HOVERED ||
|
||||
item_state_ == QuickInsertItemView::ItemState::kPseudoFocused) {
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysHoverOnSubtle, corner_radius_));
|
||||
} else {
|
||||
SetBackground(nullptr);
|
||||
|
@ -51,7 +51,7 @@ QuickInsertMainContainerView::QuickInsertMainContainerView() {
|
||||
layer()->SetBackgroundBlur(ColorProvider::kBackgroundBlurSigma);
|
||||
layer()->SetBackdropFilterQuality(ColorProvider::kBackgroundBlurQuality);
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
kQuickInsertContainerBackgroundColor, kQuickInsertContainerBorderRadius));
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
kQuickInsertContainerBorderRadius,
|
||||
|
@ -47,7 +47,7 @@ class RoundedPreviewImageView : public views::ImageView {
|
||||
public:
|
||||
explicit RoundedPreviewImageView(const gfx::Size image_size, int radius) {
|
||||
SetImageSize(image_size);
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSeparator, radius));
|
||||
SkPath mask;
|
||||
mask.addRoundRect(gfx::RectToSkRect(gfx::Rect(image_size)), radius, radius);
|
||||
|
@ -54,7 +54,7 @@ QuickInsertSubmenuView::QuickInsertSubmenuView(
|
||||
/*inside_border_insets=*/kInsets))
|
||||
->set_cross_axis_alignment(
|
||||
views::BoxLayout::CrossAxisAlignment::kStretch);
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
kQuickInsertContainerBackgroundColor, kQuickInsertContainerBorderRadius));
|
||||
|
||||
// Don't allow submenus within submenus.
|
||||
|
@ -233,7 +233,7 @@ class HomeButton::ButtonImageView : public views::View {
|
||||
return;
|
||||
}
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
GetBackgroundColorId(), shelf_config->control_border_radius()));
|
||||
|
||||
if (shelf_config->in_tablet_mode() && !shelf_config->is_in_app()) {
|
||||
|
@ -86,7 +86,7 @@ CloseButton::CloseButton(PressedCallback callback,
|
||||
// Add a rounded rect background. The rounding will be half the button size so
|
||||
// it is a circle.
|
||||
if (!IsFloatingCloseButton(type_)) {
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
background_color_id, GetCloseButtonSize(type_) / 2));
|
||||
}
|
||||
|
||||
|
@ -603,8 +603,8 @@ void Combobox::ShowDropDownMenu() {
|
||||
UpdateExpandedCollapsedAccessibleState();
|
||||
UpdateAccessibleAccessibleActiveDescendantId();
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
kComboboxActiveColorId, kComboboxRoundedCorners));
|
||||
SetBackground(views::CreateRoundedRectBackground(kComboboxActiveColorId,
|
||||
kComboboxRoundedCorners));
|
||||
title_->SetEnabledColor(kActiveTitleAndIconColorId);
|
||||
drop_down_arrow_->SetImage(ui::ImageModel::FromVectorIcon(
|
||||
kDropDownArrowIcon, kActiveTitleAndIconColorId, kArrowIconSize));
|
||||
|
@ -145,8 +145,8 @@ class DropDownCheckbox::MenuView : public views::View {
|
||||
menu_item_group_ =
|
||||
AddChildView(std::make_unique<CheckboxMenuOptionGroup>());
|
||||
UpdateMenuContent();
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
kMenuBackgroundColorId, kMenuRoundedCorners));
|
||||
SetBackground(views::CreateRoundedRectBackground(kMenuBackgroundColorId,
|
||||
kMenuRoundedCorners));
|
||||
// Set border.
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
kMenuRoundedCorners,
|
||||
@ -452,7 +452,7 @@ void DropDownCheckbox::ShowDropDownMenu() {
|
||||
menu_->SetContentsView(std::move(menu_view));
|
||||
menu_->Show();
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
kDropDownCheckboxActiveColorId, kDropDownCheckboxRoundedCorners));
|
||||
title_->SetEnabledColor(kActiveTitleAndIconColorId);
|
||||
drop_down_arrow_->SetImage(ui::ImageModel::FromVectorIcon(
|
||||
|
@ -75,7 +75,7 @@ ErrorMessageToast::ErrorMessageToast(views::Button::PressedCallback callback,
|
||||
SetPaintToLayer();
|
||||
layer()->SetRoundedCornerRadius(
|
||||
gfx::RoundedCornersF(kErrorMessageRoundedCornerRadius));
|
||||
SetBackground(views::CreateThemedSolidBackground(background_color_id));
|
||||
SetBackground(views::CreateSolidBackground(background_color_id));
|
||||
|
||||
const auto* const typography_provider = TypographyProvider::Get();
|
||||
error_message_label_ = AddChildView(
|
||||
|
@ -181,15 +181,15 @@ bool IsProminentFloatingType(IconButton::Type type) {
|
||||
std::unique_ptr<views::Background> CreateThemedBackground(
|
||||
ui::ColorId color_id,
|
||||
IconButton::Type type) {
|
||||
return views::CreateThemedRoundedRectBackground(
|
||||
color_id, GetButtonSizeOnType(type) / 2);
|
||||
return views::CreateRoundedRectBackground(color_id,
|
||||
GetButtonSizeOnType(type) / 2);
|
||||
}
|
||||
|
||||
// Create a solid color fully rounded rect background for icon button.
|
||||
std::unique_ptr<views::Background> CreateSolidBackground(
|
||||
ui::ColorVariant color,
|
||||
IconButton::Type type) {
|
||||
return views::CreateSolidOrThemedRoundedRectBackground(
|
||||
return views::CreateRoundedRectBackground(
|
||||
color, gfx::RoundedCornersF(GetButtonSizeOnType(type) / 2));
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ void PillButton::UpdateBackgroundColor() {
|
||||
if (enable_background_blur_) {
|
||||
blurred_background_->SetColor(background_color);
|
||||
} else {
|
||||
SetBackground(views::CreateSolidOrThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
background_color, gfx::RoundedCornersF(corner_radius)));
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ RoundedContainer::RoundedContainer(Behavior corner_behavior,
|
||||
SetLayoutManager(std::make_unique<views::BoxLayout>(
|
||||
views::BoxLayout::Orientation::kVertical));
|
||||
SetBackground(
|
||||
views::CreateThemedSolidBackground(cros_tokens::kCrosSysSystemOnBase));
|
||||
views::CreateSolidBackground(cros_tokens::kCrosSysSystemOnBase));
|
||||
|
||||
SetBorderInsets(kBorderInsets);
|
||||
|
||||
|
@ -24,7 +24,7 @@ RoundedLabel::RoundedLabel(int horizontal_padding,
|
||||
preferred_height_(preferred_height) {
|
||||
SetBorder(views::CreateEmptyBorder(
|
||||
gfx::Insets::VH(vertical_padding, horizontal_padding)));
|
||||
SetBackground(views::CreateThemedSolidBackground(kColorAshShieldAndBase80));
|
||||
SetBackground(views::CreateSolidBackground(kColorAshShieldAndBase80));
|
||||
SetEnabledColor(kColorAshTextColorPrimary);
|
||||
SetFocusBehavior(views::View::FocusBehavior::ACCESSIBLE_ONLY);
|
||||
SetHorizontalAlignment(gfx::ALIGN_CENTER);
|
||||
|
@ -217,7 +217,7 @@ std::unique_ptr<views::corewm::TooltipViewAura>
|
||||
StyleUtil::CreateAshStyleTooltipView() {
|
||||
auto tooltip_view = std::make_unique<views::corewm::TooltipViewAura>();
|
||||
// Apply ash style background, border, and font.
|
||||
tooltip_view->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
tooltip_view->SetBackground(views::CreateRoundedRectBackground(
|
||||
ui::kColorTooltipBackground, kTooltipRoundedCornerRadius));
|
||||
tooltip_view->SetBorder(views::CreateEmptyBorder(kTooltipBorderInset));
|
||||
tooltip_view->SetFontList(TypographyProvider::Get()->ResolveTypographyToken(
|
||||
|
@ -72,8 +72,8 @@ class SystemUIComponentsStyleViewerClientView : public views::ClientView {
|
||||
// client-view is responsible for rounding the bottom corners.
|
||||
|
||||
const gfx::RoundedCornersF radii(0, 0, corner_radius, corner_radius);
|
||||
contents_view()->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
ui::kColorDialogBackground, radii));
|
||||
contents_view()->SetBackground(
|
||||
views::CreateRoundedRectBackground(ui::kColorDialogBackground, radii));
|
||||
}
|
||||
};
|
||||
|
||||
@ -152,7 +152,7 @@ SystemUIComponentsStyleViewerView::SystemUIComponentsStyleViewerView()
|
||||
AddChildView(std::make_unique<views::ScrollView>())) {
|
||||
SetLayoutManager(std::make_unique<views::BoxLayout>(
|
||||
views::BoxLayout::Orientation::kHorizontal));
|
||||
SetBackground(views::CreateThemedSolidBackground(ui::kColorDialogBackground));
|
||||
SetBackground(views::CreateSolidBackground(ui::kColorDialogBackground));
|
||||
SetBorder(
|
||||
views::CreateEmptyBorder(gfx::Insets::TLBR(0, 0, kBottomSpacing, 0)));
|
||||
|
||||
|
@ -219,8 +219,8 @@ SystemDialogDelegateView::SystemDialogDelegateView() {
|
||||
kRoundedCornerRadius,
|
||||
views::HighlightBorder::Type::kHighlightBorderOnShadow),
|
||||
kBorderInsets));
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(kBackgroundColorId,
|
||||
kRoundedCornerRadius));
|
||||
SetBackground(views::CreateRoundedRectBackground(kBackgroundColorId,
|
||||
kRoundedCornerRadius));
|
||||
|
||||
// Set shadow.
|
||||
shadow_ = SystemShadow::CreateShadowOnNinePatchLayerForView(
|
||||
|
@ -270,7 +270,7 @@ void SystemTextfield::UpdateBackground() {
|
||||
return;
|
||||
}
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
background_color_id_.value_or(cros_tokens::kCrosSysHoverOnSubtle),
|
||||
corner_radius_));
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ void ChannelIndicatorView::OnThemeChanged() {
|
||||
session_manager::SessionState::ACTIVE) {
|
||||
// User is logged in, set image view colors.
|
||||
if (image_view()) {
|
||||
image_view()->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
image_view()->SetBackground(views::CreateRoundedRectBackground(
|
||||
channel_indicator_utils::GetBgColorJelly(channel_),
|
||||
(IsHorizontalAlignment() ? GetLocalBounds().width()
|
||||
: GetLocalBounds().height()) /
|
||||
@ -97,7 +97,7 @@ void ChannelIndicatorView::OnThemeChanged() {
|
||||
|
||||
// User is not logged in, set label colors.
|
||||
if (label()) {
|
||||
label()->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
label()->SetBackground(views::CreateRoundedRectBackground(
|
||||
channel_indicator_utils::GetBgColorJelly(channel_),
|
||||
kIndicatorBgCornerRadius));
|
||||
label()->SetEnabledColor(
|
||||
@ -144,7 +144,7 @@ void ChannelIndicatorView::SetImageOrText() {
|
||||
: gfx::Insets::VH(0, kBorderInset)));
|
||||
image_view()->SetBorder(
|
||||
views::CreateEmptyBorder(gfx::Insets(kIconBackgroundInset)));
|
||||
image_view()->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
image_view()->SetBackground(views::CreateRoundedRectBackground(
|
||||
channel_indicator_utils::GetBgColorJelly(channel_),
|
||||
(IsHorizontalAlignment() ? GetLocalBounds().width()
|
||||
: GetLocalBounds().height()) /
|
||||
@ -173,7 +173,7 @@ void ChannelIndicatorView::SetImageOrText() {
|
||||
SetBorder(views::CreateEmptyBorder(gfx::Insets::VH(kBorderInset, 0)));
|
||||
label()->SetBorder(
|
||||
views::CreateEmptyBorder(gfx::Insets::VH(0, kBorderInset)));
|
||||
label()->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
label()->SetBackground(views::CreateRoundedRectBackground(
|
||||
channel_indicator_utils::GetBgColorJelly(channel_),
|
||||
kIndicatorBgCornerRadius));
|
||||
label()->SetEnabledColor(channel_indicator_utils::GetFgColorJelly(channel_));
|
||||
|
@ -505,7 +505,7 @@ void FocusModeTaskView::UpdateStyle(bool show_selected_state,
|
||||
: kUnselectedStateBoxInsets));
|
||||
textfield_container_->SetBackground(
|
||||
show_selected_state ? nullptr
|
||||
: views::CreateThemedRoundedRectBackground(
|
||||
: views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysInputFieldOnShaded,
|
||||
kTextfieldCornerRadius));
|
||||
|
||||
|
@ -88,7 +88,7 @@ class FocusModeTray::TaskItemView : public views::BoxLayoutView {
|
||||
// Set the background color is not opaque.
|
||||
SetPaintToLayer();
|
||||
layer()->SetFillsBoundsOpaquely(false);
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase, kTaskItemViewCornerRadius));
|
||||
|
||||
const bool is_network_connected = glanceables_util::IsNetworkConnected();
|
||||
|
@ -55,9 +55,8 @@ PlaylistView::PlaylistView(focus_mode_util::SoundType type,
|
||||
// Set the `playlist_image_button_` background color and the opacity for the
|
||||
// initial loading state.
|
||||
SetCanProcessEventsWithinSubtree(false);
|
||||
playlist_image_button_->SetBackground(
|
||||
views::CreateThemedRoundedRectBackground(cros_tokens::kCrosSysOnSurface,
|
||||
kLoadingBackgroundCornerRadius));
|
||||
playlist_image_button_->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysOnSurface, kLoadingBackgroundCornerRadius));
|
||||
playlist_image_button_->SetPaintToLayer();
|
||||
playlist_image_button_->layer()->SetFillsBoundsOpaquely(false);
|
||||
playlist_image_button_->layer()->SetOpacity(kLoadingLayerOpacity);
|
||||
@ -74,7 +73,7 @@ PlaylistView::PlaylistView(focus_mode_util::SoundType type,
|
||||
|
||||
// Set the `title_label_` background color and the opacity for the initial
|
||||
// loading state.
|
||||
title_label_->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
title_label_->SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysOnSurface, kLoadingBackgroundCornerRadius));
|
||||
title_label_->SetPaintToLayer();
|
||||
title_label_->layer()->SetFillsBoundsOpaquely(false);
|
||||
|
@ -126,7 +126,7 @@ HoldingSpaceItemView::HoldingSpaceItemView(HoldingSpaceViewDelegate* delegate,
|
||||
std::u16string(), ax::mojom::DescriptionFrom::kAttributeExplicitlyEmpty);
|
||||
|
||||
// Background.
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase, kHoldingSpaceCornerRadius));
|
||||
|
||||
// Layer.
|
||||
|
@ -210,7 +210,7 @@ void HoldingSpaceTrayChildBubble::Init() {
|
||||
? cros_tokens::kCrosSysSystemBaseElevated
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
|
||||
SetBackground(views::CreateThemedSolidBackground(background_color_id));
|
||||
SetBackground(views::CreateSolidBackground(background_color_id));
|
||||
|
||||
// Border.
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
|
@ -162,7 +162,7 @@ class FilesAppChip : public views::Button {
|
||||
views::FocusRing::Get(this)->SetColorId(ui::kColorAshFocusRing);
|
||||
|
||||
// Background.
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
kColorAshControlBackgroundColorInactive, kFilesAppChipHeight / 2.f));
|
||||
}
|
||||
};
|
||||
|
@ -172,7 +172,7 @@ MagicBoostDisclaimerView::MagicBoostDisclaimerView(
|
||||
.CopyAddressTo(&disclaimer_view)
|
||||
.SetLayoutManager(std::make_unique<views::BoxLayout>(
|
||||
views::BoxLayout::Orientation::kVertical))
|
||||
.SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
.SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysDialogContainer, kRadius))
|
||||
.SetPaintToLayer()
|
||||
.AddChildren(
|
||||
|
@ -510,7 +510,7 @@ MahiPanelView::MahiPanelView(MahiUiController* ui_controller)
|
||||
chromeos::features::IsSystemBlurEnabled()
|
||||
? cros_tokens::kCrosSysSystemBaseElevated
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
background_color_id, mahi_constants::kPanelCornerRadius));
|
||||
|
||||
// Create a layer for the view for background blur and rounded corners.
|
||||
@ -681,7 +681,7 @@ MahiPanelView::MahiPanelView(MahiUiController* ui_controller)
|
||||
.AddChildren(
|
||||
views::Builder<views::FlexLayoutView>()
|
||||
.CopyAddressTo(&ask_question_container)
|
||||
.SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
.SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase,
|
||||
gfx::RoundedCornersF(kAskQuestionContainerCornerRadius)))
|
||||
.SetInteriorMargin(kAskQuestionContainerInteriorMargin)
|
||||
|
@ -120,7 +120,7 @@ views::Builder<views::FlexLayoutView> CreateTextBubbleBuilder(
|
||||
bool is_question) {
|
||||
return views::Builder<views::FlexLayoutView>()
|
||||
.SetInteriorMargin(kTextBubbleInteriorMargin)
|
||||
.SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
.SetBackground(views::CreateRoundedRectBackground(
|
||||
is_question ? cros_tokens::kCrosSysSystemPrimaryContainer
|
||||
: cros_tokens::kCrosSysSystemOnBase,
|
||||
gfx::RoundedCornersF(kTextBubbleCornerRadius)))
|
||||
|
@ -87,7 +87,7 @@ RefreshBannerView::RefreshBannerView(MahiUiController* ui_controller)
|
||||
|
||||
SetUseDefaultFillLayout(true);
|
||||
SetID(mahi_constants::ViewId::kRefreshView);
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemPrimaryContainer, /*radius=*/0));
|
||||
SetVisible(false);
|
||||
|
||||
|
@ -80,8 +80,8 @@ class NetworkFeatureTilePixelTest : public AshTestBase {
|
||||
views::BoxLayout::CrossAxisAlignment::kCenter);
|
||||
// The tile colors have transparency, so set a background color so they
|
||||
// render like in production.
|
||||
contents->SetBackground(views::CreateThemedSolidBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated));
|
||||
contents->SetBackground(
|
||||
views::CreateSolidBackground(cros_tokens::kCrosSysSystemBaseElevated));
|
||||
|
||||
feature_tile_ =
|
||||
widget_->GetContentsView()->AddChildView(std::move(feature_tile));
|
||||
|
@ -163,8 +163,8 @@ std::unique_ptr<views::Background> CreateNotificationBackground(
|
||||
background_radii);
|
||||
}
|
||||
|
||||
return views::CreateThemedRoundedRectBackground(background_color_id,
|
||||
background_radii);
|
||||
return views::CreateRoundedRectBackground(background_color_id,
|
||||
background_radii);
|
||||
}
|
||||
|
||||
void StyleNotificationPopup(message_center::MessageView* notification_view) {
|
||||
|
@ -1406,7 +1406,7 @@ void AshNotificationView::OnThemeChanged() {
|
||||
right_content()->height() - icon_view()->GetImageDrawingSize().height() >
|
||||
kSmallImageBackgroundThreshold)) {
|
||||
icon_view()->set_apply_rounded_corners(false);
|
||||
right_content()->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
right_content()->SetBackground(views::CreateRoundedRectBackground(
|
||||
kColorAshControlBackgroundColorInactive,
|
||||
message_center::kImageCornerRadius));
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ class ConnectionErrorDialogDelegateView : public views::WidgetDelegateView {
|
||||
layer()->SetRoundedCornerRadius(
|
||||
gfx::RoundedCornersF(kDialogRoundedCornerRadius));
|
||||
|
||||
SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
SetBackground(views::CreateRoundedRectBackground(
|
||||
static_cast<ui::ColorId>(cros_tokens::kCrosSysBaseElevated),
|
||||
kDialogRoundedCornerRadius));
|
||||
SetBorder(std::make_unique<views::HighlightBorder>(
|
||||
|
@ -240,8 +240,8 @@ std::unique_ptr<views::View> AppStreamLauncherView::CreateHeaderView() {
|
||||
views::BoxLayout::Orientation::kHorizontal, kHeaderViewInsets,
|
||||
kHeaderChildrenSpacing));
|
||||
|
||||
header->SetBackground(views::CreateThemedSolidBackground(
|
||||
kColorAshControlBackgroundColorInactive));
|
||||
header->SetBackground(
|
||||
views::CreateSolidBackground(kColorAshControlBackgroundColorInactive));
|
||||
|
||||
// Add arrowback button
|
||||
arrow_back_button_ = header->AddChildView(CreateButton(
|
||||
|
@ -558,7 +558,7 @@ std::unique_ptr<views::View> PhoneHubRecentAppsView::GenerateMoreAppsButton() {
|
||||
views::Button::STATE_NORMAL,
|
||||
ui::ImageModel::FromImageSkia(
|
||||
gfx::ImageSkiaOperations::ExtractSubset(image, kMoreAppsButtonArea)));
|
||||
more_apps_button->SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
more_apps_button->SetBackground(views::CreateRoundedRectBackground(
|
||||
kColorAshControlBackgroundColorInactive, kMoreAppsButtonRadius));
|
||||
more_apps_button->SetTooltipText(
|
||||
l10n_util::GetStringUTF16(IDS_ASH_PHONE_HUB_FULL_APPS_LIST_BUTTON_TITLE));
|
||||
|
@ -116,7 +116,7 @@ void PodsOverflowTray::ShowBubble() {
|
||||
pods_container_->AddChildView(
|
||||
views::Builder<views::View>()
|
||||
.SetPreferredSize(gfx::Size(kTrayItemSize, kTrayItemSize))
|
||||
.SetBackground(views::CreateThemedRoundedRectBackground(
|
||||
.SetBackground(views::CreateRoundedRectBackground(
|
||||
cros_tokens::kCrosSysSystemOnBase, kPodsBubbleCornerRadius))
|
||||
.Build());
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ PowerButtonMenuCurtainView::PowerButtonMenuCurtainView() {
|
||||
chromeos::features::IsSystemBlurEnabled()
|
||||
? static_cast<ui::ColorId>(kPowerButtonMenuBackgroundColorId)
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
SetBackground(views::CreateThemedSolidBackground(background_color_id));
|
||||
SetBackground(views::CreateSolidBackground(background_color_id));
|
||||
|
||||
layer()->SetRoundedCornerRadius(
|
||||
gfx::RoundedCornersF(kPowerButtonMenuCornerRadius));
|
||||
|
@ -64,7 +64,7 @@ PowerButtonMenuView::PowerButtonMenuView(
|
||||
kPowerButtonMenuCornerRadius,
|
||||
views::HighlightBorder::Type::kHighlightBorderOnShadow));
|
||||
SetBackground(
|
||||
views::CreateThemedSolidBackground(kPowerButtonMenuBackgroundColorId));
|
||||
views::CreateSolidBackground(kPowerButtonMenuBackgroundColorId));
|
||||
|
||||
layer()->SetRoundedCornerRadius(
|
||||
gfx::RoundedCornersF(kPowerButtonMenuCornerRadius));
|
||||
|
@ -200,7 +200,7 @@ SystemNudgeView::SystemNudgeView(
|
||||
chromeos::features::IsSystemBlurEnabled()
|
||||
? static_cast<ui::ColorId>(kColorAshShieldAndBase80)
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
SetBackground(views::CreateThemedSolidBackground(
|
||||
SetBackground(views::CreateSolidBackground(
|
||||
nudge_data.background_color_id.value_or(default_background_color_id)));
|
||||
SetNotifyEnterExitOnChild(true);
|
||||
SetProperty(views::kElementIdentifierKey, kBubbleIdForTesting);
|
||||
@ -299,8 +299,8 @@ SystemNudgeView::SystemNudgeView(
|
||||
gfx::RoundedCornersF(kImageViewCornerRadius));
|
||||
|
||||
if (nudge_data.image_background_color_id) {
|
||||
image_view->SetBackground(views::CreateThemedSolidBackground(
|
||||
*nudge_data.image_background_color_id));
|
||||
image_view->SetBackground(
|
||||
views::CreateSolidBackground(*nudge_data.image_background_color_id));
|
||||
}
|
||||
|
||||
AddPaddingView(image_and_text_container, kImageViewTrailingPadding,
|
||||
|
@ -54,8 +54,8 @@ class SystemNudgeViewPixelTest : public AshTestBase {
|
||||
views::Builder<views::FlexLayoutView>()
|
||||
.SetMainAxisAlignment(views::LayoutAlignment::kCenter)
|
||||
.SetCrossAxisAlignment(views::LayoutAlignment::kCenter)
|
||||
.SetBackground(views::CreateThemedSolidBackground(
|
||||
cros_tokens::kCrosSysSystemBase))
|
||||
.SetBackground(
|
||||
views::CreateSolidBackground(cros_tokens::kCrosSysSystemBase))
|
||||
.Build());
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ SystemToastView::SystemToastView(const std::u16string& text,
|
||||
chromeos::features::IsSystemBlurEnabled()
|
||||
? static_cast<ui::ColorId>(kColorAshShieldAndBase80)
|
||||
: cros_tokens::kCrosSysSystemBaseElevatedOpaque;
|
||||
SetBackground(views::CreateThemedSolidBackground(background_color_id));
|
||||
SetBackground(views::CreateSolidBackground(background_color_id));
|
||||
SetOrientation(views::LayoutOrientation::kHorizontal);
|
||||
SetCrossAxisAlignment(views::LayoutAlignment::kCenter);
|
||||
|
||||
|
@ -45,7 +45,7 @@ class SystemToastViewPixelTest : public AshTestBase {
|
||||
views::Builder<views::FlexLayoutView>()
|
||||
.SetMainAxisAlignment(views::LayoutAlignment::kCenter)
|
||||
.SetCrossAxisAlignment(views::LayoutAlignment::kCenter)
|
||||
.SetBackground(views::CreateThemedSolidBackground(
|
||||
.SetBackground(views::CreateSolidBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated))
|
||||
.Build());
|
||||
}
|
||||
|
@ -392,8 +392,8 @@ void FeatureTile::UpdateColors() {
|
||||
? std::make_unique<ProgressBackground>(
|
||||
/*progress_color_id=*/cros_tokens::kCrosSysHighlightShape,
|
||||
/*background_color_id=*/background_color)
|
||||
: views::CreateThemedRoundedRectBackground(background_color,
|
||||
corner_radius_));
|
||||
: views::CreateRoundedRectBackground(background_color,
|
||||
corner_radius_));
|
||||
|
||||
auto* ink_drop = views::InkDrop::Get(this);
|
||||
ink_drop->SetBaseColorId(toggled_
|
||||
|
@ -81,8 +81,8 @@ class FeatureTilePixelTest : public AshTestBase {
|
||||
views::BoxLayout::CrossAxisAlignment::kCenter);
|
||||
// The tile colors have transparency, so set a background color so they
|
||||
// render like in production.
|
||||
contents->SetBackground(views::CreateThemedSolidBackground(
|
||||
cros_tokens::kCrosSysSystemBaseElevated));
|
||||
contents->SetBackground(
|
||||
views::CreateSolidBackground(cros_tokens::kCrosSysSystemBaseElevated));
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user