mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-08-15 11:46:02 +00:00
introduced NotificationBar control
This commit is contained in:
@@ -3,36 +3,31 @@
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.layout.StackPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.Region?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import org.cryptomator.ui.controls.NotificationBar?>
|
||||
|
||||
<StackPane xmlns:fx="http://javafx.com/fxml"
|
||||
xmlns="http://javafx.com/javafx"
|
||||
fx:id="root"
|
||||
fx:controller="org.cryptomator.ui.mainwindow.MainWindowController"
|
||||
styleClass="main-window">
|
||||
<VBox minWidth="650">
|
||||
<HBox onMouseClicked="#showUpdatePreferences" alignment="CENTER" styleClass="notification-update" VBox.vgrow="ALWAYS" visible="${controller.updateNotificationHidden}" managed="${controller.updateNotificationHidden}">
|
||||
<Region minWidth="40"/>
|
||||
<Region HBox.hgrow="ALWAYS"/>
|
||||
<Label text="%main.notification.updateAvailable" styleClass="notification-label" />
|
||||
<Region HBox.hgrow="ALWAYS"/>
|
||||
<Button minWidth="40" text="X" onMouseClicked="#hideUpdateNotification" style="-fx-background-color: transparent; -fx-text-fill: white; -fx-font-weight: bold;"/>
|
||||
</HBox>
|
||||
<HBox onMouseClicked="#showContributePreferences" alignment="CENTER" styleClass="notification-support" VBox.vgrow="ALWAYS" visible="${controller.supportNotificationHidden}" managed="${controller.supportNotificationHidden}">
|
||||
<Region minWidth="40"/>
|
||||
<Region HBox.hgrow="ALWAYS"/>
|
||||
<Label text="%main.notification.support" styleClass="notification-label" />
|
||||
<Region HBox.hgrow="ALWAYS"/>
|
||||
<Button minWidth="40" text="X" onMouseClicked="#hideSupportNotification" style="-fx-background-color: transparent; -fx-text-fill: white; -fx-font-weight: bold;"/>
|
||||
</HBox>
|
||||
<NotificationBar onMouseClicked="#showUpdatePreferences"
|
||||
text="%main.notification.updateAvailable"
|
||||
dismissable="true"
|
||||
notify="${controller.updateAvailable}"
|
||||
styleClass="notification-update"/>
|
||||
<NotificationBar onMouseClicked="#showContributePreferences"
|
||||
text="%main.notification.support"
|
||||
dismissable="true"
|
||||
notify="${!controller.licenseValid}"
|
||||
styleClass="notification-support"/>
|
||||
<SplitPane dividerPositions="0.33" orientation="HORIZONTAL" VBox.vgrow="ALWAYS">
|
||||
<fx:include source="vault_list.fxml" SplitPane.resizableWithParent="false"/>
|
||||
<fx:include source="vault_detail.fxml" SplitPane.resizableWithParent="true"/>
|
||||
</SplitPane>
|
||||
<HBox onMouseClicked="#showGeneralPreferences" alignment="CENTER" styleClass="notification-debug" VBox.vgrow="ALWAYS" visible="${controller.debugModeEnabled}" managed="${controller.debugModeEnabled}">
|
||||
<Label text="DEBUG MODE" styleClass="notification-label"/>
|
||||
</HBox>
|
||||
<NotificationBar onMouseClicked="#showGeneralPreferences"
|
||||
text="DEBUG MODE"
|
||||
styleClass="notification-debug"
|
||||
notify="${controller.debugModeEnabled}"/>
|
||||
</VBox>
|
||||
</StackPane>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.Region?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<HBox xmlns:fx="http://javafx.com/fxml"
|
||||
xmlns="http://javafx.com/javafx"
|
||||
alignment="CENTER"
|
||||
style="-fx-alignment: center;">
|
||||
<Region minWidth="40"/>
|
||||
<Region HBox.hgrow="ALWAYS"/>
|
||||
<VBox alignment="CENTER" HBox.hgrow="ALWAYS">
|
||||
<Label fx:id="notificationLabel" styleClass="notification-label" style="-fx-alignment: center;"/>
|
||||
</VBox>
|
||||
<Region HBox.hgrow="ALWAYS"/>
|
||||
|
||||
<Button fx:id="closeButton" minWidth="40" text="X" style="-fx-background-color: transparent; -fx-text-fill: white; -fx-font-weight: bold;"/>
|
||||
</HBox>
|
||||
Reference in New Issue
Block a user