From 2af87586d6b891642925d7e6508e11db77e9b491 Mon Sep 17 00:00:00 2001 From: Bruno Salmon Date: Mon, 3 Jun 2024 18:15:39 +0100 Subject: [PATCH] Hardcoded some stage style attributes (to replace soon with CSS) --- .../gwtj2cl/shared/GwtJ2clPrimaryStagePeer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webfx-kit/webfx-kit-javafxgraphics-peers-gwt-j2cl/src/main/java/dev/webfx/kit/mapper/peers/javafxgraphics/gwtj2cl/shared/GwtJ2clPrimaryStagePeer.java b/webfx-kit/webfx-kit-javafxgraphics-peers-gwt-j2cl/src/main/java/dev/webfx/kit/mapper/peers/javafxgraphics/gwtj2cl/shared/GwtJ2clPrimaryStagePeer.java index 131e1f2c8..2401512af 100644 --- a/webfx-kit/webfx-kit-javafxgraphics-peers-gwt-j2cl/src/main/java/dev/webfx/kit/mapper/peers/javafxgraphics/gwtj2cl/shared/GwtJ2clPrimaryStagePeer.java +++ b/webfx-kit/webfx-kit-javafxgraphics-peers-gwt-j2cl/src/main/java/dev/webfx/kit/mapper/peers/javafxgraphics/gwtj2cl/shared/GwtJ2clPrimaryStagePeer.java @@ -32,6 +32,12 @@ public final class GwtJ2clPrimaryStagePeer extends StagePeerBase { public GwtJ2clPrimaryStagePeer(Stage stage) { super(stage); + // TODO: see how to replace this with immediate CSS + // Disabling browser horizontal and vertical scroll bars + HtmlUtil.setStyleAttribute(document.documentElement, "overflow", "hidden"); + // Removing the default margin around the body, so it fills the whole browser tab + HtmlUtil.setStyleAttribute(document.body, "margin", "0"); + // Considering the current window size changedWindowSize(); // And subsequent changes in the future