constrain toolbar based on setting. (ui for settings to come.)

This commit is contained in:
howard-stearns 2016-11-03 10:39:53 -07:00
parent 8eb6699420
commit f3d4821579

View file

@ -51,8 +51,9 @@ OriginalDesktop.Desktop {
Toolbar {
id: sysToolbar;
objectName: "com.highfidelity.interface.toolbar.system";
// Literal 50 is overwritten by settings from previous session, and sysToolbar.x comes from settings.
x: settings.firstRun ? (desktop.width - sysToolbar.width) / 2 : sysToolbar.x;
anchors.horizontalCenter: settings.systemToolbarHorizontalConstraint ? desktop.horizontalCenter : undefined;
// Literal 50 is overwritten by settings from previous session, and sysToolbar.x comes from settings when not constrained.
x: sysToolbar.x
y: 50
}
property var toolbars: (function (map) { // answer dictionary preloaded with sysToolbar
@ -61,7 +62,7 @@ OriginalDesktop.Desktop {
Settings {
id: settings
property bool firstRun: true
property bool systemToolbarHorizontalConstraint: true
}
Component.onCompleted: {
WebEngine.settings.javascriptCanOpenWindows = true;