This is how the dialog looks complete with me.
// create dialog
dlg = app.CreateDialog(qsettings);
dlg.SetSize(0.9, 0.9)
// create background layout
var layBack = app.CreateLayout("linear", "vertical")
dlg.AddLayout(layBack)
// create scroller
Scrl = app.CreateScroller(0.9, 0.9)
// add scroller to background layout
layBack.AddChild(Scrl)
// create layout for on scroller
layDlg = app.CreateLayout("linear", "vertical");
layDlg.SetSize(0.9, 1.5)
layDlg.SetPadding(0.05, 0.05, 0.05, 0.05);
//Create Tabs for Dialog
var tabs = app.CreateTabs( qtabgenerel, qtabupdate + dlgWidth, dlgHeight - 48 * dip, "Top" )
layDlg.AddChild( tabs )
//add top layout to scroller
Scrl.AddChild(layDlg)
//add some content to overfill layout
var layAllgemein = tabs.GetLayout( "Allgemein" );
var text = "Hintergrundfarbe auswählen";
txt = app.CreateText( text )
layAllgemein.AddChild( txt )
var pollux = app.AddLayout(layAllgemein,"linear","horizontal")
pollux.SetChildTextSize(12)
item = app.LoadText( "item", "Schwarz" );
clrBg = app.LoadText( "clrBg", "black" );
clrTxt = app.LoadText( "clrTxt", "white" );
var lstColors = app.AddSpinner( pollux,"Schwarz,Weiss,Blau" )
lstColors.SelectItem( item )
lstColors.SetOnChange( lstColors_OnTouch )
var text = "Startseite festlegen";
txt = app.CreateText( text )
layAllgemein.AddChild( txt )
var home = app.AddTextEdit( layAllgemein,defaultUrl,0.8,"Autosize")
var save = newButton( layAllgemein,"[fa-save]")
save.SetOnTouch(function () {
defaultUrl=home.GetText()
app.SaveText("defaultUrl",defaultUrl)
app.ShowPopup("Startseite geändert!")
})
var text = "Suchmaschinen auswählen";
txt = app.CreateText( text)
layAllgemein.AddChild( txt )
var data = "Google:[fa-google],Yahoo:[fa-yahoo],Bing:[fa-windows],Brave Search:[fa-bitcoin],Neeva:[fa-deafness]";
lst = app.CreateList( data, 0.7, 0.4 );
layAllgemein.AddChild( lst )
lst.SetOnTouch(function (title,body,icon,index) {
app.SaveText("searchUrl",searchUrl)
})
var layUpdates = tabs.GetLayout( "Updates" )
var text = "Manuelles Update";
txt = app.CreateText( text)
layUpdates.AddChild( txt )
btnUpdates = app.AddButton( layUpdates,"Überprüfen von Updates" );
btnUpdates.SetMargins( 0, 0.01, 0, 0 )
btnUpdates.SetOnTouch( btnUpdates_OnTouch );
layUpdates.AddChild( btnUpdates );
And so for me the "OnConfig" function
function OnConfig() {
if (app.GetOrientation() == "Landscape") {
qwebs.forEach (function (current,idx) {
current.SetSize(1,0.75)
qtxts[idx].SetSize(0.6)
Scrl.SetSize(0.44, 0.9)
})
} else {
qwebs.forEach (function (current,idx) {
current.SetSize(1,0.75)
qtxts[idx].SetSize(0.6)
Scrl.SetSize(0.9, 0.9 )
})
}
}