Commit ff070b8e authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Add skeleton code for holding space bubble

Bug: 1111969
Change-Id: I5fafeb1002852d5c584209e4da2bb492b72113fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343006
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796289}
parent 22d56b1a
...@@ -877,6 +877,12 @@ component("ash") { ...@@ -877,6 +877,12 @@ component("ash") {
"system/enterprise/enterprise_domain_observer.h", "system/enterprise/enterprise_domain_observer.h",
"system/gesture_education/gesture_education_notification_controller.cc", "system/gesture_education/gesture_education_notification_controller.cc",
"system/gesture_education/gesture_education_notification_controller.h", "system/gesture_education/gesture_education_notification_controller.h",
"system/holding_space/holding_space_tray.cc",
"system/holding_space/holding_space_tray.h",
"system/holding_space/pinned_files_container.cc",
"system/holding_space/pinned_files_container.h",
"system/holding_space/recent_files_container.cc",
"system/holding_space/recent_files_container.h",
"system/ime/ime_feature_pod_controller.cc", "system/ime/ime_feature_pod_controller.cc",
"system/ime/ime_feature_pod_controller.h", "system/ime/ime_feature_pod_controller.h",
"system/ime/ime_observer.h", "system/ime/ime_observer.h",
......
...@@ -894,6 +894,17 @@ This file contains the strings for ash. ...@@ -894,6 +894,17 @@ This file contains the strings for ash.
Previous menu Previous menu
</message> </message>
<!-- Holding space tray-->
<message name="IDS_ASH_HOLDING_SPACE_PINNED_TITLE" desc="Title of the pinned files area in the holding space bubble.">
Pinned
</message>
<message name="IDS_ASH_HOLDING_SPACE_RECENT_DOWNLOADS_TITLE" desc="Title of the recent downloads area in the holding space bubble.">
Recent downloads
</message>
<message name="IDS_ASH_HOLDING_SPACE_SCREENSHOTS_TITLE" desc="Title of the screenshots area in the holding space bubble.">
Screenshots
</message>
<message name="IDS_ASH_STYLUS_TOOLS_CAPTURE_REGION_ACTION" desc="Title of the capture region action in the stylus tools (a pop-up panel next to the status tray). This causes a partial screenshot to be taken (the user selects an area of the screen to take a screenshot of)."> <message name="IDS_ASH_STYLUS_TOOLS_CAPTURE_REGION_ACTION" desc="Title of the capture region action in the stylus tools (a pop-up panel next to the status tray). This causes a partial screenshot to be taken (the user selects an area of the screen to take a screenshot of).">
Capture region Capture region
</message> </message>
......
85c7fe7a8351346a4e7a66ce9ce589976679acdc
\ No newline at end of file
85c7fe7a8351346a4e7a66ce9ce589976679acdc
\ No newline at end of file
85c7fe7a8351346a4e7a66ce9ce589976679acdc
\ No newline at end of file
amehfooz@chromium.org
\ No newline at end of file
// 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.
#include "ash/system/holding_space/holding_space_tray.h"
#include <memory>
#include "ash/accessibility/accessibility_controller_impl.h"
#include "ash/public/cpp/shelf_config.h"
#include "ash/public/cpp/system_tray_client.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/shelf/shelf.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/holding_space/pinned_files_container.h"
#include "ash/system/holding_space/recent_files_container.h"
#include "ash/system/tray/tray_bubble_wrapper.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_container.h"
#include "ash/system/unified/unified_system_tray_view.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/separator.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/vector_icons.h"
namespace ash {
namespace {
// Padding for tray icon (dp; the button that shows the palette menu).
constexpr int kTrayIconMainAxisInset = 6;
// Width of the holding space bubble itself (dp).
constexpr int kHoldingSpaceWidth = 332;
void SetupChildLayer(views::View* child) {
child->SetPaintToLayer(ui::LAYER_SOLID_COLOR);
auto* layer = child->layer();
layer->SetRoundedCornerRadius(gfx::RoundedCornersF{kUnifiedTrayCornerRadius});
layer->SetColor(UnifiedSystemTrayView::GetBackgroundColor());
layer->SetBackgroundBlur(kUnifiedMenuBackgroundBlur);
layer->SetFillsBoundsOpaquely(false);
layer->SetIsFastRoundedCorner(true);
}
} // namespace
HoldingSpaceTray::HoldingSpaceTray(Shelf* shelf) : TrayBackgroundView(shelf) {
SetLayoutManager(std::make_unique<views::FillLayout>());
icon_ = tray_container()->AddChildView(std::make_unique<views::ImageView>());
icon_->set_tooltip_text(
l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_SCREENSHOTS_TITLE));
icon_->SetImage(CreateVectorIcon(kSystemMenuArrowBackIcon,
ShelfConfig::Get()->shelf_icon_color()));
tray_container()->SetMargin(kTrayIconMainAxisInset, 0);
}
HoldingSpaceTray::~HoldingSpaceTray() {
if (bubble_)
bubble_->bubble_view()->ResetDelegate();
}
bool HoldingSpaceTray::ContainsPointInScreen(const gfx::Point& point) {
if (GetBoundsInScreen().Contains(point))
return true;
return bubble_ && bubble_->bubble_view()->GetBoundsInScreen().Contains(point);
}
void HoldingSpaceTray::ClickedOutsideBubble() {
CloseBubble();
}
base::string16 HoldingSpaceTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_SCREENSHOTS_TITLE);
}
void HoldingSpaceTray::HandleLocaleChange() {
icon_->set_tooltip_text(
l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_SCREENSHOTS_TITLE));
}
void HoldingSpaceTray::HideBubbleWithView(const TrayBubbleView* bubble_view) {}
base::string16 HoldingSpaceTray::GetAccessibleNameForBubble() {
return GetAccessibleNameForTray();
}
bool HoldingSpaceTray::ShouldEnableExtraKeyboardAccessibility() {
return Shell::Get()->accessibility_controller()->spoken_feedback_enabled();
}
void HoldingSpaceTray::HideBubble(const TrayBubbleView* bubble_view) {
CloseBubble();
}
void HoldingSpaceTray::AnchorUpdated() {
if (bubble_)
bubble_->bubble_view()->UpdateBubble();
}
bool HoldingSpaceTray::PerformAction(const ui::Event& event) {
if (bubble_) {
CloseBubble();
return true;
}
ShowBubble(event.IsMouseEvent() || event.IsGestureEvent());
return true;
}
void HoldingSpaceTray::UpdateAfterLoginStatusChange() {
SetVisiblePreferred(true);
PreferredSizeChanged();
}
void HoldingSpaceTray::CloseBubble() {
bubble_.reset();
SetIsActive(false);
}
void HoldingSpaceTray::ShowBubble(bool show_by_click) {
if (bubble_)
return;
DCHECK(tray_container());
TrayBubbleView::InitParams init_params;
init_params.delegate = this;
init_params.parent_window = GetBubbleWindowContainer();
init_params.anchor_view = GetBubbleAnchor();
init_params.shelf_alignment = shelf()->alignment();
init_params.preferred_width = kHoldingSpaceWidth;
init_params.close_on_deactivate = true;
init_params.show_by_click = show_by_click;
init_params.has_shadow = false;
// Create and customize bubble view.
TrayBubbleView* bubble_view = new TrayBubbleView(init_params);
bubble_view->set_anchor_view_insets(GetBubbleAnchorInsets());
// Add pinned files container.
pinned_files_container_ =
bubble_view->AddChildView(std::make_unique<PinnedFilesContainer>());
SetupChildLayer(pinned_files_container_);
// Separator between the two containers, gives illusion of 2 separate bubbles.
auto* separator =
bubble_view->AddChildView(std::make_unique<views::Separator>());
separator->SetBorder(views::CreateEmptyBorder(
gfx::Insets(kHoldingSpaceContainerSeparation, 0, 0, 0)));
recent_files_container_ =
bubble_view->AddChildView(std::make_unique<RecentFilesContainer>());
SetupChildLayer(recent_files_container_);
// Show the bubble.
bubble_ = std::make_unique<TrayBubbleWrapper>(this, bubble_view,
false /* is_persistent */);
// Set bubble frame to be invisible.
bubble_->GetBubbleWidget()->non_client_view()->frame_view()->SetVisible(
false);
SetIsActive(true);
}
TrayBubbleView* HoldingSpaceTray::GetBubbleView() {
return bubble_ ? bubble_->bubble_view() : nullptr;
}
const char* HoldingSpaceTray::GetClassName() const {
return "HoldingSpaceTray";
}
} // namespace ash
// 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.
#ifndef ASH_SYSTEM_HOLDING_SPACE_HOLDING_SPACE_TRAY_H_
#define ASH_SYSTEM_HOLDING_SPACE_HOLDING_SPACE_TRAY_H_
#include <memory>
#include "ash/ash_export.h"
#include "ash/system/tray/tray_background_view.h"
#include "base/memory/weak_ptr.h"
namespace gfx {
class Point;
}
namespace views {
class ImageView;
}
namespace ash {
class PinnedFilesContainer;
class RecentFilesContainer;
class TrayBubbleWrapper;
// The HoldingSpaceTray shows the tray button in the bottom area of the screen.
// This class also controls the lifetime for all of the tools available in the
// palette. HoldingSpaceTray has one instance per-display.
class ASH_EXPORT HoldingSpaceTray : public TrayBackgroundView {
public:
explicit HoldingSpaceTray(Shelf* shelf);
HoldingSpaceTray(const HoldingSpaceTray& other) = delete;
HoldingSpaceTray& operator=(const HoldingSpaceTray& other) = delete;
~HoldingSpaceTray() override;
// Returns true if the tray contains the given point. This is useful
// for determining if an event should be propagated through to the palette.
bool ContainsPointInScreen(const gfx::Point& point);
// TrayBackgroundView:
void ClickedOutsideBubble() override;
base::string16 GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
void AnchorUpdated() override;
void UpdateAfterLoginStatusChange() override;
bool PerformAction(const ui::Event& event) override;
void CloseBubble() override;
void ShowBubble(bool show_by_click) override;
TrayBubbleView* GetBubbleView() override;
const char* GetClassName() const override;
private:
// TrayBubbleView::Delegate:
base::string16 GetAccessibleNameForBubble() override;
bool ShouldEnableExtraKeyboardAccessibility() override;
void HideBubble(const TrayBubbleView* bubble_view) override;
std::unique_ptr<TrayBubbleWrapper> bubble_;
PinnedFilesContainer* pinned_files_container_ = nullptr;
RecentFilesContainer* recent_files_container_ = nullptr;
// Weak pointer, will be parented by TrayContainer for its lifetime.
views::ImageView* icon_ = nullptr;
base::WeakPtrFactory<HoldingSpaceTray> weak_factory_{this};
};
} // namespace ash
#endif // ASH_SYSTEM_HOLDING_SPACE_HOLDING_SPACE_TRAY_H_
// 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.
#include "ash/system/holding_space/pinned_files_container.h"
#include <memory>
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_popup_item_style.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/border.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/separator.h"
#include "ui/views/layout/box_layout.h"
namespace ash {
PinnedFilesContainer::PinnedFilesContainer() {
SetLayoutManager(std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kVertical, kHoldingSpaceContainerPadding));
auto* title_label = AddChildView(std::make_unique<views::Label>(
l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_PINNED_TITLE)));
TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::HOLDING_SPACE_TITLE,
true /* use_unified_theme */);
style.SetupLabel(title_label);
title_label->SetPaintToLayer();
title_label->layer()->SetFillsBoundsOpaquely(false);
auto* separator = AddChildView(std::make_unique<views::Separator>());
separator->SetBorder(views::CreateEmptyBorder(72, 0, 0, 0));
}
PinnedFilesContainer::~PinnedFilesContainer() = default;
const char* PinnedFilesContainer::GetClassName() const {
return "PinnedFilesContainer";
}
} // namespace ash
\ No newline at end of file
// 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.
#ifndef ASH_SYSTEM_HOLDING_SPACE_PINNED_FILES_CONTAINER_H_
#define ASH_SYSTEM_HOLDING_SPACE_PINNED_FILES_CONTAINER_H_
#include "ui/views/view.h"
namespace ash {
// Container for pinned files that the user adds to the holding space bubble.
class PinnedFilesContainer : public views::View {
public:
PinnedFilesContainer();
PinnedFilesContainer(const PinnedFilesContainer& other) = delete;
PinnedFilesContainer& operator=(const PinnedFilesContainer& other) = delete;
~PinnedFilesContainer() override;
// views::View:
const char* GetClassName() const override;
};
} // namespace ash
#endif // ASH_SYSTEM_HOLDING_SPACE_PINNED_FILES_CONTAINER_H_
\ No newline at end of file
// 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.
#include "ash/system/holding_space/recent_files_container.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_popup_item_style.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/border.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/separator.h"
#include "ui/views/layout/box_layout.h"
namespace ash {
RecentFilesContainer::RecentFilesContainer() {
SetLayoutManager(std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kVertical, kHoldingSpaceContainerPadding));
auto setup_layered_child = [](views::View* child) {
child->SetPaintToLayer();
child->layer()->SetFillsBoundsOpaquely(false);
};
auto* screenshots_label = AddChildView(std::make_unique<views::Label>(
l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_SCREENSHOTS_TITLE)));
setup_layered_child(screenshots_label);
TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::HOLDING_SPACE_TITLE,
true /* use_unified_theme */);
style.SetupLabel(screenshots_label);
auto* screenshots_separator =
AddChildView(std::make_unique<views::Separator>());
screenshots_separator->SetBorder(views::CreateEmptyBorder(72, 0, 0, 0));
auto* recent_downloads_label = AddChildView(std::make_unique<views::Label>(
l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_RECENT_DOWNLOADS_TITLE)));
setup_layered_child(recent_downloads_label);
style.SetupLabel(recent_downloads_label);
auto* recent_downloads_separator =
AddChildView(std::make_unique<views::Separator>());
recent_downloads_separator->SetBorder(views::CreateEmptyBorder(48, 0, 0, 0));
}
RecentFilesContainer::~RecentFilesContainer() = default;
const char* RecentFilesContainer::GetClassName() const {
return "RecentFilesContainer";
}
} // namespace ash
\ No newline at end of file
// 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.
#ifndef ASH_SYSTEM_HOLDING_SPACE_RECENT_FILES_CONTAINER_H_
#define ASH_SYSTEM_HOLDING_SPACE_RECENT_FILES_CONTAINER_H_
#include "ui/views/view.h"
namespace ash {
// Container for the recent files (Screenshots, downloads etc).
class RecentFilesContainer : public views::View {
public:
RecentFilesContainer();
RecentFilesContainer(const RecentFilesContainer& other) = delete;
RecentFilesContainer& operator=(const RecentFilesContainer& other) = delete;
~RecentFilesContainer() override;
// views::View:
const char* GetClassName() const override;
};
} // namespace ash
#endif // ASH_SYSTEM_HOLDING_SPACE_RECENT_FILES_CONTAINER_H_
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "ash/system/status_area_widget.h" #include "ash/system/status_area_widget.h"
#include "ash/keyboard/ui/keyboard_ui_controller.h" #include "ash/keyboard/ui/keyboard_ui_controller.h"
#include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/ash_switches.h" #include "ash/public/cpp/ash_switches.h"
#include "ash/public/cpp/shelf_config.h" #include "ash/public/cpp/shelf_config.h"
#include "ash/session/session_controller_impl.h" #include "ash/session/session_controller_impl.h"
...@@ -14,6 +15,7 @@ ...@@ -14,6 +15,7 @@
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/system/accessibility/dictation_button_tray.h" #include "ash/system/accessibility/dictation_button_tray.h"
#include "ash/system/accessibility/select_to_speak_tray.h" #include "ash/system/accessibility/select_to_speak_tray.h"
#include "ash/system/holding_space/holding_space_tray.h"
#include "ash/system/ime_menu/ime_menu_tray.h" #include "ash/system/ime_menu/ime_menu_tray.h"
#include "ash/system/overview/overview_button_tray.h" #include "ash/system/overview/overview_button_tray.h"
#include "ash/system/palette/palette_tray.h" #include "ash/system/palette/palette_tray.h"
...@@ -82,6 +84,11 @@ void StatusAreaWidget::Initialize() { ...@@ -82,6 +84,11 @@ void StatusAreaWidget::Initialize() {
std::make_unique<StatusAreaOverflowButtonTray>(shelf_); std::make_unique<StatusAreaOverflowButtonTray>(shelf_);
AddTrayButton(overflow_button_tray_.get()); AddTrayButton(overflow_button_tray_.get());
if (features::IsTemporaryHoldingSpaceEnabled()) {
holding_space_tray_ = std::make_unique<HoldingSpaceTray>(shelf_);
AddTrayButton(holding_space_tray_.get());
}
logout_button_tray_ = std::make_unique<LogoutButtonTray>(shelf_); logout_button_tray_ = std::make_unique<LogoutButtonTray>(shelf_);
AddTrayButton(logout_button_tray_.get()); AddTrayButton(logout_button_tray_.get());
......
...@@ -19,6 +19,7 @@ class Window; ...@@ -19,6 +19,7 @@ class Window;
} }
namespace ash { namespace ash {
class HoldingSpaceTray;
class ImeMenuTray; class ImeMenuTray;
class LogoutButtonTray; class LogoutButtonTray;
class StatusAreaOverflowButtonTray; class StatusAreaOverflowButtonTray;
...@@ -115,6 +116,8 @@ class ASH_EXPORT StatusAreaWidget : public SessionObserver, ...@@ -115,6 +116,8 @@ class ASH_EXPORT StatusAreaWidget : public SessionObserver,
} }
PaletteTray* palette_tray() { return palette_tray_.get(); } PaletteTray* palette_tray() { return palette_tray_.get(); }
ImeMenuTray* ime_menu_tray() { return ime_menu_tray_.get(); } ImeMenuTray* ime_menu_tray() { return ime_menu_tray_.get(); }
HoldingSpaceTray* holding_space_tray() { return holding_space_tray_.get(); }
SelectToSpeakTray* select_to_speak_tray() { SelectToSpeakTray* select_to_speak_tray() {
return select_to_speak_tray_.get(); return select_to_speak_tray_.get();
} }
...@@ -211,6 +214,7 @@ class ASH_EXPORT StatusAreaWidget : public SessionObserver, ...@@ -211,6 +214,7 @@ class ASH_EXPORT StatusAreaWidget : public SessionObserver,
std::unique_ptr<VirtualKeyboardTray> virtual_keyboard_tray_; std::unique_ptr<VirtualKeyboardTray> virtual_keyboard_tray_;
std::unique_ptr<ImeMenuTray> ime_menu_tray_; std::unique_ptr<ImeMenuTray> ime_menu_tray_;
std::unique_ptr<SelectToSpeakTray> select_to_speak_tray_; std::unique_ptr<SelectToSpeakTray> select_to_speak_tray_;
std::unique_ptr<HoldingSpaceTray> holding_space_tray_;
// Vector of the tray buttons above. The ordering is used to determine which // Vector of the tray buttons above. The ordering is used to determine which
// tray buttons are hidden when they overflow the available width. // tray buttons are hidden when they overflow the available width.
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "ui/aura/env.h" #include "ui/aura/env.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/compositor/layer.h" #include "ui/compositor/layer.h"
#include "ui/compositor/layer_type.h"
#include "ui/events/event.h" #include "ui/events/event.h"
#include "ui/gfx/canvas.h" #include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h" #include "ui/gfx/color_palette.h"
...@@ -255,7 +256,7 @@ TrayBubbleView::TrayBubbleView(const InitParams& init_params) ...@@ -255,7 +256,7 @@ TrayBubbleView::TrayBubbleView(const InitParams& init_params)
// Create a layer so that the layer for FocusRing stays in this view's // Create a layer so that the layer for FocusRing stays in this view's
// layer. Without it, the layer for FocusRing goes above the // layer. Without it, the layer for FocusRing goes above the
// NativeViewHost and may steal events. // NativeViewHost and may steal events.
SetPaintToLayer(); SetPaintToLayer(ui::LAYER_NOT_DRAWN);
} }
auto layout = std::make_unique<BottomAlignedBoxLayout>(this); auto layout = std::make_unique<BottomAlignedBoxLayout>(this);
......
...@@ -230,6 +230,10 @@ constexpr int kPrivacyScreenToastSubLabelFontSize = 13; ...@@ -230,6 +230,10 @@ constexpr int kPrivacyScreenToastSubLabelFontSize = 13;
constexpr gfx::Insets kPrivacyScreenToastInsets(10, 16); constexpr gfx::Insets kPrivacyScreenToastInsets(10, 16);
constexpr int kPrivacyScreenToastSpacing = 16; constexpr int kPrivacyScreenToastSpacing = 16;
// constants used for holding space tray.
constexpr gfx::Insets kHoldingSpaceContainerPadding = gfx::Insets(16);
constexpr int kHoldingSpaceContainerSeparation = 8;
} // namespace ash } // namespace ash
#endif // ASH_SYSTEM_TRAY_TRAY_CONSTANTS_H_ #endif // ASH_SYSTEM_TRAY_TRAY_CONSTANTS_H_
...@@ -119,6 +119,11 @@ void TrayPopupItemStyle::SetupLabel(views::Label* label) const { ...@@ -119,6 +119,11 @@ void TrayPopupItemStyle::SetupLabel(views::Label* label) const {
label->SetFontList(base_font_list.Derive(0, gfx::Font::NORMAL, label->SetFontList(base_font_list.Derive(0, gfx::Font::NORMAL,
gfx::Font::Weight::NORMAL)); gfx::Font::Weight::NORMAL));
break; break;
case FontStyle::HOLDING_SPACE_TITLE:
label->SetFontList(base_font_list.Derive(3, gfx::Font::NORMAL,
gfx::Font::Weight::NORMAL));
label->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT);
break;
} }
} }
......
...@@ -49,6 +49,8 @@ class TrayPopupItemStyle { ...@@ -49,6 +49,8 @@ class TrayPopupItemStyle {
CLICKABLE_SYSTEM_INFO, CLICKABLE_SYSTEM_INFO,
// Sub text within a row (e.g. user name in user row). // Sub text within a row (e.g. user name in user row).
CAPTION, CAPTION,
// Labels in holding space bubble
HOLDING_SPACE_TITLE,
}; };
static constexpr double kInactiveIconAlpha = 0.54; static constexpr double kInactiveIconAlpha = 0.54;
......
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