Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Issue 2297193002: Harmony: implement TabbedPane styling (Closed)

Created:
4 years, 3 months ago by Elly Fong-Jones
Modified:
4 years, 3 months ago
Reviewers:
sky, Evan Stade
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Harmony: implement TabbedPane styling This CL: 1) Adds MdTabStrip and MdTab as subclasses of TabStrip and Tab; 2) Uses those classes to implement the Harmony visuals. BUG=635176 Committed: https://crrev.com/1968a3e844f82ecac7e14d97747db1a68a96dadf Cr-Commit-Position: refs/heads/master@{#415734}

Patch Set 1 #

Total comments: 6

Patch Set 2 : style fixes #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -32 lines) Patch
M ui/views/controls/tabbed_pane/tabbed_pane.h View 1 chunk +9 lines, -9 lines 0 comments Download
M ui/views/controls/tabbed_pane/tabbed_pane.cc View 1 9 chunks +135 lines, -23 lines 4 comments Download

Messages

Total messages: 17 (6 generated)
Elly Fong-Jones
sky: ptal? :)
4 years, 3 months ago (2016-08-31 13:12:23 UTC) #3
sky
https://codereview.chromium.org/2297193002/diff/1/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2297193002/diff/1/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode62 ui/views/controls/tabbed_pane/tabbed_pane.cc:62: // Called whenever tab_state_ changes. Generally we put |'s ...
4 years, 3 months ago (2016-08-31 16:44:03 UTC) #4
Elly Fong-Jones
https://codereview.chromium.org/2297193002/diff/1/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2297193002/diff/1/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode62 ui/views/controls/tabbed_pane/tabbed_pane.cc:62: // Called whenever tab_state_ changes. On 2016/08/31 16:44:03, sky ...
4 years, 3 months ago (2016-08-31 16:49:11 UTC) #5
sky
LGTM
4 years, 3 months ago (2016-08-31 17:42:11 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2297193002/20001
4 years, 3 months ago (2016-08-31 17:56:08 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-08-31 20:10:01 UTC) #10
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/1968a3e844f82ecac7e14d97747db1a68a96dadf Cr-Commit-Position: refs/heads/master@{#415734}
4 years, 3 months ago (2016-08-31 20:12:48 UTC) #12
Evan Stade
https://codereview.chromium.org/2297193002/diff/20001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2297193002/diff/20001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode265 ui/views/controls/tabbed_pane/tabbed_pane.cc:265: const SkColor kSelectedBorderColor = SkColorSetRGB(0x42, 0x85, 0xF4); Hi Elly, ...
4 years, 3 months ago (2016-09-01 20:46:07 UTC) #14
Evan Stade
https://codereview.chromium.org/2297193002/diff/20001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2297193002/diff/20001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode265 ui/views/controls/tabbed_pane/tabbed_pane.cc:265: const SkColor kSelectedBorderColor = SkColorSetRGB(0x42, 0x85, 0xF4); On 2016/09/01 ...
4 years, 3 months ago (2016-09-01 22:02:30 UTC) #15
Elly Fong-Jones
On 2016/09/01 20:46:07, Evan Stade (ooo friday) wrote: > https://codereview.chromium.org/2297193002/diff/20001/ui/views/controls/tabbed_pane/tabbed_pane.cc > File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): > ...
4 years, 3 months ago (2016-09-02 12:08:25 UTC) #16
Evan Stade
4 years, 3 months ago (2016-09-06 17:04:09 UTC) #17
Message was sent while issue was closed.
>
https://codereview.chromium.org/2297193002/diff/20001/ui/views/controls/tabbe...
> > ui/views/controls/tabbed_pane/tabbed_pane.cc:265: const SkColor
> > kSelectedBorderColor = SkColorSetRGB(0x42, 0x85, 0xF4);
> > Hi Elly, a couple ex post facto comments. Instead of hardcoding these
values,
> > they should be drawn from the theme. This one and the selected font one
should
> > be kColorId_CallToActionColor. The normal font one should be
> > kColorId_ButtonEnabledColor. The normal border one should be some value that
> we
> > can share with comboboxes.
> > 
> > One practical application (beyond fewer hardcoded values) is that the GTK
> theme
> > does actually change these values.
> 
> Done: https://codereview.chromium.org/2307843002/
> 
> >
>
https://codereview.chromium.org/2297193002/diff/20001/ui/views/controls/tabbe...
> > ui/views/controls/tabbed_pane/tabbed_pane.cc:271: int border_thickness =
> > selected() ? 2 : 1;
> > are you sure these values are right? This results in 2 or 1 dp, but the spec
> > says px. This means at 2x scale (retina) you will get 4px and 2px. Most
> strokes
> > in harmony are 1px at all scale factors so I suspect this is the same.
> 
> I don't understand - Views appears to be full of "thicknesses" that are simply
> defined as 1 or whatever and not scaled/etc before being used. For example,
>
https://cs.chromium.org/chromium/src/ui/views/controls/button/md_text_button....
> just uses "1" as a thickness regardless of device scale factor. Is there some
> other scaling that I need to do here to turn the 2/1 into actual physical
> pixels? If so, how come it is not done all over Views?

The focus ring is defined in dp, so no special work is needed. Here's an example
of a 1px stroke:
https://cs.chromium.org/chromium/src/ui/views/controls/focusable_border.cc?rc...

> 
> >
>
https://codereview.chromium.org/2297193002/diff/20001/ui/views/controls/tabbe...
> > ui/views/controls/tabbed_pane/tabbed_pane.cc:281: font_weight =
> > gfx::Font::Weight::BOLD;
> > should this not just be MEDIUM on all platforms?
> 
> The Harmony spec I'm working off of
(https://goto.google.com/cr-harmony-specs),
> on "SPEC-secondary-UI-07-tabs", says "Font: system Medium, bold(win)" for the
> Selected state.

OK, but medium is not the same as normal.

Powered by Google App Engine
This is Rietveld 408576698