mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +02:00
Automatically upgrade toolbar position to bottom center of window
This commit is contained in:
parent
5cec928ad1
commit
b7188bad30
1 changed files with 5 additions and 1 deletions
|
@ -452,7 +452,11 @@ ToolBar = function(x, y, direction, optionalPersistenceKey, optionalInitialPosit
|
|||
return id;
|
||||
}
|
||||
if (this.fractionKey || optionalInitialPositionFunction) {
|
||||
var savedFraction = JSON.parse(Settings.getValue(this.fractionKey) || '0'); // getValue can answer empty string
|
||||
var NEW_TOOLBAR_POSITION = "newToolbarPosition"; // New default position is bottom center of screen instead of right.
|
||||
var isNewPosition = Settings.getValue(NEW_TOOLBAR_POSITION);
|
||||
var savedFraction = isNewPosition ? JSON.parse(Settings.getValue(this.fractionKey) || "0") : 0;
|
||||
Settings.setValue(NEW_TOOLBAR_POSITION, true);
|
||||
|
||||
var recommendedRect = Controller.getRecommendedOverlayRect();
|
||||
var screenSize = { x: recommendedRect.width, y: recommendedRect.height };
|
||||
if (savedFraction) {
|
||||
|
|
Loading…
Reference in a new issue