mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 14:55:21 +03:00
linux bugfixes + docs
This commit is contained in:
parent
480cd64896
commit
ddee2f424b
1 changed files with 16 additions and 4 deletions
|
@ -1,14 +1,26 @@
|
||||||
|
/*
|
||||||
|
resizable: false - Keep in mind this only disables the side/corner resizing via mouse, nothing more
|
||||||
|
maxWidth / maxHeight - is defined to prevent application reaching maximized state through window manager
|
||||||
|
|
||||||
|
We are setting Bounds through setBounds method after window was created because on linux setting Bounds as
|
||||||
|
window.create property seemed to fail, probably because "previous" bounds was used instead according to docs.
|
||||||
|
|
||||||
|
bounds - Size and position of the content in the window (excluding the titlebar).
|
||||||
|
If an id is also specified and a window with a matching id has been shown before, the remembered bounds of the window will be used instead.
|
||||||
|
*/
|
||||||
function start_app() {
|
function start_app() {
|
||||||
chrome.app.window.create('main.html', {
|
chrome.app.window.create('main.html', {
|
||||||
id: 'main-window',
|
id: 'main-window',
|
||||||
frame: 'none',
|
frame: 'none',
|
||||||
resizable: false,
|
resizable: false,
|
||||||
minWidth: 962,
|
|
||||||
minHeight: 650,
|
|
||||||
maxWidth: 962,
|
maxWidth: 962,
|
||||||
maxHeight: 650
|
maxHeight: 650
|
||||||
}, function(window_child) {
|
}, function(main_window) {
|
||||||
window_child.onClosed.addListener(function() {
|
// set window size
|
||||||
|
main_window.setBounds({'width': 962, 'height': 650});
|
||||||
|
|
||||||
|
// bind events
|
||||||
|
main_window.onClosed.addListener(function() {
|
||||||
// connectionId is passed from the script side through the chrome.runtime.getBackgroundPage refference
|
// connectionId is passed from the script side through the chrome.runtime.getBackgroundPage refference
|
||||||
// allowing us to automatically close the port when application shut down
|
// allowing us to automatically close the port when application shut down
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue