ecere/gui: Made nativeDecorations default for windows with borderStyle including...
authorJerome St-Louis <jerome@ecere.com>
Thu, 23 Feb 2012 18:28:51 +0000 (03:28 +0900)
committerJerome St-Louis <jerome@ecere.com>
Thu, 23 Feb 2012 18:28:51 +0000 (03:28 +0900)
ecere/src/gui/FormDesigner.ec
ecere/src/gui/GuiApplication.ec
ecere/src/gui/Window.ec

index 087b581..0499b69 100644 (file)
@@ -176,12 +176,12 @@ class FormDesigner : ClassDesignerBase
 
    void ::CreateNew(EditBox editBox, Size clientSize, char * name, char * inherit)
    {
-      int w = 640, h = 480;
+      int w = 632, h = 438;
       if(clientSize.w - 40 -200 < w)
       {
          w = (clientSize.w - 40 - 200);
          w -= w % GridSnap;
-         h = h * w / 640;
+         h = h * w / 632;
          h -= h % GridSnap;
          w = Max(w, 304);
          h = Max(h, 304);
@@ -201,7 +201,7 @@ class FormDesigner : ClassDesignerBase
       editBox.Printf("   hasMinimize = true;\n");
       editBox.Printf("   hasClose = true;\n");
       //editBox.Printf("   position = { 20, 20 };\n");
-      editBox.Printf("   size = { %d, %d };\n", w, h);
+      editBox.Printf("   clientSize = { %d, %d };\n", w, h);
       
       
       //editBox.Printf("   Button ok { parent = this, position = { 100, 100 }, size = { 80, 20 } };\n");
index 19ea428..6b3116f 100644 (file)
@@ -541,7 +541,7 @@ public class GuiApplication : Application
          // Setup Desktop
          if(!desktop)
          {
-            desktop = Window { };
+            desktop = Window { nativeDecorations = false };
             incref desktop;
             incref desktop;
             desktop.childrenOrder.circ = true;
index 61c5f05..51a764d 100644 (file)
@@ -539,6 +539,7 @@ private:
       autoCreate = true;
       modifyVirtArea = true;
       manageDisplay = true;
+      nativeDecorations = true;
 
       // scrollFlags = ScrollFlags { snapX = true, snapY = true };
       sbStep.x = sbStep.y = 8;
@@ -8010,6 +8011,7 @@ public:
             style.hasClose = false;
             style.hasMaximize = false;
             style.hasMinimize = false;
+            nativeDecorations = false;
          }
          style.borderBits = value;
          if(created)
@@ -9195,7 +9197,12 @@ public:
    property bool alphaBlend { get { return (bool)alphaBlend; } set { alphaBlend = value; } };
    property bool useSharedMemory { get { return (bool)useSharedMemory; } set { useSharedMemory = value; } };
    property CreationActivationOption creationActivation { get { return creationActivation; } set { creationActivation = value; } };
-   property bool nativeDecorations { get { return (bool)nativeDecorations && (formDesigner || rootWindow == this); } set { nativeDecorations = value; } };
+   property bool nativeDecorations
+   {
+      get { return (bool)nativeDecorations && (formDesigner || rootWindow == this); }
+      set { nativeDecorations = value; }
+      isset { return nativeDecorations != style.fixed; }
+   };
    property bool manageDisplay { get { return (bool)manageDisplay; } set { manageDisplay = value; } };
    
 private: