Forráskód Böngészése

WindowServer: Add 2px of tasteful space above maximized windows

This makes the visual interaction between the menu bar and the window
a lot less janky looking.
Andreas Kling 5 éve
szülő
commit
c6f098c5a9
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      Services/WindowServer/WindowManager.cpp

+ 4 - 0
Services/WindowServer/WindowManager.cpp

@@ -1252,6 +1252,10 @@ Gfx::Rect WindowManager::maximized_window_rect(const Window& window) const
         return IterationDecision::Break;
         return IterationDecision::Break;
     });
     });
 
 
+    constexpr int tasteful_space_above_maximized_window = 2;
+    rect.set_y(rect.y() + tasteful_space_above_maximized_window);
+    rect.set_height(rect.height() - tasteful_space_above_maximized_window);
+
     return rect;
     return rect;
 }
 }