USB device selector dialog is unnecessarily tall |
|||||
Issue descriptionChrome Version: ToT OS: Chrome OS What steps will reproduce the problem? (1) Build a dcheck_always_on=true build for link and deploy it to a link Chromebook. (2) Run an app that uses chrome.usb API (say "USB Device Info" [1]) and trigger the USB selection dialog. What is the expected result? The dialog opens. What happens instead? The dialog appears, but is very tall - not even fitting the screen when the app's window is centered. See the attached screenshot. [1] https://chrome.google.com/webstore/detail/usb-device-info/igkmggljimacfdfalpeelenjeicmfnll reillyg@: Reilly, assigning to you for triaging. Thanks.
,
Apr 21 2017
Applies to Chrome on Windows and Linux as well, where the dialog is actually clipped by the window that launched it.
,
Apr 21 2017
In the old version of this dialog we explicitly set it to 500x250 but that was lost in r435075. Putting back the override of GetPreferredSize() doesn't fix this issue so it seems something more complicated changed inside the Views framework.
,
Apr 21 2017
It looks like GetPreferredSize() was moved to DeviceChooserContentView by r453657 however in r464448 the GridLayout on the ChooserDialogView was changed to set the minimum size to the full 402x320 which meant that it would size both the DeviceChooserContentView and the button row to that size. Added all together the result was the super-long window. Removing the set_minimum_size call in ChooserDialogView::CreateClientView seems to fix the problem.
,
Apr 21 2017
,
Apr 21 2017
,
Apr 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b06115fcd1a2aee65694061710aa1342528f8afe commit b06115fcd1a2aee65694061710aa1342528f8afe Author: reillyg <reillyg@chromium.org> Date: Mon Apr 24 08:42:10 2017 Fix extra-long USB chooser dialog It appears that setting a minimum size on the DialogViewClient in CreateClientView causes the GridLayout to use that size for all cells. This means that both the DeviceChooserContentView and the button row below it are set to the same height, effectively doubling the size of the window. Removing the call to set_minimum_size seems to restore the window to its proper size. BUG= 714147 Review-Url: https://codereview.chromium.org/2836733003 Cr-Commit-Position: refs/heads/master@{#466597} [modify] https://crrev.com/b06115fcd1a2aee65694061710aa1342528f8afe/chrome/browser/ui/views/extensions/chooser_dialog_view.cc
,
Apr 24 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by reillyg@chromium.org
, Apr 21 2017