diff --git a/src/org/atriasoft/ewol/context/EwolContext.java b/src/org/atriasoft/ewol/context/EwolContext.java index 38ec845..e3a19aa 100644 --- a/src/org/atriasoft/ewol/context/EwolContext.java +++ b/src/org/atriasoft/ewol/context/EwolContext.java @@ -20,7 +20,7 @@ import org.atriasoft.gale.GaleApplication; import org.atriasoft.gale.Gale; import org.atriasoft.gale.context.ClipboardList; import org.atriasoft.gale.context.CommandLine; -import org.atriasoft.gale.context.Context; +import org.atriasoft.gale.context.GaleContext; import org.atriasoft.gale.key.KeyKeyboard; import org.atriasoft.gale.key.KeySpecial; import org.atriasoft.gale.key.KeyStatus; @@ -72,6 +72,7 @@ public class EwolContext extends GaleApplication { * Redraw all the windows */ public void forceRedrawAll() { + Log.warning("force redraw on windows:" + this.windowsCurrent); if (this.windowsCurrent == null) { return; } @@ -147,7 +148,7 @@ public class EwolContext extends GaleApplication { } @Override - public void onCreate(final Context context) { + public void onCreate(final GaleContext context) { Log.info(" == > Ewol system create (BEGIN)"); // Add basic ewol translation: ETranslate.addPath("ewol", new Uri("TRANSLATE", "", "ewol")); @@ -188,7 +189,7 @@ public class EwolContext extends GaleApplication { } @Override - public void onDestroy(final Context context) { + public void onDestroy(final GaleContext context) { Log.info(" == > Ewol system destroy (BEGIN)"); // Remove current windows this.windowsCurrent = null; @@ -210,8 +211,8 @@ public class EwolContext extends GaleApplication { } @Override - public void onDraw(final Context context) { - // Log.info("DRAW"); + public void onDraw(final GaleContext context) { + //Log.verbose("EWOL DRAW"); // clean internal data... this.objectManager.cleanInternalRemoved(); // real draw... @@ -274,7 +275,7 @@ public class EwolContext extends GaleApplication { } @Override - public void onKillDemand(final Context context) { + public void onKillDemand(final GaleContext context) { Log.info(" == > User demand a destroy (BEGIN)"); final EwolApplication appl = this.application; if (appl == null) { @@ -286,7 +287,7 @@ public class EwolContext extends GaleApplication { } @Override - public void onPause(final Context context) { + public void onPause(final GaleContext context) { Log.info(" == > Ewol system pause (BEGIN)"); final EwolApplication appl = this.application; if (appl == null) { @@ -322,12 +323,12 @@ public class EwolContext extends GaleApplication { } @Override - public void onRegenerateDisplay(final Context context) { - // Log.info("REGENERATEDISPLAY"); + public void onRegenerateDisplay(final GaleContext context) { + //Log.info("EWOL onRegenerateDisplay /// "); // check if the user selected a windows final Windows window = this.windowsCurrent; if (window == null) { - Log.debug("No windows ..."); + Log.error("No windows ..."); return; } // Redraw all needed elements @@ -338,13 +339,19 @@ public class EwolContext extends GaleApplication { // markDrawingIsNeeded(); } + @Override + public void onResize(final Vector2f size) { + super.onResize(size); + forceRedrawAll(); + } + public void onResize(final Vector2i size) { Log.verbose("Resize: " + size); forceRedrawAll(); } @Override - public void onResume(final Context context) { + public void onResume(final GaleContext context) { Log.info(" == > Ewol system resume (BEGIN)"); final EwolApplication appl = this.application; if (appl == null) { @@ -355,7 +362,7 @@ public class EwolContext extends GaleApplication { } @Override - public void onStart(final Context context) { + public void onStart(final GaleContext context) { Log.info(" == > Ewol system start (BEGIN)"); final EwolApplication appl = this.application; if (appl == null) { @@ -367,7 +374,7 @@ public class EwolContext extends GaleApplication { } @Override - public void onStop(final Context context) { + public void onStop(final GaleContext context) { Log.info(" == > Ewol system stop (BEGIN)"); final EwolApplication appl = this.application; if (appl == null) { @@ -381,7 +388,7 @@ public class EwolContext extends GaleApplication { * Request a display after call a resize */ public void requestUpdateSize() { - final Context context = Gale.getContext(); + final GaleContext context = Gale.getContext(); context.requestUpdateSize(); } diff --git a/src/org/atriasoft/ewol/widget/Spacer.java b/src/org/atriasoft/ewol/widget/Spacer.java index be44280..83f2965 100644 --- a/src/org/atriasoft/ewol/widget/Spacer.java +++ b/src/org/atriasoft/ewol/widget/Spacer.java @@ -60,16 +60,14 @@ public class Spacer extends Widget { } this.draw.setColor(this.propertyColor); this.draw.setPos(Vector3f.ZERO); - this.draw.setPos(new Vector3f(this.size.x() * 0.1f, this.size.y() * 0.1f, 0)); - this.draw.rectangleWidth(new Vector3f(this.size.x() * 0.8f, this.size.y() * 0.8f, 0)); + this.draw.rectangleWidth(new Vector3f(this.size.x(), this.size.y(), 0)); + //this.draw.setPos(new Vector3f(this.size.x() * 0.1f, this.size.y() * 0.1f, 0)); + //this.draw.rectangleWidth(new Vector3f(this.size.x() * 0.8f, this.size.y() * 0.8f, 0)); - // this.draw.setColor(Color.RED); - // this.draw.setPos(new Vector3f(-1024, -1024, 0)); - // this.draw.rectangleWidth(new Vector3f(2048, 2048, 0)); this.draw.flush(); } - public void setPropertyTextColorBgOn(final Color propertyColor) { + public void setPropertyColor(final Color propertyColor) { if (propertyColor.equals(this.propertyColor)) { return; } diff --git a/src/org/atriasoft/ewol/widget/Widget.java b/src/org/atriasoft/ewol/widget/Widget.java index 03d8bbd..c7eeb97 100644 --- a/src/org/atriasoft/ewol/widget/Widget.java +++ b/src/org/atriasoft/ewol/widget/Widget.java @@ -532,7 +532,7 @@ public class Widget extends EwolObject { */ public void onRegenerateDisplay() {} - protected void onUmpdateMinMaxSize() { + protected void onUpdateMinMaxSize() { final Vector2f pixelMin = this.propertyMinSize.getPixel(); final Vector2f pixelMax = this.propertyMaxSize.getPixel(); // check minimum maximum compatibility : @@ -708,7 +708,7 @@ public class Widget extends EwolObject { return; } this.propertyMaxSize = value; - onUmpdateMinMaxSize(); + onUpdateMinMaxSize(); } public void setPropertyMinSize(final Dimension value) { @@ -716,7 +716,7 @@ public class Widget extends EwolObject { return; } this.propertyMinSize = value; - onUmpdateMinMaxSize(); + onUpdateMinMaxSize(); } /**