Chromium Code Reviews
DescriptionFix various issues with popup/app window layout/drawing.
* Moves responsibility for drawing the top and bottom location bar borders back
to the location bar. In MD, where these borders are 1 px thick even at >1x
scales, drawing them in the frame code doesn't work well, since they have
to be drawn atop the location bar contents.
One ramification of this is that due to the way the location bar size and
position is specified, the popup-mode location bar in MD at >1x scale is
slightly larger than the non-popup location bar. The only way to fix this is
to argue with Sebastien that the location bar size/position should be modified
a bit and I just don't care about this enough.
* Draws the location bar top and bottom borders in the "location bar border"
color, instead of the toolbar/content separator colors. This generally leads
to greater visibility of these borders.
* Draws the location bar side borders (only present in opaque frames) in the
"location bar border" color, instead of the client edge color. This looks
less glitchy.
* Gives the same height, padding, etc. to location bar contents in all modes (to
the degree possible given the caveats above).
* Moves the window icon 1 px to the left, which looks slightly better in the
restored case.
* Makes the 2 px at the bottom of the titlebar part of the titlebar bounds, not
part of the toolbar bounds. This simplifies some layout code a bit.
* Uses a saner titlebar height calculation, which currently results in the same
gap between caption buttons and titlebar bottom in restored windows as
maximized ones.
* Centers the window icon/title vertically within the whole center titlebar
space. This is closely entwined with the bullet above.
BUG=585265
TEST=Run Chrome with --top-chrome-md=material --force-device-scale-factor=2. Open a popup window, screenshot it, load the screenshot in an image editor, and verify the location bar does not have a transparent row just inside either top or bottom border.
Committed: https://crrev.com/68ef33932afca3e855671c8428ee29f506c55a20
Cr-Commit-Position: refs/heads/master@{#375360}
Patch Set 1 #Patch Set 2 : Rework popup layout again #Patch Set 3 : Resync #Patch Set 4 : Add Ash frame code #Patch Set 5 : Fix unittest #Messages
Total messages: 13 (6 generated)
|