Update vertical tab bar toggle icon to latest version (#35479)
* Update icon to latest version * Update brave_toolbar_view.cc * add a collapsed/expanded state * Move leo_window_tabs_vertical_expanded to app vector icons Addresses review: build the expanded vertical-tabs Leo icon from app/vector_icons (rebased from @brave/leo/icons-skia) instead of components/vector_icons. Drop redundant components vector_icons include from brave_toolbar_view; kLeoWindowTabsVerticalExpandedIcon is declared in brave/app/vector_icons/vector_icons.h. Made-with: Cursor * Update BUILD.gn
This commit is contained in:
@@ -34,8 +34,11 @@ aggregate_vector_icons("brave_vector_icons") {
|
||||
"sidebar_items_down_arrow.icon",
|
||||
"sidebar_items_up_arrow.icon",
|
||||
"sidebar_trash.icon",
|
||||
"vertical_tab_strip_toggle_button.icon",
|
||||
"vertical_tab_strip_toggle_collapsed.icon",
|
||||
]
|
||||
sources += rebase_path([ "leo_window_tabs_vertical_expanded.icon" ],
|
||||
".",
|
||||
"//brave/node_modules/@brave/leo/icons-skia")
|
||||
}
|
||||
|
||||
if (enable_brave_vpn_panel) {
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
// Copyright (c) 2022 The Brave Authors. All rights reserved.
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
CANVAS_DIMENSIONS, 14,
|
||||
MOVE_TO, 11.67f, 0.33f,
|
||||
R_ARC_TO, 2, 2, 0, 0, 1, 2, 2,
|
||||
R_V_LINE_TO, 9.33f,
|
||||
R_ARC_TO, 2, 2, 0, 0, 1, -2, 2,
|
||||
H_LINE_TO, 2.33f,
|
||||
R_ARC_TO, 2, 2, 0, 0, 1, -2, -2,
|
||||
V_LINE_TO, 2.33f,
|
||||
R_ARC_TO, 2, 2, 0, 0, 1, 2, -2,
|
||||
R_H_LINE_TO, 9.33f,
|
||||
CLOSE,
|
||||
R_MOVE_TO, -0.11f, 1.21f,
|
||||
R_ARC_TO, 1, 1, 0, 0, 1, 1, 1,
|
||||
R_V_LINE_TO, 8.91f,
|
||||
R_ARC_TO, 1, 1, 0, 0, 1, -1, 1,
|
||||
H_LINE_TO, 6.13f,
|
||||
V_LINE_TO, 1.55f,
|
||||
R_H_LINE_TO, 5.43f,
|
||||
CLOSE,
|
||||
R_MOVE_TO, -9.11f, 10.91f,
|
||||
R_H_LINE_TO, 2.55f,
|
||||
V_LINE_TO, 1.55f,
|
||||
R_H_LINE_TO, -2.55f,
|
||||
R_ARC_TO, 1, 1, 0, 0, 0, -1, 1,
|
||||
R_V_LINE_TO, 8.91f,
|
||||
R_ARC_TO, 1, 1, 0, 0, 0, 1, 1,
|
||||
CLOSE,
|
||||
R_MOVE_TO, 0.99f, -8.59f,
|
||||
R_ARC_TO, 0.57f, 0.57f, 0, 0, 0, 0, -1.13f,
|
||||
R_H_LINE_TO, -0.54f,
|
||||
R_ARC_TO, 0.57f, 0.57f, 0, 1, 0, 0, 1.13f,
|
||||
R_H_LINE_TO, 0.54f,
|
||||
CLOSE,
|
||||
MOVE_TO, 4, 5.55f,
|
||||
R_ARC_TO, 0.57f, 0.57f, 0, 0, 1, -0.57f, 0.57f,
|
||||
R_H_LINE_TO, -0.54f,
|
||||
R_ARC_TO, 0.57f, 0.57f, 0, 0, 1, 0, -1.13f,
|
||||
R_H_LINE_TO, 0.54f,
|
||||
R_CUBIC_TO, 0.31f, 0, 0.57f, 0.25f, 0.57f, 0.57f,
|
||||
CLOSE,
|
||||
R_MOVE_TO, -0.57f, 2.82f,
|
||||
R_ARC_TO, 0.57f, 0.57f, 0, 1, 0, 0, -1.13f,
|
||||
R_H_LINE_TO, -0.54f,
|
||||
R_ARC_TO, 0.57f, 0.57f, 0, 1, 0, 0, 1.13f,
|
||||
R_H_LINE_TO, 0.54f,
|
||||
CLOSE
|
||||
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2026 The Brave Authors. All rights reserved.
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Collapsed vertical-tabs toolbar glyph: window with narrow tab rail and
|
||||
// content area (matches Figma selection). Geometry aligned with Nala
|
||||
// `leo_window_tabs_vertical_expanded` minus the tab-indicator dots.
|
||||
|
||||
CANVAS_DIMENSIONS, 24,
|
||||
FILL_RULE_NONZERO,
|
||||
MOVE_TO, 20, 3.3f,
|
||||
CUBIC_TO, 21.1f, 3.3f, 22, 4.2f, 22, 5.3f,
|
||||
V_LINE_TO, 18.7f,
|
||||
CUBIC_TO, 22, 19.8f, 21.1f, 20.7f, 20, 20.7f,
|
||||
H_LINE_TO, 4,
|
||||
CUBIC_TO, 2.9f, 20.7f, 2, 19.8f, 2, 18.7f,
|
||||
V_LINE_TO, 5.3f,
|
||||
CUBIC_TO, 2, 4.2f, 2.9f, 3.3f, 4, 3.3f,
|
||||
H_LINE_TO, 20,
|
||||
CLOSE,
|
||||
MOVE_TO, 6.9f, 19.1f,
|
||||
H_LINE_TO, 20,
|
||||
CUBIC_TO, 20.22f, 19.1f, 20.4f, 18.92f, 20.4f, 18.7f,
|
||||
V_LINE_TO, 5.3f,
|
||||
CUBIC_TO, 20.4f, 5.08f, 20.22f, 4.9f, 20, 4.9f,
|
||||
H_LINE_TO, 6.9f,
|
||||
V_LINE_TO, 19.1f,
|
||||
CLOSE,
|
||||
MOVE_TO, 4, 4.9f,
|
||||
CUBIC_TO, 3.78f, 4.9f, 3.6f, 5.08f, 3.6f, 5.3f,
|
||||
V_LINE_TO, 18.7f,
|
||||
CUBIC_TO, 3.6f, 18.92f, 3.78f, 19.1f, 4, 19.1f,
|
||||
H_LINE_TO, 5.2f,
|
||||
V_LINE_TO, 4.9f,
|
||||
H_LINE_TO, 4,
|
||||
CLOSE
|
||||
@@ -303,7 +303,10 @@ void BraveToolbarView::Init() {
|
||||
base::BindRepeating(&BraveToolbarView::OnVerticalTabTogglePressed,
|
||||
base::Unretained(this))),
|
||||
back_button_index.value_or(0));
|
||||
vertical_tab_toggle_->SetVectorIcon(kVerticalTabStripToggleButtonIcon);
|
||||
vertical_tab_toggle_->SetVectorIcon(
|
||||
vertical_tabs_collapsed_.GetValue()
|
||||
? kVerticalTabStripToggleCollapsedIcon
|
||||
: kLeoWindowTabsVerticalExpandedIcon);
|
||||
UpdateVerticalTabToggleVisibility();
|
||||
UpdateVerticalTabToggleState();
|
||||
}
|
||||
@@ -658,7 +661,9 @@ void BraveToolbarView::UpdateVerticalTabToggleState() {
|
||||
}
|
||||
|
||||
const bool is_expanded = !vertical_tabs_collapsed_.GetValue();
|
||||
vertical_tab_toggle_->SetHighlighted(is_expanded);
|
||||
vertical_tab_toggle_->SetVectorIcon(
|
||||
is_expanded ? kLeoWindowTabsVerticalExpandedIcon
|
||||
: kVerticalTabStripToggleCollapsedIcon);
|
||||
vertical_tab_toggle_->SetTooltipText(l10n_util::GetStringUTF16(
|
||||
is_expanded ? IDS_VERTICAL_TABS_MINIMIZE : IDS_VERTICAL_TABS_EXPAND));
|
||||
vertical_tab_toggle_->SetAccessibleName(l10n_util::GetStringUTF16(
|
||||
|
||||
Reference in New Issue
Block a user