mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-23 13:45:09 +00:00
Increase window size on enable min size
This commit is contained in:
parent
0c77dbec92
commit
60759c142e
1 changed files with 12 additions and 1 deletions
|
@ -214,7 +214,18 @@ function initWindowBoundsListeners(win: BrowserWindow) {
|
||||||
|
|
||||||
function initSettingsListeners(win: BrowserWindow) {
|
function initSettingsListeners(win: BrowserWindow) {
|
||||||
Settings.addChangeListener("disableMinSize", disable => {
|
Settings.addChangeListener("disableMinSize", disable => {
|
||||||
win.setMinimumSize(disable ? 1 : MIN_WIDTH, disable ? 1 : MIN_HEIGHT);
|
if (disable) {
|
||||||
|
// 0 no work
|
||||||
|
win.setMinimumSize(1, 1);
|
||||||
|
} else {
|
||||||
|
win.setMinimumSize(MIN_WIDTH, MIN_HEIGHT);
|
||||||
|
|
||||||
|
const { width, height } = win.getBounds();
|
||||||
|
win.setBounds({
|
||||||
|
width: Math.max(width, MIN_WIDTH),
|
||||||
|
height: Math.max(height, MIN_HEIGHT)
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue