mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-08-19 13:46:04 +00:00
block moving and resizing in fullscreen
This commit is contained in:
@@ -73,6 +73,8 @@ public class MainWindowTitleController implements FxController {
|
||||
}
|
||||
});
|
||||
titleBar.setOnMouseDragged(event -> {
|
||||
//TODO should it be possible to move the window, when in fullscreen?
|
||||
if (window.isFullScreen()) return;
|
||||
window.setX(event.getScreenX() - xOffset);
|
||||
window.setY(event.getScreenY() - yOffset);
|
||||
});
|
||||
|
||||
@@ -152,4 +152,9 @@ public class ResizeController implements FxController {
|
||||
settings.windowXPositionProperty().setValue(window.getX());
|
||||
}
|
||||
|
||||
public boolean isShowResizingArrows(){
|
||||
//If in fullscreen resizing should not be possible
|
||||
return window.isFullScreen();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,13 +14,13 @@
|
||||
|
||||
|
||||
</fx:define>
|
||||
<Region fx:id="tlResizer" cursor="${nwResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" AnchorPane.topAnchor="0" AnchorPane.leftAnchor="0"/>
|
||||
<Region fx:id="trResizer" cursor="${neResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" AnchorPane.topAnchor="0" AnchorPane.rightAnchor="0"/>
|
||||
<Region fx:id="blResizer" cursor="${neResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0"/>
|
||||
<Region fx:id="brResizer" cursor="${nwResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" AnchorPane.bottomAnchor="0" AnchorPane.rightAnchor="0"/>
|
||||
<Region fx:id="tResizer" cursor="${nsResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="0.0"/>
|
||||
<Region fx:id="rResizer" cursor="${ewResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" AnchorPane.bottomAnchor="10.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="10.0"/>
|
||||
<Region fx:id="bResizer" cursor="${nsResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0"/>
|
||||
<Region fx:id="lResizer" cursor="${ewResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="10.0"/>
|
||||
<Region fx:id="tlResizer" cursor="${nwResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" managed="${controller.showResizingArrows}" AnchorPane.topAnchor="0" AnchorPane.leftAnchor="0"/>
|
||||
<Region fx:id="trResizer" cursor="${neResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" managed="${controller.showResizingArrows}" AnchorPane.topAnchor="0" AnchorPane.rightAnchor="0"/>
|
||||
<Region fx:id="blResizer" cursor="${neResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" managed="${controller.showResizingArrows}" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0"/>
|
||||
<Region fx:id="brResizer" cursor="${nwResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" managed="${controller.showResizingArrows}" AnchorPane.bottomAnchor="0" AnchorPane.rightAnchor="0"/>
|
||||
<Region fx:id="tResizer" cursor="${nsResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" managed="${controller.showResizingArrows}" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="0.0"/>
|
||||
<Region fx:id="rResizer" cursor="${ewResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" managed="${controller.showResizingArrows}" AnchorPane.bottomAnchor="10.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="10.0"/>
|
||||
<Region fx:id="bResizer" cursor="${nsResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" managed="${controller.showResizingArrows}" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0"/>
|
||||
<Region fx:id="lResizer" cursor="${ewResize}" prefWidth="10" prefHeight="10" maxWidth="-Infinity" maxHeight="-Infinity" managed="${controller.showResizingArrows}" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="10.0"/>
|
||||
|
||||
</AnchorPane>
|
||||
Reference in New Issue
Block a user