diff --git a/NOTICE.md b/NOTICE.md index d8facd5d2..b3ebc1f60 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -4,7 +4,7 @@ Copyright (c) 2014, Sebastian Stenzel Cryptomator is licensed under the MIT license. The details can be found in the accompanying license file. ## Third party softwares -Cryptomator uses third party softwares that may be licensed under different licenses. +Cryptomator uses third party libraries and fonts that may be licensed under different licenses. ### AquaFX The ProgressIndicator in ui/src/main/resource/css/mac_theme.css contains code from the AquaFX project. @@ -62,6 +62,11 @@ This product includes software developed at The Apache Software Foundation (http ResolverUtil.java Copyright 2005-2006 Tim Fennell +### Ionicons +Copyright (c) 2016 Drifty (http://drifty.com/) + +ionicons.ttf Licensed under the accompanying MIT license + ### Jackrabbit WebDAV Library Copyright 2004-2014 The Apache Software Foundation diff --git a/main/ui/src/main/java/org/cryptomator/ui/MainApplication.java b/main/ui/src/main/java/org/cryptomator/ui/MainApplication.java index 23a10293c..85e3745a3 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/MainApplication.java +++ b/main/ui/src/main/java/org/cryptomator/ui/MainApplication.java @@ -29,6 +29,7 @@ import javafx.application.Application; import javafx.application.Platform; import javafx.fxml.FXMLLoader; import javafx.scene.image.Image; +import javafx.scene.text.Font; import javafx.stage.Stage; public class MainApplication extends Application { @@ -51,6 +52,7 @@ public class MainApplication extends Application { @Override public void start(final Stage primaryStage) throws IOException { + Font.loadFont(getClass().getResourceAsStream("/css/ionicons.ttf"), 12.0); ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); FXMLLoader.setDefaultClassLoader(contextClassLoader); Platform.runLater(() -> { @@ -70,7 +72,7 @@ public class MainApplication extends Application { final ResourceBundle rb = ResourceBundle.getBundle("localization"); primaryStage.setTitle(rb.getString("app.name")); primaryStage.setResizable(false); - primaryStage.getIcons().add(new Image(MainApplication.class.getResourceAsStream("/window_icon.png"))); + primaryStage.getIcons().add(new Image(MainApplication.class.getResourceAsStream("/window_icon.png"))); primaryStage.show(); ActiveWindowStyleSupport.startObservingFocus(primaryStage); diff --git a/main/ui/src/main/java/org/cryptomator/ui/controllers/MainController.java b/main/ui/src/main/java/org/cryptomator/ui/controllers/MainController.java index b648aa25a..60229e12c 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/controllers/MainController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/controllers/MainController.java @@ -38,6 +38,7 @@ import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.geometry.Side; import javafx.scene.Parent; +import javafx.scene.control.Button; import javafx.scene.control.ContextMenu; import javafx.scene.control.ListCell; import javafx.scene.control.ListView; @@ -70,6 +71,9 @@ public class MainController extends AbstractFXMLViewController { @FXML private ToggleButton addVaultButton; + @FXML + private Button removeVaultButton; + @FXML private Pane contentPane; @@ -110,6 +114,7 @@ public class MainController extends AbstractFXMLViewController { vaultList.setItems(items); vaultList.setCellFactory(this::createDirecoryListCell); vaultList.getSelectionModel().getSelectedItems().addListener(this::selectedVaultDidChange); + removeVaultButton.disableProperty().bind(vaultList.getSelectionModel().selectedItemProperty().isNull()); this.showWelcomeView(); } diff --git a/main/ui/src/main/resources/css/ionicons.ttf b/main/ui/src/main/resources/css/ionicons.ttf new file mode 100644 index 000000000..180ce515f Binary files /dev/null and b/main/ui/src/main/resources/css/ionicons.ttf differ diff --git a/main/ui/src/main/resources/css/linux_theme.css b/main/ui/src/main/resources/css/linux_theme.css index eb749aaa4..c725308d0 100644 --- a/main/ui/src/main/resources/css/linux_theme.css +++ b/main/ui/src/main/resources/css/linux_theme.css @@ -166,20 +166,37 @@ -fx-alignment: CENTER_LEFT; } -.tool-bar.list-related-toolbar .toggle-button { - -fx-padding: 0.4em 0.8em 0.4em 0.8em; +.tool-bar.list-related-toolbar .spacer { + -fx-border-color: transparent COLOR_BORDER transparent transparent; + -fx-border-width: 1; +} + +.tool-bar.list-related-toolbar .toggle-button, +.tool-bar.list-related-toolbar .button { + -fx-font-family: Ionicons; + -fx-font-size: 1.8em; + -fx-text-fill: COLOR_TEXT; + -fx-padding: 0.2em 0.8em 0.2em 0.8em; -fx-background-color: transparent; -fx-background-insets: 1; -fx-border-color: transparent COLOR_BORDER transparent transparent; -fx-border-width: 1; } -.tool-bar.list-related-toolbar .toggle-button:hover { +.tool-bar.list-related-toolbar .toggle-button:disabled, +.tool-bar.list-related-toolbar .button:disabled { + -fx-text-fill: COLOR_TEXT_DISABLED; +} + +.tool-bar.list-related-toolbar .toggle-button:hover, +.tool-bar.list-related-toolbar .button:hover { -fx-background-color: COLOR_VGRAD_MEDIUM; } .tool-bar.list-related-toolbar .toggle-button:armed, -.tool-bar.list-related-toolbar .toggle-button:selected { +.tool-bar.list-related-toolbar .toggle-button:selected, +.tool-bar.list-related-toolbar .button:armed, +.tool-bar.list-related-toolbar .button:selected { -fx-background-color: COLOR_VGRAD_DARK; } @@ -190,6 +207,7 @@ ******************************************************************************/ .context-menu { + -fx-font-size: 12px; -fx-background-color: COLOR_BORDER, COLOR_BACKGROUND; -fx-background-insets: 0, 1; -fx-padding: 1; diff --git a/main/ui/src/main/resources/css/mac_theme.css b/main/ui/src/main/resources/css/mac_theme.css index 4e77e2453..d9c10b2a5 100644 --- a/main/ui/src/main/resources/css/mac_theme.css +++ b/main/ui/src/main/resources/css/mac_theme.css @@ -222,17 +222,33 @@ -fx-alignment: CENTER_LEFT; } -.tool-bar.list-related-toolbar .toggle-button { +.tool-bar.list-related-toolbar .spacer { + -fx-border-color: transparent COLOR_BORDER transparent transparent; + -fx-border-width: 1; +} + +.tool-bar.list-related-toolbar .toggle-button, +.tool-bar.list-related-toolbar .button { + -fx-font-family: Ionicons; + -fx-font-size: 1.4em; + -fx-text-fill: COLOR_TEXT; -fx-background-color: transparent; - -fx-padding: 0.2em 0.8em 0.2em 0.8em; + -fx-padding: 0.1em 0.6em 0.1em 0.6em; -fx-background-insets: 0; -fx-background-radius: 0; -fx-border-color: transparent COLOR_BORDER transparent transparent; -fx-border-width: 1; } +.tool-bar.list-related-toolbar .toggle-button:disabled, +.tool-bar.list-related-toolbar .button:disabled { + -fx-text-fill: COLOR_TEXT_DISABLED; +} + .tool-bar.list-related-toolbar .toggle-button:armed, -.tool-bar.list-related-toolbar .toggle-button:selected { +.tool-bar.list-related-toolbar .toggle-button:selected, +.tool-bar.list-related-toolbar .button:armed, +.tool-bar.list-related-toolbar .button:selected { -fx-background-color: linear-gradient(to bottom, #C0C0C0 0%, #ADADAD 100%); } @@ -243,6 +259,7 @@ ******************************************************************************/ .context-menu { + -fx-font-size: 13px; -fx-background-color: rgba(255.0, 255.0, 255.0, 0.9); -fx-background-insets: 0; -fx-background-radius: 4.0; diff --git a/main/ui/src/main/resources/css/win_theme.css b/main/ui/src/main/resources/css/win_theme.css index 1cc974216..11bd49458 100644 --- a/main/ui/src/main/resources/css/win_theme.css +++ b/main/ui/src/main/resources/css/win_theme.css @@ -14,6 +14,7 @@ -fx-font-size: 12px; COLOR_TEXT: #000; + COLOR_TEXT_DISABLED: #888; COLOR_HYPERLINK: #3399FF; COLOR_BORDER: #ACACAC; COLOR_BORDER_FOCUS: #3399FF; @@ -227,10 +228,22 @@ .tool-bar.list-related-toolbar { -fx-background-color: transparent; -fx-padding: 0.1em 0 0.1em 0; - -fx-spacing: 0; + -fx-spacing: 1px; -fx-alignment: CENTER_LEFT; } +.tool-bar.list-related-toolbar .toggle-button, +.tool-bar.list-related-toolbar .button { + -fx-font-family: Ionicons; + -fx-font-size: 1.4em; + -fx-text-fill: COLOR_TEXT; +} + +.tool-bar.list-related-toolbar .toggle-button:disabled, +.tool-bar.list-related-toolbar .button:disabled { + -fx-text-fill: COLOR_TEXT_DISABLED; +} + /******************************************************************************* * * * PopupMenu * @@ -238,6 +251,7 @@ ******************************************************************************/ .context-menu { + -fx-font-size: 12px; -fx-background-color: derive(COLOR_BACKGROUND, -30%), COLOR_BACKGROUND; -fx-background-insets: 0, 1; -fx-padding: 1px; diff --git a/main/ui/src/main/resources/fxml/main.fxml b/main/ui/src/main/resources/fxml/main.fxml index 216ffba7a..1dd8997d0 100644 --- a/main/ui/src/main/resources/fxml/main.fxml +++ b/main/ui/src/main/resources/fxml/main.fxml @@ -17,6 +17,8 @@ + + @@ -43,7 +45,11 @@ - + +