mirror of https://github.com/buggins/dlangui.git
Some fixes after widgets measure change, example for new window content managment.
This commit is contained in:
parent
df9346920e
commit
e31bd2cc2f
|
@ -267,7 +267,11 @@ extern (C) int UIAppMain(string[] args) {
|
||||||
|
|
||||||
// create window
|
// create window
|
||||||
Window window = Platform.instance.createWindow("DlangUI Example 1", null, WindowFlag.Resizable, 800, 700);
|
Window window = Platform.instance.createWindow("DlangUI Example 1", null, WindowFlag.Resizable, 800, 700);
|
||||||
|
// here you can see window or content resize mode
|
||||||
|
//Window window = Platform.instance.createWindow("DlangUI Example 1", null, WindowFlag.Resizable, 400, 400);
|
||||||
|
//window.windowOrContentResizeMode = WindowOrContentResizeMode.resizeWindow;
|
||||||
|
//window.windowOrContentResizeMode = WindowOrContentResizeMode.scrollWindow;
|
||||||
|
//window.windowOrContentResizeMode = WindowOrContentResizeMode.shrinkWidgets;
|
||||||
static if (true) {
|
static if (true) {
|
||||||
VerticalLayout contentLayout = new VerticalLayout();
|
VerticalLayout contentLayout = new VerticalLayout();
|
||||||
|
|
||||||
|
@ -458,6 +462,7 @@ extern (C) int UIAppMain(string[] args) {
|
||||||
// most of controls example
|
// most of controls example
|
||||||
{
|
{
|
||||||
LinearLayout controls = new VerticalLayout("controls");
|
LinearLayout controls = new VerticalLayout("controls");
|
||||||
|
controls.layoutHeight(FILL_PARENT);
|
||||||
controls.padding = Rect(12.pointsToPixels,12.pointsToPixels,12.pointsToPixels,12.pointsToPixels);
|
controls.padding = Rect(12.pointsToPixels,12.pointsToPixels,12.pointsToPixels,12.pointsToPixels);
|
||||||
|
|
||||||
HorizontalLayout line1 = new HorizontalLayout();
|
HorizontalLayout line1 = new HorizontalLayout();
|
||||||
|
@ -548,9 +553,12 @@ extern (C) int UIAppMain(string[] args) {
|
||||||
|
|
||||||
HorizontalLayout line4 = new HorizontalLayout();
|
HorizontalLayout line4 = new HorizontalLayout();
|
||||||
line4.layoutWidth(FILL_PARENT);
|
line4.layoutWidth(FILL_PARENT);
|
||||||
|
line4.layoutHeight(FILL_PARENT);
|
||||||
GroupBox gbgrid = new GroupBox("grid", "StringGridWidget"d, Orientation.Horizontal);
|
GroupBox gbgrid = new GroupBox("grid", "StringGridWidget"d, Orientation.Horizontal);
|
||||||
StringGridWidget grid = new StringGridWidget("stringgrid");
|
StringGridWidget grid = new StringGridWidget("stringgrid");
|
||||||
grid.resize(12, 10);
|
grid.resize(12, 10);
|
||||||
|
gbgrid.layoutWidth(FILL_PARENT);
|
||||||
|
gbgrid.layoutHeight(FILL_PARENT);
|
||||||
grid.layoutWidth(FILL_PARENT);
|
grid.layoutWidth(FILL_PARENT);
|
||||||
grid.layoutHeight(FILL_PARENT);
|
grid.layoutHeight(FILL_PARENT);
|
||||||
foreach (index, month; ["January"d, "February"d, "March"d, "April"d, "May"d, "June"d, "July"d, "August"d, "September"d, "October"d, "November"d, "December"d])
|
foreach (index, month; ["January"d, "February"d, "March"d, "April"d, "May"d, "June"d, "July"d, "August"d, "September"d, "October"d, "November"d, "December"d])
|
||||||
|
|
Loading…
Reference in New Issue