fix dialogs pane background
This commit is contained in:
@@ -23,7 +23,6 @@ public class Main extends Application {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) throws Exception {
|
public void start(Stage primaryStage) throws Exception {
|
||||||
loadResources();
|
|
||||||
primaryStage.setTitle("Trader");
|
primaryStage.setTitle("Trader");
|
||||||
primaryStage.setScene(new Scene(Screeners.newScreeners(Main.class.getResource("/view/main.fxml"),getUrl("style.css").toExternalForm())));
|
primaryStage.setScene(new Scene(Screeners.newScreeners(Main.class.getResource("/view/main.fxml"),getUrl("style.css").toExternalForm())));
|
||||||
primaryStage.setOnCloseRequest((we)->{
|
primaryStage.setOnCloseRequest((we)->{
|
||||||
@@ -39,6 +38,7 @@ public class Main extends Application {
|
|||||||
Screeners.showException(e);
|
Screeners.showException(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
loadResources();
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,16 +37,21 @@ public class Screeners {
|
|||||||
return mainScreen;
|
return mainScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void addStylesheet(Parent screen){
|
||||||
|
screen.getStylesheets().addAll(mainScreen.getStylesheets());
|
||||||
|
}
|
||||||
|
|
||||||
public static void loadItemDescStage(URL fxml) throws IOException {
|
public static void loadItemDescStage(URL fxml) throws IOException {
|
||||||
FXMLLoader loader = new FXMLLoader(fxml);
|
FXMLLoader loader = new FXMLLoader(fxml);
|
||||||
itemDescScreen = loader.load();
|
itemDescScreen = loader.load();
|
||||||
|
addStylesheet(itemDescScreen);
|
||||||
itemDescController = loader.getController();
|
itemDescController = loader.getController();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadVEditorStage(URL fxml) throws IOException {
|
public static void loadVEditorStage(URL fxml) throws IOException {
|
||||||
FXMLLoader loader = new FXMLLoader(fxml);
|
FXMLLoader loader = new FXMLLoader(fxml);
|
||||||
vEditorScreen = loader.load();
|
vEditorScreen = loader.load();
|
||||||
|
addStylesheet(vEditorScreen);
|
||||||
vEditorController = loader.getController();
|
vEditorController = loader.getController();
|
||||||
Stage stage = new Stage();
|
Stage stage = new Stage();
|
||||||
stage.setScene(new Scene(vEditorScreen));
|
stage.setScene(new Scene(vEditorScreen));
|
||||||
@@ -55,6 +60,7 @@ public class Screeners {
|
|||||||
public static void loadAddOfferStage(URL fxml) throws IOException {
|
public static void loadAddOfferStage(URL fxml) throws IOException {
|
||||||
FXMLLoader loader = new FXMLLoader(fxml);
|
FXMLLoader loader = new FXMLLoader(fxml);
|
||||||
editOffersScreen = loader.load();
|
editOffersScreen = loader.load();
|
||||||
|
addStylesheet(editOffersScreen);
|
||||||
oEditorController = loader.getController();
|
oEditorController = loader.getController();
|
||||||
Stage stage = new Stage();
|
Stage stage = new Stage();
|
||||||
stage.setScene(new Scene(editOffersScreen));
|
stage.setScene(new Scene(editOffersScreen));
|
||||||
@@ -63,6 +69,7 @@ public class Screeners {
|
|||||||
public static void loadOrdersStage(URL fxml) throws IOException {
|
public static void loadOrdersStage(URL fxml) throws IOException {
|
||||||
FXMLLoader loader = new FXMLLoader(fxml);
|
FXMLLoader loader = new FXMLLoader(fxml);
|
||||||
ordersScreen = loader.load();
|
ordersScreen = loader.load();
|
||||||
|
addStylesheet(ordersScreen);
|
||||||
ordersController = loader.getController();
|
ordersController = loader.getController();
|
||||||
Stage stage = new Stage();
|
Stage stage = new Stage();
|
||||||
stage.setScene(new Scene(ordersScreen));
|
stage.setScene(new Scene(ordersScreen));
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<?import ru.trader.view.support.cells.OfferCellValueImpl?>
|
<?import ru.trader.view.support.cells.OfferCellValueImpl?>
|
||||||
<?import ru.trader.view.support.cells.OfferTableCell?>
|
<?import ru.trader.view.support.cells.OfferTableCell?>
|
||||||
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
||||||
fx:controller="ru.trader.controllers.OrdersController">
|
fx:controller="ru.trader.controllers.OrdersController" styleClass="dialog">
|
||||||
<TableView fx:id="tblOrders" editable="true">
|
<TableView fx:id="tblOrders" editable="true">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn minWidth="200.0" prefWidth="200.0" text="Товар">
|
<TableColumn minWidth="200.0" prefWidth="200.0" text="Товар">
|
||||||
|
|||||||
@@ -8,4 +8,36 @@
|
|||||||
-fx-font-weight: bold;
|
-fx-font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-view:focused {
|
||||||
|
-fx-background-color: -fx-box-border, -fx-control-inner-background;
|
||||||
|
-fx-background-insets: 0,1;
|
||||||
|
-fx-background-radius: 0, 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
HBox.fields-group {
|
||||||
|
-fx-spacing: 2;
|
||||||
|
-fx-padding: 5 10;
|
||||||
|
-fx-alignment: baseline-left;
|
||||||
|
}
|
||||||
|
|
||||||
|
HBox.fields-group hbox-margin{
|
||||||
|
-fx-left: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Dialogs */
|
||||||
|
.dialog {
|
||||||
|
-fx-background-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Items */
|
||||||
|
|
||||||
|
#tblItems {
|
||||||
|
-fx-padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* support styles */
|
||||||
|
|
||||||
|
.center {
|
||||||
|
-fx-alignment: center;
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<?import javafx.scene.control.cell.PropertyValueFactory?>
|
<?import javafx.scene.control.cell.PropertyValueFactory?>
|
||||||
|
|
||||||
<VBox xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8"
|
<VBox xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8"
|
||||||
fx:controller="ru.trader.controllers.VendorEditorController">
|
fx:controller="ru.trader.controllers.VendorEditorController" styleClass="dialog">
|
||||||
<HBox alignment="CENTER" GridPane.columnSpan="3">
|
<HBox alignment="CENTER" GridPane.columnSpan="3">
|
||||||
<TextField fx:id="name" alignment="CENTER"/>
|
<TextField fx:id="name" alignment="CENTER"/>
|
||||||
</HBox>
|
</HBox>
|
||||||
|
|||||||
Reference in New Issue
Block a user