Automatically pad a dialog's body content to align with the icon |
||||
Issue description
If a dialog has an icon (i.e. returns an image from GetWindowIcon) the body content should be aligned with the icon automatically. Right now each dialog has to do this manually.
Dialogs currently don't have any default body padding, which makes this a bit harder.
The padding calculation could look like this (from grt@'s WIP patch):
gfx::Point origin = {};
views::View::ConvertPointToWidget(GetBubbleFrameView()->title(), &origin);
views::View::ConvertPointFromWidget(this, &origin);
int additional_body_padding = origin.x();
,
Jun 7 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/64569f8718404fe10c76d4928970af6e852faa4a commit 64569f8718404fe10c76d4928970af6e852faa4a Author: Trent Apted <tapted@chromium.org> Date: Thu Jun 07 03:59:36 2018 [merge-m68] Fix Layout() of RelaunchRecommendedBubbleView. It was reporting a preferred size inconsistent with its Layout(), causing potential clipping. To fix, anticipate the required alignment using constants. TBR=tapted@chromium.org (cherry picked from commit 6ab4cb38d8cda822caf12ae2a4df86626321c4d2) Bug: 847904, 810970 Change-Id: I78e7aa3dbfe04d3cd6695047aca74627b3186336 Reviewed-on: https://chromium-review.googlesource.com/1082057 Reviewed-by: Bret Sepulveda <bsep@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#563982} Reviewed-on: https://chromium-review.googlesource.com/1090412 Reviewed-by: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/branch-heads/3440@{#230} Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733} [modify] https://crrev.com/64569f8718404fe10c76d4928970af6e852faa4a/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_bubble_view.cc
,
Nov 23
*** Mass UI Triage *** Closing this issue as fix is landed.
,
Nov 26
The patch in this bug isn't a fix. We could still do this, but it's probably not worth keeping the bug open if there's no plan to do it imminently.
,
Nov 26
I'd like to keep this sort of thing open as an RFE to the toolkit. |
||||
►
Sign in to add a comment |
||||
Comment 1 by bugdroid1@chromium.org
, Jun 4 2018