Skip to content

Commit

Permalink
Derease font-weight for active tab
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhong committed Dec 12, 2020
1 parent 7a9c84f commit 36b8598
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chromium_src/chrome/browser/ui/views/tabs/tab_style_views.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class BraveGM2TabStyle : public GM2TabStyle {
const gfx::FontList& GetFontList() const override;

private:
gfx::FontList semibold_font_;
gfx::FontList active_tab_font_;
};

BraveGM2TabStyle::BraveGM2TabStyle(Tab* tab)
: GM2TabStyle(tab),
semibold_font_(
normal_font_.DeriveWithWeight(gfx::Font::Weight::SEMIBOLD)) {}
active_tab_font_(
normal_font_.DeriveWithWeight(gfx::Font::Weight::MEDIUM)) {}

TabStyle::TabColors BraveGM2TabStyle::CalculateColors() const {
auto colors = GM2TabStyle::CalculateColors();
Expand All @@ -46,7 +46,7 @@ TabStyle::TabColors BraveGM2TabStyle::CalculateColors() const {
const gfx::FontList& BraveGM2TabStyle::GetFontList() const {
const auto& font_list = GM2TabStyle::GetFontList();
if (&font_list == &normal_font_ && tab_->IsActive()) {
return semibold_font_;
return active_tab_font_;
}
return font_list;
}
Expand Down

0 comments on commit 36b8598

Please sign in to comment.