Skip to content

Commit 564dcf7

Browse files
Chugunov RomanChugunov Roman
authored andcommitted
Merge from dev
2 parents 5a6783f + 42d6c79 commit 564dcf7

7 files changed

Lines changed: 16 additions & 4 deletions

File tree

config/builder.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"appId": "figma-linux",
33
"productName": "figma-linux",
44
"extraMetadata": "main/main.js",
5-
"icon": "resources/256x256.png",
5+
"icon": "resources/icon",
66
"files": [
77
"**/*"
88
],
@@ -18,7 +18,7 @@
1818

1919
"linux": {
2020
"description": "Unofficial desktop application for linux",
21-
"icon": "resources/256x256.png",
21+
"icon": "resources/icon",
2222
"category": "Graphic",
2323
"depends": [
2424
"libgconf2-4"

src/main/webContent/WindowManager.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ class WindowManager implements IWindowManager {
5555

5656
this.mainWindow.setBrowserView(tab);
5757
this.mainWindow.on('resize', this.onResize);
58+
this.mainWindow.on('maximize', (e: Event) => setTimeout(() => this.onResize(e), 100));
59+
this.mainWindow.on('unmaximize', (e: Event) => setTimeout(() => this.onResize(e), 100));
60+
this.mainWindow.on('close', this.onWindowAllClosed);
61+
5862
shortcuts();
63+
5964
setTimeout(() => {
6065
this.setZoom(0.9);
6166
this.onResize();
@@ -182,9 +187,16 @@ class WindowManager implements IWindowManager {
182187
window.setMenu(null);
183188
}
184189

185-
private onResize = async () => {
190+
private onResize = async (event?: Event) => {
186191
const browserViews = E.BrowserView.getAllViews();
187-
192+
193+
console.log('onResize, event: ', event && event!.target);
194+
console.log('onResize, bounds: ', {
195+
x: 0,
196+
y: parseInt((28 * await this.getZoom()+'').substr(0,4)),
197+
width: this.mainWindow.getContentBounds().width,
198+
height: this.mainWindow.getContentBounds().height - parseInt((28 * await this.getZoom()+'').substr(0,4))
199+
});
188200
browserViews.forEach(async bw => bw.setBounds({
189201
x: 0,
190202
y: parseInt((28 * await this.getZoom()+'').substr(0,4)),

0 commit comments

Comments
 (0)