mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Fixes
This commit is contained in:
parent
9e98004a71
commit
bf4c8d8f5b
4 changed files with 15 additions and 4 deletions
|
@ -35,7 +35,7 @@ public abstract class PlatformMode extends OperationMode {
|
|||
AppStyle.init();
|
||||
AppImages.init();
|
||||
AppLayoutModel.init();
|
||||
ModifiedStage.hook();
|
||||
ModifiedStage.init();
|
||||
TrackEvent.info("Finished essential component initialization before platform");
|
||||
|
||||
TrackEvent.info("Launching application ...");
|
||||
|
|
|
@ -13,7 +13,7 @@ public class ModifiedStage extends Stage {
|
|||
|
||||
@SneakyThrows
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void hook() {
|
||||
public static void init() {
|
||||
var windowsField = Window.class.getDeclaredField("windows");
|
||||
windowsField.setAccessible(true);
|
||||
ObservableList<Window> list = (ObservableList<Window>) windowsField.get(null);
|
||||
|
@ -32,9 +32,18 @@ public class ModifiedStage extends Stage {
|
|||
return;
|
||||
}
|
||||
|
||||
if (AppPrefs.get() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
var ctrl = new NativeWinWindowControl(stage);
|
||||
ctrl.setWindowAttribute(DmwaWindowAttribute.DWMWA_USE_IMMERSIVE_DARK_MODE.getValue(), AppPrefs.get().theme.getValue().isDark());
|
||||
var backdrop = ctrl.setWindowBackdrop(DwmSystemBackDropType.MICA_ALT);
|
||||
boolean backdrop;
|
||||
if (AppPrefs.get().performanceMode().get()) {
|
||||
backdrop = false;
|
||||
} else {
|
||||
backdrop = ctrl.setWindowBackdrop(DwmSystemBackDropType.MICA_ALT);
|
||||
}
|
||||
stage.getScene().getRoot().pseudoClassStateChanged(PseudoClass.getPseudoClass("seamless-frame"), backdrop);
|
||||
stage.getScene().getRoot().pseudoClassStateChanged(PseudoClass.getPseudoClass("separate-frame"), !backdrop);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.scroll-bar:vertical {
|
||||
-fx-pref-width: 0.3em;
|
||||
-fx-padding: 0.3em 0 0.3em 0;
|
||||
-fx-padding: 0.4em 0 0.3em 0;
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
}
|
||||
|
||||
.root:seamless-frame .background {
|
||||
-fx-background-insets: 5 0 0 0;
|
||||
-fx-border-insets: 5 0 0 0;
|
||||
-fx-background-radius: 0 10 0 0;
|
||||
-fx-border-radius: 0 10 0 0;
|
||||
-fx-border-width: 1 1 0 0;
|
||||
|
|
Loading…
Reference in a new issue