public void AdapterPanelBoxModel() { const int windowSize = 15000; var initializer = new TestFacetInitializer(); initializer.InitializeWindow(windowSize, windowSize); var style = initializer.Adapter.StyleOf(initializer.Facet.container_1); Assert.AreEqual(32, style.BoxModel.Padding.Left); Assert.AreEqual(16, style.BoxModel.Margin.Left); Assert.AreEqual(8, style.BoxModel.Border.Left); }
public void LayoutLabelScreenPosition() { const int windowSize = 15000; var initializer = new TestFacetInitializer() { WindowPosition = Point.Zero }; initializer.InitializeWindow(windowSize, windowSize); var screenPt = initializer.Facet.label_1.ClientToScreen(Point.Zero); Assert.AreEqual(63, screenPt.X); Assert.AreEqual(63, screenPt.Y); }
public void LayoutNaturalSizes() { const int windowSize = 600; var initializer = new TestFacetInitializer(); initializer.InitializeWindow(windowSize, windowSize); initializer.Facet.InterfaceRoot.LogWidgetStructure(); Assert.AreEqual(windowSize, initializer.Facet.window.Width); Assert.AreEqual(windowSize, initializer.Facet.window.Height); Assert.AreEqual(488, initializer.Facet.container_1.Width); Assert.AreEqual(72, initializer.Facet.container_1.Height); Assert.AreEqual(new Size(568, 152), initializer.Facet.container_1.WidgetSize); Assert.AreEqual("hello", initializer.Facet.label_1.Text); Assert.AreEqual(25, initializer.Facet.label_1.Width); Assert.AreEqual(10, initializer.Facet.label_1.Height); }