GNOME Bugzilla – Bug 610070
alignment of window captions in window selector
Last modified: 2010-02-17 17:07:29 UTC
Currently we seem to align our window previews by centering vertically. I think this may have worked OK before we added the caption boxes underneath the windows. But now it causes the caption boxes to be misaligned and that doesn't look so hot. Simply aligning the caption boxes would work but that would cause a large gap between the window preview and the text in some cases. That doesn't sound like a good thing. Perhaps, one solution is to align the bottoms of the windows.
Created attachment 153895 [details] screenshot
Created attachment 153993 [details] [review] align the bottoms of the window previews
Created attachment 153994 [details] [review] Correct position of window previews. align the bottoms of the window previews. window previews always fit in the slot(Before this patch, caption can overlap border of workspace.).
Looks much nicer! One little thing I noticed with the most recent patch is that in some cases the circular close button we put over the window gets clipped slightly on the top by the edge of the workspace. I think it might be OK for the close button to extend slightly over the edge rather than get clipped.
Created attachment 153998 [details] [review] Correct position of window previews. window previews(and close button) always fit in the slot
Comment on attachment 153998 [details] [review] Correct position of window previews. It's not obvious what the two values returned from WindowOverlay.chromeHeight() are supposed to be, and just calling them chromeHeight[0] and chromeHeight[1] doesn't help. If you're going to return both values from chromeHeight(), then you should *definitely* use a destructuring assignment: let [whateverTheFirstNumberIs, whateverTheSecondNumberIs] = this._windowOverlays[1].chromeHeight(); rather than assigning them to an array, and (depending on what the two numbers are) you might want to rename chromeHeight to something more obvious as well (chromeHeightAndWeight or whatever it is). Alternatively, you could leave chromeHeight as it was before your patch, and add a new method to return the new value.
Created attachment 154046 [details] [review] Correct position of window previews.
Comment on attachment 154046 [details] [review] Correct position of window previews. ok. >+ let [chromeButtonOuterHeight, chromeCaptionHeight] = this._windowOverlays[1].chromeHeights(); could also just remove the "chrome" here and call them "buttonOuterHeight" and "captionHeight" (and maybe change chromeWidth to buttonOuterWidth?) Or leave it as is.