From cf146312e94b1ba82166f7667f21c0a07c229967 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 10 Sep 2024 09:47:01 +0100 Subject: [PATCH] Resolve layout shrink (#14) Co-authored-by: Ray Cashmore --- .gitignore | 3 ++- .../src/platform/layout/layout-override.ts | 2 +- .../public/common/style/app.css | 18 ++++++++++++++++++ .../public/platform/provider.html | 10 +++------- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 144e879..a9a3b53 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules **/public/js/*.bundle.js **/public/js/*.bundle.js.map **/.DS_Store -**/node_modules \ No newline at end of file +**/node_modules +.idea \ No newline at end of file diff --git a/how-to/web-interop-support-context-and-intents/client/src/platform/layout/layout-override.ts b/how-to/web-interop-support-context-and-intents/client/src/platform/layout/layout-override.ts index 2a220c7..7b1cccc 100644 --- a/how-to/web-interop-support-context-and-intents/client/src/platform/layout/layout-override.ts +++ b/how-to/web-interop-support-context-and-intents/client/src/platform/layout/layout-override.ts @@ -218,7 +218,7 @@ export function makeOverride( // Create a new div container for the layout. const container = document.createElement("div"); container.id = layoutName; - container.className = "col fill layout-container hidden"; + container.className = "col layout-container workspace-container hidden"; this._layoutContainer?.append(container); await fin.Platform.Layout.create({ layoutName, layout, container }); if (entry === length) { diff --git a/how-to/web-interop-support-context-and-intents/public/common/style/app.css b/how-to/web-interop-support-context-and-intents/public/common/style/app.css index f99a90c..cb3f7a2 100644 --- a/how-to/web-interop-support-context-and-intents/public/common/style/app.css +++ b/how-to/web-interop-support-context-and-intents/public/common/style/app.css @@ -17,6 +17,8 @@ --brand-success: var(--theme-status-success, #35c759); accent-color: var(--brand-primary); + + --header-height: 60px; } .theme-light { @@ -166,6 +168,14 @@ main { min-height: 100px; } +.header { + height: var(--header-height); +} + +.workspace-container { + height: calc(100dvh - var(--header-height)); +} + a { color: var(--brand-primary); font-size: 12px; @@ -920,6 +930,14 @@ td, gap: 20px; } +.width-viewport { + width: 100dvw; +} + +.height-viewport { + height: 100dvh; +} + .width-full { width: 100%; } diff --git a/how-to/web-interop-support-context-and-intents/public/platform/provider.html b/how-to/web-interop-support-context-and-intents/public/platform/provider.html index a11e728..b0330b4 100644 --- a/how-to/web-interop-support-context-and-intents/public/platform/provider.html +++ b/how-to/web-interop-support-context-and-intents/public/platform/provider.html @@ -12,8 +12,8 @@ - -
+ +

OpenFin - Support Context & Intents

@@ -36,10 +36,6 @@

-
-
-
-
-
+