mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-11-04 13:37:43 +03:00
feat!: remove adjustLayout options
These options should be always enabled by default, because this is how all tiling window managers work: mouse resize always has feedback and resizing always affects the layout. BREAKING CHANGE: all the users, that have these options disabled will now have the default behavior - dynamic reacting to the window resize events.
This commit is contained in:
parent
1d7224110b
commit
1cdf1a5bb2
@ -120,16 +120,6 @@
|
|||||||
<default>false</default>
|
<default>false</default>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
||||||
<entry name="adjustLayout" type="Bool">
|
|
||||||
<label>Adjust layout with mouse</label>
|
|
||||||
<default>true</default>
|
|
||||||
</entry>
|
|
||||||
|
|
||||||
<entry name="adjustLayoutLive" type="Bool">
|
|
||||||
<label>Adjust as window is being resized</label>
|
|
||||||
<default>true</default>
|
|
||||||
</entry>
|
|
||||||
|
|
||||||
<entry name="keepFloatAbove" type="Bool">
|
<entry name="keepFloatAbove" type="Bool">
|
||||||
<label>Keep tiled windows below floating windows</label>
|
<label>Keep tiled windows below floating windows</label>
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
|
@ -347,62 +347,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="behaviorTab">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Behavior</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_4">
|
|
||||||
<property name="title">
|
|
||||||
<string>Layout Adjustment</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="kcfg_adjustLayout">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Resizing window will cause layout to be adjusted. The actual behaviour might differ based on layout in use.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Adjust layout by resizing windows</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="kcfg_adjustLayoutLive">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>If enabled, resizing window will immediately adjust layout. If disabled, layout will be adjusted *after* window resizing is over.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Adjust layout in realtime as window is being resized</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="kcfg_newWindowAsMaster">
|
|
||||||
<property name="text">
|
|
||||||
<string>Put new window as master</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="rulesTab">
|
<widget class="QWidget" name="rulesTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Rules</string>
|
<string>Rules</string>
|
||||||
@ -558,11 +502,18 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="optionsTab">
|
<widget class="QWidget" name="behaviorTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Options</string>
|
<string>Behavior</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="kcfg_newWindowAsMaster">
|
||||||
|
<property name="text">
|
||||||
|
<string>Put new window as master</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="kcfg_maximizeSoleTile">
|
<widget class="QCheckBox" name="kcfg_maximizeSoleTile">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -29,8 +29,6 @@ export interface Config {
|
|||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Features
|
//#region Features
|
||||||
adjustLayout: boolean;
|
|
||||||
adjustLayoutLive: boolean;
|
|
||||||
keepFloatAbove: boolean;
|
keepFloatAbove: boolean;
|
||||||
noTileBorder: boolean;
|
noTileBorder: boolean;
|
||||||
limitTileWidthRatio: number;
|
limitTileWidthRatio: number;
|
||||||
@ -84,8 +82,6 @@ export class ConfigImpl implements Config {
|
|||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Features
|
//#region Features
|
||||||
public adjustLayout: boolean;
|
|
||||||
public adjustLayoutLive: boolean;
|
|
||||||
public keepFloatAbove: boolean;
|
public keepFloatAbove: boolean;
|
||||||
public noTileBorder: boolean;
|
public noTileBorder: boolean;
|
||||||
public limitTileWidthRatio: number;
|
public limitTileWidthRatio: number;
|
||||||
@ -179,11 +175,6 @@ export class ConfigImpl implements Config {
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
this.adjustLayout = this.kwinApi.KWin.readConfig("adjustLayout", true);
|
|
||||||
this.adjustLayoutLive = this.kwinApi.KWin.readConfig(
|
|
||||||
"adjustLayoutLive",
|
|
||||||
true
|
|
||||||
);
|
|
||||||
this.keepFloatAbove = this.kwinApi.KWin.readConfig("keepFloatAbove", true);
|
this.keepFloatAbove = this.kwinApi.KWin.readConfig("keepFloatAbove", true);
|
||||||
this.noTileBorder = this.kwinApi.KWin.readConfig("noTileBorder", false);
|
this.noTileBorder = this.kwinApi.KWin.readConfig("noTileBorder", false);
|
||||||
|
|
||||||
|
@ -298,23 +298,23 @@ export class ControllerImpl implements Controller {
|
|||||||
/* do nothing */
|
/* do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
public onWindowResize(window: EngineWindow): void {
|
public onWindowResize(win: EngineWindow): void {
|
||||||
this.log.log(["onWindowResize", { window }]);
|
this.log.log(`[Controller#onWindowResize] Window is resizing: ${win}`);
|
||||||
if (this.config.adjustLayout && this.config.adjustLayoutLive) {
|
|
||||||
if (window.state === WindowState.Tiled) {
|
if (win.state === WindowState.Tiled) {
|
||||||
this.engine.adjustLayout(window);
|
this.engine.adjustLayout(win);
|
||||||
this.engine.arrange();
|
this.engine.arrange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public onWindowResizeOver(window: EngineWindow): void {
|
public onWindowResizeOver(win: EngineWindow): void {
|
||||||
this.log.log(["onWindowResizeOver", { window }]);
|
this.log.log(
|
||||||
if (this.config.adjustLayout && window.tiled) {
|
`[Controller#onWindowResizeOver] Window resize is over: ${win}`
|
||||||
this.engine.adjustLayout(window);
|
);
|
||||||
|
|
||||||
|
if (win.tiled) {
|
||||||
|
this.engine.adjustLayout(win);
|
||||||
this.engine.arrange();
|
this.engine.arrange();
|
||||||
} else if (!this.config.adjustLayout) {
|
|
||||||
this.engine.enforceSize(window);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user