Open sevoku opened 9 years ago
After some more investigation, I found that the Coordinates test (https://github.com/mono/xwt/blob/master/Testing/Tests/WidgetTests.cs#L304) can not be passed, cause the padding includes the inner padding between client side and the content. But ScreenBounds contain additionally the decorations. So the test should use the proposed ClientBounds as a reference (still taking the Padding property into account)
I think GetMetrics should return a WidgetSpacing instead of the Size of the decoration. So all sides of the window (not only the top) can be handled by Window.AdjustSize (https://github.com/mono/xwt/blob/master/Xwt/Xwt/Window.cs#L197)
I think we have some problems with the Window sizing and Decorations. At least on Gtk the backend
bounds do not include the decorations andGetMetrics takes only the menu and not the decorations (size difference between Gtk.Window and Gdk.Window) into account. As I understand, ScreenBounds (and X, Y, Width, Height) should include all decorations and Size only the client (without decorations/menu, but its bound to / is always the same as ScreenBounds.Size). And the backend implementations are inconsistent.Gdk/ClientGtk/Screen bounds). GetMetricts returns Menu size onlyI think we need some clearance here. ScreenBounds should always contain ALL decorations and we should add a Bounds (or maybe ClientBounds) property which includes only the content. The default X,Y,Widht,Heigh should include the decorations, too (directly bound to ScreenBounds, like before).