|
|
Chromium Code Reviews|
Created:
4 years, 1 month ago by jdufault Modified:
4 years ago Reviewers:
tdanderson CC:
chromium-reviews, kalyank, sadrul, oshima+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUse correct fonts and add ripples to palette tray help/settings icon.
BUG=630464
Committed: https://crrev.com/07ede9c168f25c7eccfefeb76e703139d28c249f
Cr-Commit-Position: refs/heads/master@{#434701}
Patch Set 1 #
Total comments: 9
Patch Set 2 : Address comments #
Total comments: 1
Patch Set 3 : Rebase #
Messages
Total messages: 29 (18 generated)
The CQ bit was checked by jdufault@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Use correct fonts and add ripples to palette tray help/settings icon. BUG=630464 ========== to ========== Use correct fonts and add ripples to palette tray help/settings icon. BUG=630464 ==========
jdufault@chromium.org changed reviewers: + tdanderson@chromium.org
tdanderson@ PTAL. Thanks!
Thanks for coming back to this. LGTM with the comments addressed. https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... File ash/common/system/chromeos/palette/common_palette_tool.cc (right): https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... ash/common/system/chromeos/palette/common_palette_tool.cc:103: style.SetupLabel(highlight_view_->text_label()); Please move lines 101-103 into a helper called UpdateStyle(): void CommonPaletteTool::UpdateStyle() { if (!highlight_view_->text_label()) return; TrayPopupItemStyle style(...); style.SetupLabel(...); } Then override OnNativeThemeChanged() to call UpdateStyle(): void CommonPaletteTool::OnNativeThemeChanged(...) override { UpdateStyle(); } Finally, make a call to UpdateStyle() after line 100 (effectively replacing lines 101-103. See the documentation in the TrayPopupItemStyle header for further details. https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... File ash/common/system/chromeos/palette/palette_tray.cc (right): https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... ash/common/system/chromeos/palette/palette_tray.cc:99: TrayPopupItemStyle style(title_label->GetNativeTheme(), Ditto to my previous comment, please introduce UpdateStyle() and override OnNativeThemeChanged. https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... ash/common/system/chromeos/palette/palette_tray.cc:103: box_layout->SetFlexForView(title_label, 1); Please add a "TODO(tdanderson|jdufault): Use TriView to handle the layout of the title. See crbug.com/614453." TriView was introduced to unify all of the layout logic in the system tray rows so you don't have to manually set up layout details; feel free to address it in this CL if you wish, but I'm ok leaving it as-is and adding the TODO. https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... ash/common/system/chromeos/palette/palette_tray.cc:106: new SystemMenuButton(this, SystemMenuButton::InkDropStyle::FLOOD_FILL, Since the help and settings button don't have a vertical separator between them, the ink drop style used for both should be SystemMenuButton::InkDropStyle::SQUARE instead of FLOOD_FILL.
https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... File ash/common/system/chromeos/palette/common_palette_tool.cc (right): https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... ash/common/system/chromeos/palette/common_palette_tool.cc:103: style.SetupLabel(highlight_view_->text_label()); On 2016/11/16 20:44:16, tdanderson wrote: > Please move lines 101-103 into a helper called UpdateStyle(): > > void CommonPaletteTool::UpdateStyle() { > if (!highlight_view_->text_label()) > return; > TrayPopupItemStyle style(...); > style.SetupLabel(...); > } > > Then override OnNativeThemeChanged() to call UpdateStyle(): > > void CommonPaletteTool::OnNativeThemeChanged(...) override { > UpdateStyle(); > } > > Finally, make a call to UpdateStyle() after line 100 (effectively replacing > lines 101-103. See the documentation in the TrayPopupItemStyle header for > further details. Also, would be worth double-checking that after these changes are made that things look as you expect with and without Ash MD enabled. It's currently enabled by default on ToT and you can disable it by setting #ash-md to "Non material" in about:settings. It's possible you may want to gate the call(s) to UpdateStyle() on if (MaterialDesignController::IsSystemTrayMenuMaterial()).
The CQ bit was checked by jdufault@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/11/16 20:51:03, tdanderson wrote: > https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... > File ash/common/system/chromeos/palette/common_palette_tool.cc (right): > > https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... > ash/common/system/chromeos/palette/common_palette_tool.cc:103: > style.SetupLabel(highlight_view_->text_label()); > On 2016/11/16 20:44:16, tdanderson wrote: > > Please move lines 101-103 into a helper called UpdateStyle(): > > > > void CommonPaletteTool::UpdateStyle() { > > if (!highlight_view_->text_label()) > > return; > > TrayPopupItemStyle style(...); > > style.SetupLabel(...); > > } > > > > Then override OnNativeThemeChanged() to call UpdateStyle(): > > > > void CommonPaletteTool::OnNativeThemeChanged(...) override { > > UpdateStyle(); > > } > > > > Finally, make a call to UpdateStyle() after line 100 (effectively replacing > > lines 101-103. See the documentation in the TrayPopupItemStyle header for > > further details. > > Also, would be worth double-checking that after these changes are made that > things look as you expect with and without Ash MD enabled. It's currently > enabled by default on ToT and you can disable it by setting #ash-md to "Non > material" in about:settings. It's possible you may want to gate the call(s) to > UpdateStyle() on if (MaterialDesignController::IsSystemTrayMenuMaterial()). Hi, friendly ping - are you still planning to land this (and ideally have it merged back to 56 for consistency with the system menu?)
https://codereview.chromium.org/2502153002/diff/20001/ash/common/system/chrom... File ash/common/system/chromeos/palette/palette_tray.cc (right): https://codereview.chromium.org/2502153002/diff/20001/ash/common/system/chrom... ash/common/system/chromeos/palette/palette_tray.cc:109: IDS_ASH_STATUS_TRAY_SETTINGS); Note that Evan's CL https://chromiumcodereview.appspot.com/2527513002/ will turn these into SystemMenuButtons. (But the rest of this CL would still be good to land for 56, though)
On 2016/11/23 02:12:26, tdanderson wrote: > https://codereview.chromium.org/2502153002/diff/20001/ash/common/system/chrom... > File ash/common/system/chromeos/palette/palette_tray.cc (right): > > https://codereview.chromium.org/2502153002/diff/20001/ash/common/system/chrom... > ash/common/system/chromeos/palette/palette_tray.cc:109: > IDS_ASH_STATUS_TRAY_SETTINGS); > Note that Evan's CL https://chromiumcodereview.appspot.com/2527513002/ will turn > these into SystemMenuButtons. (But the rest of this CL would still be good to > land for 56, though) Cancel the above comment, we can't merge Evan's CL back into 56 since it touches focus rects, so I have asked him to leave out the changes to the palette for now. It would be really nice to have this CL land as-is for 56 so that it can get merged back to 56, giving the palette and system menu a consistent appearance.
The CQ bit was checked by jdufault@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by jdufault@chromium.org
https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... File ash/common/system/chromeos/palette/common_palette_tool.cc (right): https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... ash/common/system/chromeos/palette/common_palette_tool.cc:103: style.SetupLabel(highlight_view_->text_label()); On 2016/11/16 20:51:03, tdanderson wrote: > On 2016/11/16 20:44:16, tdanderson wrote: > > Please move lines 101-103 into a helper called UpdateStyle(): > > > > void CommonPaletteTool::UpdateStyle() { > > if (!highlight_view_->text_label()) > > return; > > TrayPopupItemStyle style(...); > > style.SetupLabel(...); > > } > > > > Then override OnNativeThemeChanged() to call UpdateStyle(): > > > > void CommonPaletteTool::OnNativeThemeChanged(...) override { > > UpdateStyle(); > > } > > > > Finally, make a call to UpdateStyle() after line 100 (effectively replacing > > lines 101-103. See the documentation in the TrayPopupItemStyle header for > > further details. > > Also, would be worth double-checking that after these changes are made that > things look as you expect with and without Ash MD enabled. It's currently > enabled by default on ToT and you can disable it by setting #ash-md to "Non > material" in about:settings. It's possible you may want to gate the call(s) to > UpdateStyle() on if (MaterialDesignController::IsSystemTrayMenuMaterial()). Removed this code, I think HoverHighlightView will do the right thing by default. https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... File ash/common/system/chromeos/palette/palette_tray.cc (right): https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... ash/common/system/chromeos/palette/palette_tray.cc:99: TrayPopupItemStyle style(title_label->GetNativeTheme(), On 2016/11/16 20:44:16, tdanderson wrote: > Ditto to my previous comment, please introduce UpdateStyle() and override > OnNativeThemeChanged. Done. https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... ash/common/system/chromeos/palette/palette_tray.cc:103: box_layout->SetFlexForView(title_label, 1); On 2016/11/16 20:44:16, tdanderson wrote: > Please add a "TODO(tdanderson|jdufault): Use TriView to handle the layout of the > title. See crbug.com/614453." TriView was introduced to unify all of the layout > logic in the system tray rows so you don't have to manually set up layout > details; feel free to address it in this CL if you wish, but I'm ok leaving it > as-is and adding the TODO. Added TODO; I'll try to come back to this after non-md has been deprecated/removed. https://codereview.chromium.org/2502153002/diff/1/ash/common/system/chromeos/... ash/common/system/chromeos/palette/palette_tray.cc:106: new SystemMenuButton(this, SystemMenuButton::InkDropStyle::FLOOD_FILL, On 2016/11/16 20:44:16, tdanderson wrote: > Since the help and settings button don't have a vertical separator between them, > the ink drop style used for both should be > SystemMenuButton::InkDropStyle::SQUARE instead of FLOOD_FILL. Done.
The CQ bit was checked by jdufault@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tdanderson@chromium.org Link to the patchset: https://codereview.chromium.org/2502153002/#ps40001 (title: "Rebase")
On 2016/11/23 02:15:35, tdanderson wrote: > Cancel the above comment, we can't merge Evan's CL back into 56 since > it touches focus rects, so I have asked him to leave out the changes > to the palette for now. It would be really nice to have this CL land > as-is for 56 so that it can get merged back to 56, giving the palette > and system menu a consistent appearance. Submitting now, sorry about the delay.
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1480355959210900,
"parent_rev": "83d99f7d19b087758494d75c73c154fa35285bad", "commit_rev":
"5bd2051a21d4e68bbe05667f50af22d5f20a21e7"}
Message was sent while issue was closed.
Description was changed from ========== Use correct fonts and add ripples to palette tray help/settings icon. BUG=630464 ========== to ========== Use correct fonts and add ripples to palette tray help/settings icon. BUG=630464 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Use correct fonts and add ripples to palette tray help/settings icon. BUG=630464 ========== to ========== Use correct fonts and add ripples to palette tray help/settings icon. BUG=630464 Committed: https://crrev.com/07ede9c168f25c7eccfefeb76e703139d28c249f Cr-Commit-Position: refs/heads/master@{#434701} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/07ede9c168f25c7eccfefeb76e703139d28c249f Cr-Commit-Position: refs/heads/master@{#434701} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
