[window] fix close button position on narrow windows

This commit is contained in:
Emil Ernerfeldt 2020-05-30 16:31:43 +02:00
parent 8b1f02f22c
commit cde1e05853

View file

@ -595,7 +595,7 @@ impl TitleBar {
) {
if let Some(content_rect) = content_rect {
// Now we know how large we got to be:
self.rect.max.x = content_rect.max.x;
self.rect.max.x = self.rect.max.x.max(content_rect.max.x);
}
if let Some(open) = open {