Bläddra i källkod

Fix layout init

luboslenco 2 år sedan
förälder
incheckning
a060066c9f

+ 1 - 7
armorlab/Sources/arm/App.hx

@@ -89,12 +89,6 @@ class App {
 		lastWindowWidth = System.windowWidth();
 		lastWindowHeight = System.windowHeight();
 
-		iron.App.onResize = onResize;
-		iron.App.w = w;
-		iron.App.h = h;
-		iron.App.x = x;
-		iron.App.y = y;
-
 		System.notifyOnDropFiles(function(dropPath: String) {
 			#if krom_linux
 			dropPath = untyped decodeURIComponent(dropPath);
@@ -258,7 +252,7 @@ class App {
 		return appy;
 	}
 
-	static function onResize() {
+	public static function onResize() {
 		if (System.windowWidth() == 0 || System.windowHeight() == 0) return;
 
 		var ratioW = System.windowWidth() / lastWindowWidth;

+ 1 - 7
armorpaint/Sources/arm/App.hx

@@ -117,12 +117,6 @@ class App {
 		lastWindowWidth = System.windowWidth();
 		lastWindowHeight = System.windowHeight();
 
-		iron.App.onResize = onResize;
-		iron.App.w = w;
-		iron.App.h = h;
-		iron.App.x = x;
-		iron.App.y = y;
-
 		System.notifyOnDropFiles(function(dropPath: String) {
 			#if krom_linux
 			dropPath = untyped decodeURIComponent(dropPath);
@@ -293,7 +287,7 @@ class App {
 		return appy;
 	}
 
-	static function onResize() {
+	public static function onResize() {
 		if (System.windowWidth() == 0 || System.windowHeight() == 0) return;
 
 		var ratioW = System.windowWidth() / lastWindowWidth;

+ 1 - 0
armorpaint/Sources/arm/ui/UINodes.hx

@@ -575,6 +575,7 @@ class UINodes {
 			}
 
 			UISidebar.inst.hwnd1.redraws = 2;
+			if (Context.raw.splitView) Context.raw.ddirty = 2;
 			recompileMat = false;
 		}
 		else if (recompileMatFinal) {

+ 6 - 0
base/Sources/MainBase.hx

@@ -38,6 +38,12 @@ class MainBase {
 	public static function start() {
 		if (tasks > 0) return;
 
+		iron.App.onResize = arm.App.onResize;
+		iron.App.w = arm.App.w;
+		iron.App.h = arm.App.h;
+		iron.App.x = arm.App.x;
+		iron.App.y = arm.App.y;
+
 		Config.init();
 		System.start(Config.getOptions(), function(window: Window) {
 			if (Config.raw.layout == null) arm.App.initLayout();