From 595af116efe9b4a5b077834e6a526f129a7ca903 Mon Sep 17 00:00:00 2001 From: jojo535275 <65027759+jojo535275@users.noreply.github.com> Date: Thu, 23 Feb 2023 16:28:40 +0100 Subject: [PATCH] CM position/size update CM position/size updated --- .../libs/Icestudio/GUI/WafleWindowManager.js | 4 +++ .../Icestudio/GUI/Widgets/WafleUIWindow.js | 28 ++++++++++--------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/app/resources/libs/Icestudio/GUI/WafleWindowManager.js b/app/resources/libs/Icestudio/GUI/WafleWindowManager.js index bf0685a25..76bf9c3ae 100644 --- a/app/resources/libs/Icestudio/GUI/WafleWindowManager.js +++ b/app/resources/libs/Icestudio/GUI/WafleWindowManager.js @@ -50,6 +50,10 @@ class WafleWindowManager { } target.style.left = target.oldLeft + target.distX + "px"; target.style.top = target.oldTop + target.distY + "px"; + //default size of collection manager window when dragged/floating in the icestudio workspace + target.style.width='180px'; + target.style.height='450px'; + } function endDrag() { diff --git a/app/resources/libs/Icestudio/GUI/Widgets/WafleUIWindow.js b/app/resources/libs/Icestudio/GUI/Widgets/WafleUIWindow.js index 6786a0d3e..005f84aba 100644 --- a/app/resources/libs/Icestudio/GUI/Widgets/WafleUIWindow.js +++ b/app/resources/libs/Icestudio/GUI/Widgets/WafleUIWindow.js @@ -6,16 +6,16 @@ class WafleUIWindow{ params.html =''; } if(typeof params.y === 'undefined'){ - params.y ='100px'; - } - if(typeof params.x === 'undefined'){ - params.x ='500px'; - } - if(typeof params.height === 'undefined'){ - params.height ='450px'; + params.y ='70px'; } + if(typeof params.right === 'undefined'){ + params.right ='0px'; //CM window sticked to the rigth side of icestudio window + } if(typeof params.width === 'undefined'){ - params.width ='180px'; + params.width ="calc(7% + 150px)"; //adjust size of CM window with icestudio window size + } + if(typeof params.height === 'undefined'){ + params.height ="calc(100% - 118px)" } /*-- ¡¡ Be careful !! @@ -23,14 +23,16 @@ class WafleUIWindow{ -- For the future we could change by svg image for the icons. -- */ this.winId=params.id; - let content=`
- - - `; + let content= + ` + + `; this.dom = iceStudio.gui.addDiv(params.id,params.htmlClass,content); this.dom.style.top=params.y; - this.dom.style.left=params.x; + this.dom.style.right=params.right; this.dom.style.width=params.width; this.dom.style.height=params.height; }