Extract inline styles

This commit is contained in:
Christoph Atteneder 2017-12-15 11:38:49 +01:00
parent b003322a49
commit 47f6965090
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B
7 changed files with 44 additions and 25 deletions

View file

@ -105,6 +105,7 @@ bg color of non edit textFields: fafafa
* * * *
********************************************************************************************************************/ ********************************************************************************************************************/
/* Text */
.error-text { .error-text {
-fx-text-fill: -bs-error-red; -fx-text-fill: -bs-error-red;
} }
@ -130,14 +131,37 @@ bg color of non edit textFields: fafafa
-fx-font-size: 22; -fx-font-size: 22;
} }
.show-hand { /* Other UI Elements */
-fx-cursor: hand;
}
.separator { .separator {
-fx-background: -bs-light-grey; -fx-background: -bs-light-grey;
} }
/* Behavior */
.show-hand {
-fx-cursor: hand;
}
.hide-focus {
-fx-focus-color: transparent;
}
/* Font */
.very-small-text {
-fx-font-size: 9;
}
.small-text {
-fx-font-size: 10;
}
.normal-text {
-fx-font-size: 12;
}
/* Splash */ /* Splash */
#splash { #splash {
@ -184,10 +208,6 @@ bg color of non edit textFields: fafafa
-fx-fill: -fx-accent; -fx-fill: -fx-accent;
} }
#nav-button-label {
-fx-font-size: 10;
}
#nav-balance-label { #nav-balance-label {
-fx-font-size: 10; -fx-font-size: 10;
-fx-alignment: center; -fx-alignment: center;
@ -218,10 +238,6 @@ bg color of non edit textFields: fafafa
-fx-background-color: -bs-bg-light; -fx-background-color: -bs-bg-light;
} }
#feedback-text {
-fx-font-size: 10;
}
#label-url { #label-url {
-fx-cursor: hand; -fx-cursor: hand;
-fx-text-fill: -bs-blue; -fx-text-fill: -bs-blue;
@ -501,6 +517,16 @@ textfield */
-fx-cursor: hand; -fx-cursor: hand;
} }
/*******************************************************************************
* *
* Textarea *
* *
******************************************************************************/
.text-area {
-fx-border-color: -bs-bg-grey;
}
/******************************************************************************* /*******************************************************************************
* * * *
* Tab pane * * Tab pane *

View file

@ -114,7 +114,7 @@ public class InfoDisplay extends Parent {
label.prefWidthProperty().bind(textFlow.widthProperty()); label.prefWidthProperty().bind(textFlow.widthProperty());
link.setVisited(false); link.setVisited(false);
// focus border is a bit confusing here so we remove it // focus border is a bit confusing here so we remove it
link.setStyle("-fx-focus-color: transparent;"); link.getStyleClass().add("hide-focus");
link.setOnAction(onAction.get()); link.setOnAction(onAction.get());
getParent().layout(); getParent().layout();
} else { } else {

View file

@ -707,7 +707,7 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
messageLabel.setWrapText(true); messageLabel.setWrapText(true);
headerLabel.setTextAlignment(TextAlignment.CENTER); headerLabel.setTextAlignment(TextAlignment.CENTER);
attachmentsBox.setSpacing(5); attachmentsBox.setSpacing(5);
statusIcon.setStyle("-fx-font-size: 10;"); statusIcon.getStyleClass().add("small-text");
copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard"))); copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard")));
messageAnchorPane.getChildren().addAll(bg, arrow, headerLabel, messageLabel, copyIcon, attachmentsBox, statusIcon); messageAnchorPane.getChildren().addAll(bg, arrow, headerLabel, messageLabel, copyIcon, attachmentsBox, statusIcon);
} }

View file

@ -85,7 +85,7 @@ public class ShowWalletDataWindow extends Overlay<ShowWalletDataWindow> {
Label label = labelTextAreaTuple2.first; Label label = labelTextAreaTuple2.first;
label.setMinWidth(150); label.setMinWidth(150);
textArea.setPrefHeight(500); textArea.setPrefHeight(500);
textArea.setStyle("-fx-font-size: 10;"); textArea.getStyleClass().add("small-text");
CheckBox isUpdateCheckBox = addLabelCheckBox(gridPane, ++rowIndex, CheckBox isUpdateCheckBox = addLabelCheckBox(gridPane, ++rowIndex,
Res.get("showWalletDataWindow.includePrivKeys"), "").second; Res.get("showWalletDataWindow.includePrivKeys"), "").second;
isUpdateCheckBox.setSelected(false); isUpdateCheckBox.setSelected(false);

View file

@ -79,11 +79,11 @@ public class TacWindow extends Overlay<TacWindow> {
@Override @Override
protected void addMessage() { protected void addMessage() {
super.addMessage(); super.addMessage();
String fontSize = smallScreen ? "9" : "12"; String fontStyleClass = smallScreen ? "small-text" : "normal-text";
messageLabel.setStyle("-fx-font-size: " + fontSize + ";"); messageLabel.getStyleClass().add(fontStyleClass)
HyperlinkWithIcon hyperlinkWithIcon = addHyperlinkWithIcon(gridPane, ++rowIndex, Res.get("tacWindow.arbitrationSystem"), HyperlinkWithIcon hyperlinkWithIcon = addHyperlinkWithIcon(gridPane, ++rowIndex, Res.get("tacWindow.arbitrationSystem"),
"https://bisq.network/arbitration_system.pdf"); "https://bisq.network/arbitration_system.pdf");
hyperlinkWithIcon.setStyle("-fx-font-size: " + fontSize + ";"); hyperlinkWithIcon.getStyleClass().add(fontStyleClass);
GridPane.setMargin(hyperlinkWithIcon, new Insets(-6, 0, -20, -4)); GridPane.setMargin(hyperlinkWithIcon, new Insets(-6, 0, -20, -4));
} }

View file

@ -266,7 +266,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
Tuple2<Label, TextArea> tuple = addLabelTextArea(gridPane, ++rowIndex, Res.get("seed.seedWords"), "", 5); Tuple2<Label, TextArea> tuple = addLabelTextArea(gridPane, ++rowIndex, Res.get("seed.seedWords"), "", 5);
seedWordsTextArea = tuple.second; seedWordsTextArea = tuple.second;
seedWordsTextArea.setPrefHeight(60); seedWordsTextArea.setPrefHeight(60);
seedWordsTextArea.setStyle("-fx-border-color: #ddd;"); seedWordsTextArea.getStyleClass().add("text-area");
Tuple2<Label, DatePicker> labelDatePickerTuple2 = addLabelDatePicker(gridPane, ++rowIndex, Tuple2<Label, DatePicker> labelDatePickerTuple2 = addLabelDatePicker(gridPane, ++rowIndex,
Res.get("seed.creationDate")); Res.get("seed.creationDate"));

View file

@ -307,13 +307,6 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
public void updateItem(final PendingTradesListItem item, boolean empty) { public void updateItem(final PendingTradesListItem item, boolean empty) {
super.updateItem(item, empty); super.updateItem(item, empty);
if (item != null && !empty) { if (item != null && !empty) {
/* if (model.showDispute(item.getTrade())) {
setStyle("-fx-text-fill: -bs-error-red");
} else if (model.showWarning(item.getTrade())) {
setStyle("-fx-text-fill: -bs-warning");
} else {
setId("-fx-text-fill: black");
}*/
setText(formatter.formatDateTime(item.getTrade().getDate())); setText(formatter.formatDateTime(item.getTrade().getDate()));
} else { } else {
setText(null); setText(null);