Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Redesign #1700

Closed
wants to merge 112 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
5955177
Redesign splash screen
ripcurlx Jul 24, 2018
e3f85cb
Change order of binding after object creation
ripcurlx Jul 24, 2018
4b34110
Redesign spinner
ripcurlx Jul 24, 2018
8e292ad
Redesign buttons
ripcurlx Jul 24, 2018
473d644
Redesign CheckBox
ripcurlx Jul 24, 2018
c99d0fd
Adapt CheckBox style to match design guide
ripcurlx Jul 24, 2018
3bf96e5
Redesign TableView
ripcurlx Jul 24, 2018
a0f6bec
Adapt offer book styling to match design guide more closely
ripcurlx Jul 24, 2018
e7a0edf
Redesign tabs
ripcurlx Jul 26, 2018
8c29a43
Prevent scrolling
ripcurlx Jul 26, 2018
9ea40ba
Redesign toggle buttons
ripcurlx Jul 26, 2018
009a9f3
Fix wrong text alignment
ripcurlx Jul 27, 2018
1257b3b
Redesign password fields
ripcurlx Jul 27, 2018
114010a
Use JFXTextfields for Input
ripcurlx Jul 27, 2018
91e3910
Redesign scrollbar
ripcurlx Jul 27, 2018
a6a0b79
Improve ComboBox styling
ripcurlx Aug 2, 2018
c9ffbb9
Clean up after rebase
ripcurlx Aug 13, 2018
105ae48
Fix rebase hell
ripcurlx Aug 13, 2018
2dfb0de
Update code style
ripcurlx Aug 23, 2018
96cf03f
Update all combo boxes
ripcurlx Aug 23, 2018
99cf1c5
Update editor config
ripcurlx Aug 23, 2018
004dda3
Hide combobox bar
ripcurlx Aug 23, 2018
646a16a
Remove default line in price ComboBox
ripcurlx Aug 23, 2018
2fe0ed4
Add focus highlight color for text input
ripcurlx Aug 23, 2018
a4f222f
Style RadioButton
ripcurlx Aug 23, 2018
caf531a
Always use AutoTooltipCheckBox
ripcurlx Aug 23, 2018
565eeb1
Always use AutoToolTip components
ripcurlx Aug 23, 2018
5cc881a
Fix AutoToolTipButton error
ripcurlx Aug 23, 2018
d08184f
Style table rows to match style
ripcurlx Aug 23, 2018
137623b
Fix rebase errors
ripcurlx Sep 5, 2018
cf7884d
Add password field behavior with floating text
ripcurlx Sep 13, 2018
9873360
Customize action button
ripcurlx Sep 14, 2018
c026fc5
Adapt password view
ripcurlx Sep 14, 2018
6c118db
Use label float
ripcurlx Sep 14, 2018
763a0e6
Change button and table styles
ripcurlx Sep 18, 2018
5cc7327
Use gradient background
ripcurlx Sep 18, 2018
3554ad7
Prepare for Java 10 and clean up rebase issues
ripcurlx Sep 19, 2018
de48516
Use JFXComboBox for filtering with label on top
ripcurlx Sep 20, 2018
c6324b4
Add demo class to test customization of components
ripcurlx Sep 20, 2018
911e14a
Hide border if "last" css class is applied
ripcurlx Sep 20, 2018
17fc483
Add components with static label on top
ripcurlx Sep 20, 2018
7c0344d
Use updateText to ensure uppercase characters for buttons
ripcurlx Sep 20, 2018
fd07bff
Fix padding and use translation keys
ripcurlx Sep 20, 2018
a22e5d5
Adapt create offer screen
ripcurlx Sep 24, 2018
3bb503d
Merge branch 'master' of github.com:bisq-network/bisq-desktop into re…
ripcurlx Sep 24, 2018
3b19589
Fix curly braces
ripcurlx Sep 24, 2018
b7eb18e
Fix button padding for hidden buttons
ripcurlx Sep 26, 2018
3449b53
Adapt all overlays
ripcurlx Sep 26, 2018
4cf8cd9
Get rid of scrollbar
ripcurlx Sep 26, 2018
39b6554
Add custom background image, icon and positioning for dmg bundle
ripcurlx Sep 28, 2018
bc27223
Move support icon to the right
ripcurlx Sep 28, 2018
a07f984
Adapt Offer Book View
ripcurlx Sep 28, 2018
8356266
Update images
ripcurlx Oct 16, 2018
0edbb17
Merge branch 'master' of github.com:bisq-network/bisq-desktop into re…
ripcurlx Oct 16, 2018
1cfae14
Adding missing import
ripcurlx Oct 16, 2018
73abc43
Replace missing icons
ripcurlx Oct 16, 2018
0e304f9
Merge branch 'master' of github.com:bisq-network/bisq into redesign
ripcurlx Oct 16, 2018
fbb5b8e
Use single ComboBox instead of additional label
ripcurlx Oct 16, 2018
ad4b52f
Adapt ComboBox and CheckBox positioning and layout
ripcurlx Oct 16, 2018
aad2642
Replace two column text input with single floating input field
ripcurlx Oct 16, 2018
dd56811
Update translations without colons
ripcurlx Oct 16, 2018
29adc6b
Merge branch 'master' of github.com:bisq-network/bisq into redesign
ripcurlx Oct 16, 2018
95fa813
Merge branch 'master' of github.com:bisq-network/bisq into redesign
ripcurlx Oct 16, 2018
8cec4df
Fix merging error
ripcurlx Oct 16, 2018
86f3941
Update scrollbar style
ripcurlx Oct 17, 2018
e74ee8e
Adapt header to new design
ripcurlx Oct 18, 2018
dc1f59a
Adapt new tabs style
ripcurlx Oct 18, 2018
10f1c79
Merge market price and provider
ripcurlx Oct 19, 2018
4f9ff44
Use new currency factories
ripcurlx Oct 19, 2018
9740a97
Add missing translations for market provider info
ripcurlx Oct 19, 2018
2df8934
Use currency and payment method combobox renderer in OfferBookView
ripcurlx Oct 19, 2018
4fbf857
Fix column constraints in PreferencesView
ripcurlx Oct 19, 2018
ecf8e05
Remove unused converter
ripcurlx Oct 22, 2018
5491636
Display currency name in combobox list also when no offers are available
ripcurlx Oct 22, 2018
6f1e74c
Remove unnecessary padding to prevent scolling
ripcurlx Oct 22, 2018
f9478a5
Show error below textinput instead of popup
ripcurlx Oct 22, 2018
adae651
Add fixes for not shown combobox selection values
ripcurlx Oct 22, 2018
e475147
Use SlideToggleButton
ripcurlx Oct 22, 2018
ba2277f
Use top lable with list
ripcurlx Oct 22, 2018
01cf2a4
Adapt preference view to match design template
ripcurlx Oct 22, 2018
db2cda1
Merge branch 'master' of github.com:bisq-network/bisq into redesign
ripcurlx Oct 22, 2018
cdaba9d
Merge branch 'master' of github.com:bisq-network/bisq into redesign
ripcurlx Oct 23, 2018
3dad02e
Add missing JFoenix library removed during merge
ripcurlx Oct 23, 2018
4974cef
Use tabs instead of toggle group in account section
ripcurlx Oct 23, 2018
0c01093
Style main state of account sub views to match design template and re…
ripcurlx Oct 23, 2018
15aa9c9
Updated Components Demo
ripcurlx Oct 23, 2018
4506057
Merge branch 'master' of github.com:bisq-network/bisq into redesign
ripcurlx Oct 24, 2018
d0ed219
Comment out unused code block
ripcurlx Oct 25, 2018
e99d860
Clean up CashDeposit Form and all changes related
ripcurlx Oct 25, 2018
23ab1c3
Fix wrong column span
ripcurlx Oct 25, 2018
d9b11ab
Remove colons in labels
ripcurlx Oct 25, 2018
7e5e9cb
Use abstract method to apply TradeCurrency
ripcurlx Oct 25, 2018
c3239f1
Show buttons after group
ripcurlx Oct 25, 2018
25d6df4
Clean up ChaseQuickPayForm
ripcurlx Oct 25, 2018
aed3ffe
Clean up F2FForm
ripcurlx Oct 25, 2018
a2b39e8
Clean up FasterPaymentsForm
ripcurlx Oct 25, 2018
bedf845
Clean up InteracETransferForm and remove all resource access with add…
ripcurlx Oct 25, 2018
dd72b91
Clean up MoneyBeamForm
ripcurlx Oct 25, 2018
c2b593f
Clean up MoneyGramForm
ripcurlx Oct 25, 2018
1134ce1
Clean up BankForm
ripcurlx Oct 25, 2018
05277f8
Clean up PerfectMoneyForm
ripcurlx Oct 25, 2018
543559f
Clean up RevolutForm
ripcurlx Oct 25, 2018
8ecd53f
Cleanup SameBankForm
ripcurlx Oct 25, 2018
9395e5c
Clean up SepaForm and SepaInstantForm
ripcurlx Oct 26, 2018
8c5ab57
Clean up SpecificBankForm
ripcurlx Oct 26, 2018
25bffba
Clean up SwishForm
ripcurlx Oct 26, 2018
0d85252
Clean up UpholdForm
ripcurlx Oct 26, 2018
73a9910
Clean up USPostalMoneyOrderForm
ripcurlx Oct 26, 2018
c183741
Inline unused flag
ripcurlx Oct 26, 2018
7073e44
Clean up WeChatPayForm, PerfectMoneyForm and AliPayForm
ripcurlx Oct 26, 2018
8ac43d8
Clean up WesternUnionForm
ripcurlx Oct 26, 2018
f3019b7
Clean up ClearXchangeForm (Zelle)
ripcurlx Oct 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
124 changes: 110 additions & 14 deletions desktop/src/test/java/bisq/desktop/ComponentsDemo.java
@@ -1,5 +1,6 @@
package bisq.desktop;

