mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-06-24 00:53:02 +12:00
Fixes
This commit is contained in:
parent
6c0b3cb58c
commit
f39ec1451b
|
@ -28,6 +28,7 @@ import javafx.geometry.Pos;
|
|||
import javafx.scene.Node;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.input.MouseButton;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.ColumnConstraints;
|
||||
import javafx.scene.layout.Region;
|
||||
import javafx.scene.layout.StackPane;
|
||||
|
@ -95,6 +96,16 @@ public abstract class StoreEntryComp extends SimpleComp {
|
|||
wrapper.executeDefaultAction();
|
||||
});
|
||||
});
|
||||
button.addEventFilter(MouseEvent.MOUSE_CLICKED, event -> {
|
||||
if (event.getClickCount() > 1) {
|
||||
event.consume();
|
||||
}
|
||||
});
|
||||
button.addEventFilter(MouseEvent.MOUSE_PRESSED, event -> {
|
||||
if (event.getClickCount() > 1) {
|
||||
event.consume();
|
||||
}
|
||||
});
|
||||
new ContextMenuAugment<>(
|
||||
mouseEvent -> mouseEvent.getButton() == MouseButton.SECONDARY,
|
||||
null,
|
||||
|
|
|
@ -87,6 +87,8 @@ public class AppTheme {
|
|||
try {
|
||||
// var c = new WindowControl(stage);
|
||||
// c.setWindowAttribute(20, AppPrefs.get().theme.getValue().isDark());
|
||||
// c.setWindowAttribute(34, 0xFFFFFFFEL);
|
||||
// c.redraw();
|
||||
} catch (Throwable e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
}
|
||||
|
|
|
@ -40,9 +40,15 @@ public class WindowControl {
|
|||
}
|
||||
|
||||
public void setWindowAttribute(int attribute, boolean attributeValue) {
|
||||
DwmSupport.INSTANCE.DwmSetWindowAttribute(
|
||||
windowHandle, attribute, new WinDef.BOOLByReference(new WinDef.BOOL(attributeValue)), WinDef.BOOL.SIZE);
|
||||
User32.INSTANCE.UpdateWindow(windowHandle);
|
||||
DwmSupport.INSTANCE.DwmSetWindowAttribute(windowHandle, attribute, new WinDef.BOOLByReference(new WinDef.BOOL(attributeValue)), WinDef.BOOL.SIZE);
|
||||
}
|
||||
|
||||
public void setWindowAttribute(int attribute, long attributeValue) {
|
||||
DwmSupport.INSTANCE.DwmSetWindowAttribute(windowHandle, attribute, new WinDef.DWORDByReference(new WinDef.DWORD(attributeValue)), WinDef.DWORD.SIZE);
|
||||
}
|
||||
|
||||
public void redraw() {
|
||||
User32.INSTANCE.RedrawWindow(windowHandle, null, null, new WinDef.DWORD(User32.RDW_FRAME | User32.RDW_VALIDATE));
|
||||
}
|
||||
|
||||
public interface DwmSupport extends Library {
|
||||
|
|
Loading…
Reference in a new issue