Skip to content

Commit

Permalink
feat: stylise help window
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuhanming committed Apr 3, 2020
1 parent caea375 commit 210f2e8
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 28 deletions.
17 changes: 17 additions & 0 deletions src/main/resources/view/Default.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,20 @@
-fx-padding: 5 0 5 20;
-fx-text-fill: #FFFFFF;
}

/** Help Window **/
.helpCopyButton {
-fx-padding: 5 5 5 5;
-fx-border-width: 1 1 1 1;
-fx-border-color: #6842E4 #6842E4 #6842E4 #6842E4;
-fx-border-radius: 2;
-fx-background-radius: 2;
-fx-background-color: transparent;
-fx-text-fill: #6842E4;
}

.helpCopyButton:hover {
-fx-cursor: hand;
-fx-background-color: #6842E4;
-fx-text-fill: #FFFFFF;
}
63 changes: 35 additions & 28 deletions src/main/resources/view/HelpWindow.fxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import java.net.URL?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.Scene?>
<?import javafx.scene.control.Button?>
Expand All @@ -8,32 +9,38 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.stage.Stage?>

<fx:root resizable="false" title="Help" type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1">
<icons>
<Image url="@/images/help_icon.png" />
</icons>
<scene>
<Scene>
<HBox alignment="CENTER">
<children>
<Label fx:id="helpMessage" text="Label">
<HBox.margin>
<Insets right="5.0" />
</HBox.margin>
</Label>
<Button fx:id="copyButton" mnemonicParsing="false" onAction="#copyUrl" text="Copy URL">
<HBox.margin>
<Insets left="5.0" />
</HBox.margin>
</Button>
</children>
<opaqueInsets>
<Insets bottom="10.0" left="5.0" right="10.0" top="5.0" />
</opaqueInsets>
<padding>
<Insets bottom="10.0" left="5.0" right="10.0" top="5.0" />
</padding>
</HBox>
</Scene>
</scene>
<fx:root resizable="false" title="Help" type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/11"
xmlns:fx="http://javafx.com/fxml/1">
<icons>
<Image url="@/images/help_icon.png"/>
</icons>
<scene>
<Scene>
<stylesheets>
<URL value="@Default.css"/>
<URL value="@DefaultExtensions.css"/>
</stylesheets>
<HBox alignment="CENTER" styleClass="app">
<children>
<Label fx:id="helpMessage" text="Label">
<HBox.margin>
<Insets right="5.0"/>
</HBox.margin>
</Label>
<Button fx:id="copyButton" mnemonicParsing="false" onAction="#copyUrl" text="Copy URL"
styleClass="helpCopyButton">
<HBox.margin>
<Insets left="5.0"/>
</HBox.margin>
</Button>
</children>
<opaqueInsets>
<Insets bottom="10.0" left="5.0" right="10.0" top="5.0"/>
</opaqueInsets>
<padding>
<Insets bottom="10.0" left="5.0" right="10.0" top="5.0"/>
</padding>
</HBox>
</Scene>
</scene>
</fx:root>

0 comments on commit 210f2e8

Please sign in to comment.