import bisq.desktop.components.AutoTooltipLabel;
import bisq.desktop.components.FundsTextField;
import bisq.desktop.components.InfoInputTextField;
import bisq.desktop.components.InputTextField;
Expand All @@ -11,11 +12,10 @@
import bisq.core.locale.GlobalSettings;
import bisq.core.locale.Res;

import bisq.common.util.Tuple2;
import bisq.common.util.Tuple3;

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView;
import com.jfoenix.controls.JFXBadge;
import com.jfoenix.controls.JFXSnackbar;

import javafx.application.Application;

Expand All @@ -25,18 +25,26 @@
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.layout.FlowPane;
import javafx.scene.control.ListCell;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.ToggleButton;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.scene.text.Text;
import javafx.scene.layout.StackPane;

import javafx.geometry.Pos;

import javafx.collections.FXCollections;
import javafx.collections.ObservableList;

import java.util.Locale;

import static bisq.desktop.util.FormBuilder.addFundsTextfield;
import static bisq.desktop.util.FormBuilder.getIconForLabel;
import static bisq.desktop.util.FormBuilder.addTopLabelInputTextFieldSlideToggleButton;

public class ComponentsDemo extends Application {
private JFXSnackbar bar;

public static void main(String[] args) {
launch(args);
}
Expand All @@ -45,8 +53,16 @@ public static void main(String[] args) {
public void start(Stage primaryStage) throws Exception {
final CryptoCurrency btc = new CryptoCurrency("BTC", "bitcoin");
GlobalSettings.setDefaultTradeCurrency(btc);
GlobalSettings.setLocale(Locale.US);
Res.setup();

StackPane stackPane = new StackPane();

//MainView.rootContainer = stackPane;

bar = new JFXSnackbar(stackPane);
bar.setPrefWidth(450);

GridPane gridPane = new GridPane();
gridPane.getStyleClass().add("content-pane");
gridPane.setVgap(20);
Expand All @@ -59,11 +75,29 @@ public void start(Stage primaryStage) throws Exception {
button.setDisable(true);
button.getStyleClass().add("action-button");

Label label = new Label("PORTFOLIO");
label.setStyle("-fx-background-color: green");

final JFXBadge jfxBadge = new JFXBadge(label);
jfxBadge.setPosition(Pos.TOP_RIGHT);
jfxBadge.setPrefHeight(100);
jfxBadge.setMaxWidth(110);

final Button buttonEnabled = FormBuilder.addButton(gridPane, rowIndex++, "Hello World");
buttonEnabled.setOnMouseClicked((click) -> {
//bar.enqueue(new JFXSnackbar.SnackbarEvent(Res.get("notification.walletUpdate.msg", "0.345 BTC"), "CLOSE", 3000, true, b -> bar.close()));
// new Popup<>().headLine(Res.get("popup.roundedFiatValues.headline"))
// .message(Res.get("popup.roundedFiatValues.msg", "BTC"))
// .show();
// new Notification().headLine(Res.get("notification.tradeCompleted.headline"))
// .notification(Res.get("notification.tradeCompleted.msg"))
// .autoClose()
// .show();
jfxBadge.refreshBadge();
});
buttonEnabled.getStyleClass().add("action-button");

final Tuple2<Label, InputTextField> inputTuple = FormBuilder.addLabelInputTextField(gridPane, rowIndex++, "Enter something title");
InputTextField inputTextField = inputTuple.second;
InputTextField inputTextField = FormBuilder.addInputTextField(gridPane, rowIndex++, "Enter something title");
inputTextField.setLabelFloat(true);
inputTextField.setText("Hello");
inputTextField.setPromptText("Enter something");
Expand All @@ -82,19 +116,65 @@ public void start(Stage primaryStage) throws Exception {
"Total Needed", Layout.FIRST_ROW_AND_GROUP_DISTANCE);
//fundsTextField.setText("Hello World");

final ComboBox<String> comboBox = FormBuilder.<String>addTopLabelComboBox(gridPane, rowIndex++, "Numbers","Select numbers",0).second;
final ComboBox<String> comboBox = FormBuilder.<String>addTopLabelComboBox(gridPane, rowIndex++, "Numbers", "Select currency", 0).second;
ObservableList list = FXCollections.observableArrayList();
list.addAll("eins", "zwei", "drei");
list.addAll("EUR", "USD", "GBP");
comboBox.setItems(list);
/*comboBox.setButtonCell(new ListCell<>() {
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
this.setVisible(item != null || !empty);

if (item != null && !empty) {
AnchorPane pane = new AnchorPane();
Label currency = new AutoTooltipLabel(item + " - US Dollar");
currency.getStyleClass().add("currency-label-selected");
AnchorPane.setLeftAnchor(currency, 0.0);
Label numberOfOffers = new AutoTooltipLabel("21 offers");
numberOfOffers.getStyleClass().add("offer-label-small");
AnchorPane.setRightAnchor(numberOfOffers, 0.0);
AnchorPane.setBottomAnchor(numberOfOffers, 0.0);
pane.getChildren().addAll(currency, numberOfOffers);
setGraphic(pane);
setText("");
} else {
setGraphic(null);
setText("");
}
}
});*/
comboBox.setCellFactory(p -> new ListCell<>() {
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);

if (item != null && !empty) {
HBox box = new HBox();
box.setSpacing(20);
Label currencyType = new AutoTooltipLabel("Crypto");
currencyType.getStyleClass().add("currency-label-small");
Label currency = new AutoTooltipLabel(item);
currency.getStyleClass().add("currency-label");
Label offers = new AutoTooltipLabel("Euro (21 offers)");
offers.getStyleClass().add("currency-label");
box.getChildren().addAll(currencyType, currency, offers);

setGraphic(box);
} else {
setGraphic(null);
}
}
});

Label xLabel = new Label();
// xLabel.getStyleClass().add("opaque-icon");
//final Text icon = getIconForLabel(MaterialDesignIcon.CLOSE, "2em", xLabel);
final Text icon = getIconForLabel(MaterialDesignIcon.DRAG_HORIZONTAL, "2em", xLabel);
icon.getStyleClass().add("opaque-icon");
//final Text icon = getIconForLabel(MaterialDesignIcon.CLOSE, "2em", xLabel);
/*icon.getStyleClass().add("opaque-icon");
GridPane.setRowIndex(xLabel, rowIndex++);
GridPane.setColumnIndex(xLabel, 0);
gridPane.getChildren().add(xLabel);
gridPane.getChildren().add(xLabel);*/

// FlowPane iconsPane = new FlowPane(3,3);
// for (MaterialDesignIcon ic : MaterialDesignIcon.values()) {
Expand All @@ -104,7 +184,23 @@ public void start(Stage primaryStage) throws Exception {
// GridPane.setRowIndex(iconsPane, rowIndex++);
// gridPane.getChildren().add(iconsPane);

Scene scene = new Scene(gridPane, 1000, 650);
jfxBadge.setText("2");
// jfxBadge.setEnabled(false);
GridPane.setRowIndex(jfxBadge, rowIndex++);
GridPane.setColumnIndex(jfxBadge, 0);
gridPane.getChildren().add(jfxBadge);

Tuple3<Label, InputTextField, ToggleButton> tuple = addTopLabelInputTextFieldSlideToggleButton(gridPane, ++rowIndex,
Res.get("setting.preferences.txFee"), Res.get("setting.preferences.useCustomValue"));
tuple.second.setDisable(true);

FormBuilder.addInputTextField(gridPane, ++rowIndex, Res.get("setting.preferences.deviation"));

final ScrollPane scrollPane = new ScrollPane();
scrollPane.setContent(gridPane);
stackPane.getChildren().add(scrollPane);

Scene scene = new Scene(stackPane, 1000, 650);
scene.getStylesheets().setAll(
"/bisq/desktop/bisq.css",
"/bisq/desktop/images.css");
Expand Down