mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 15:40:23 +00:00
File browser visual improvements and bug fixes
This commit is contained in:
parent
5b0fca5a14
commit
e3b6ed2de3
6 changed files with 23 additions and 14 deletions
|
@ -35,7 +35,7 @@ public class FileListCompEntry {
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void onMouseClick(MouseEvent t) {
|
public void onMouseClick(MouseEvent t) {
|
||||||
if (item == null || isSynthetic()) {
|
if (item == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,10 @@ public class FileListCompEntry {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isSynthetic()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (t.getButton() == MouseButton.PRIMARY && t.isShiftDown()) {
|
if (t.getButton() == MouseButton.PRIMARY && t.isShiftDown()) {
|
||||||
var tv = ((TableView<FileSystem.FileEntry>) row.getParent().getParent().getParent().getParent());
|
var tv = ((TableView<FileSystem.FileEntry>) row.getParent().getParent().getParent().getParent());
|
||||||
var all = tv.getItems();
|
var all = tv.getItems();
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class LocalFileTransferComp extends SimpleComp {
|
||||||
new StackComp(List.of(background)).grow(true, true).styleClass("download-background");
|
new StackComp(List.of(background)).grow(true, true).styleClass("download-background");
|
||||||
|
|
||||||
var binding = BindingsHelper.mappedContentBinding(stage.getItems(), item -> item.getFileEntry());
|
var binding = BindingsHelper.mappedContentBinding(stage.getItems(), item -> item.getFileEntry());
|
||||||
var list = new SelectedFileListComp(binding).apply(struc -> struc.get().setMinHeight(200)).grow(false, true);
|
var list = new SelectedFileListComp(binding).apply(struc -> struc.get().setMinHeight(150)).grow(false, true);
|
||||||
var dragNotice = new LabelComp(AppI18n.observable("dragFiles"))
|
var dragNotice = new LabelComp(AppI18n.observable("dragFiles"))
|
||||||
.apply(struc -> struc.get().setGraphic(new FontIcon("mdi2e-export")))
|
.apply(struc -> struc.get().setGraphic(new FontIcon("mdi2e-export")))
|
||||||
.hide(BindingsHelper.persist(Bindings.isEmpty(stage.getItems())))
|
.hide(BindingsHelper.persist(Bindings.isEmpty(stage.getItems())))
|
||||||
|
|
|
@ -76,6 +76,10 @@ final class OpenFileSystemModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Optional<String> cd(String path) {
|
public Optional<String> cd(String path) {
|
||||||
|
if (Objects.equals(path, currentPath.get())) {
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
|
||||||
String newPath = null;
|
String newPath = null;
|
||||||
try {
|
try {
|
||||||
newPath = FileSystemHelper.resolveDirectoryPath(this, path);
|
newPath = FileSystemHelper.resolveDirectoryPath(this, path);
|
||||||
|
|
|
@ -214,7 +214,7 @@ public class StoreEntryComp extends SimpleComp {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Comp<?> createSettingsButton() {
|
private Comp<?> createSettingsButton() {
|
||||||
var settingsButton = new IconButtonComp("mdi2v-view-headline");
|
var settingsButton = new IconButtonComp("mdomz-settings");
|
||||||
settingsButton.styleClass("settings");
|
settingsButton.styleClass("settings");
|
||||||
settingsButton.apply(new PopupMenuAugment<>(true) {
|
settingsButton.apply(new PopupMenuAugment<>(true) {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class StoreEntrySection extends Comp<CompStructure<VBox>> {
|
||||||
public CompStructure<VBox> createBase() {
|
public CompStructure<VBox> createBase() {
|
||||||
var root = new StoreEntryComp(section.getWrapper()).apply(struc -> HBox.setHgrow(struc.get(), Priority.ALWAYS));
|
var root = new StoreEntryComp(section.getWrapper()).apply(struc -> HBox.setHgrow(struc.get(), Priority.ALWAYS));
|
||||||
var icon = Comp.of(() -> {
|
var icon = Comp.of(() -> {
|
||||||
var padding = new FontIcon("mdal-arrow_forward_ios");
|
var padding = new FontIcon("mdi2c-circle-double");
|
||||||
padding.setIconSize(14);
|
padding.setIconSize(14);
|
||||||
var pain = new StackPane(padding);
|
var pain = new StackPane(padding);
|
||||||
pain.setMinWidth(20);
|
pain.setMinWidth(20);
|
||||||
|
@ -58,6 +58,8 @@ public class StoreEntrySection extends Comp<CompStructure<VBox>> {
|
||||||
new HorizontalComp(topEntryList),
|
new HorizontalComp(topEntryList),
|
||||||
new HorizontalComp(List.of(spacer, content))
|
new HorizontalComp(List.of(spacer, content))
|
||||||
.apply(struc -> struc.get().setFillHeight(true))
|
.apply(struc -> struc.get().setFillHeight(true))
|
||||||
.hide(BindingsHelper.persist(Bindings.size(section.getChildren()).isEqualTo(0))))).createStructure();
|
.hide(BindingsHelper.persist(
|
||||||
|
Bindings.size(section.getChildren()).isEqualTo(0)))))
|
||||||
|
.createStructure();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
.download-background {
|
.download-background {
|
||||||
-fx-border-color: -color-neutral-emphasis;
|
-fx-border-color: -color-neutral-muted;
|
||||||
-fx-border-width: 1px 0 0 0;
|
-fx-border-width: 4px 0 0 0;
|
||||||
-fx-padding: 1em;
|
-fx-padding: 1em;
|
||||||
-fx-background-color: -color-neutral-muted;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.selected-file-list {
|
.selected-file-list {
|
||||||
|
|
Loading…
Reference in a new issue