Fixed styleSheet mess regarding the Lists
This commit is contained in:
parent
b156400227
commit
149f351673
@ -28,7 +28,6 @@ public class ChatControl extends HBox {
|
|||||||
|
|
||||||
// Contact control
|
// Contact control
|
||||||
getChildren().add(new ContactControl(chat.getRecipient()));
|
getChildren().add(new ContactControl(chat.getRecipient()));
|
||||||
|
|
||||||
// Unread messages
|
// Unread messages
|
||||||
if (chat.getUnreadAmount() != 0) {
|
if (chat.getUnreadAmount() != 0) {
|
||||||
Region spacing = new Region();
|
Region spacing = new Region();
|
||||||
@ -43,5 +42,6 @@ public class ChatControl extends HBox {
|
|||||||
vBox2.getChildren().add(unreadMessagesLabel);
|
vBox2.getChildren().add(unreadMessagesLabel);
|
||||||
getChildren().add(vBox2);
|
getChildren().add(vBox2);
|
||||||
}
|
}
|
||||||
|
getStyleClass().add("listElement");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,5 +39,6 @@ public class ContactControl extends VBox {
|
|||||||
} else {
|
} else {
|
||||||
getChildren().add(new Label(contact.getContacts().size() + " members"));
|
getChildren().add(new Label(contact.getContacts().size() + " members"));
|
||||||
}
|
}
|
||||||
|
getStyleClass().add("listElement");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,10 @@ public final class ListCellFactory<T> implements Callback<ListView<T>, ListCell<
|
|||||||
|
|
||||||
private ListView<? extends T> listView;
|
private ListView<? extends T> listView;
|
||||||
|
|
||||||
private GenericListCell(ListView<? extends T> listView) { this.listView = listView; }
|
private GenericListCell(ListView<? extends T> listView) {
|
||||||
|
this.listView = listView;
|
||||||
|
getStyleClass().add("listElement");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void updateItem(T item, boolean empty) {
|
protected void updateItem(T item, boolean empty) {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
-fx-background-color: lightgray;
|
-fx-background-color: lightgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-view, .list-cell, #messageEnterContainer, .text-field, .password-field, .tooltip, .pane, .pane .content, .vbox, .titled-pane > .title, .titled-pane > *.content, .context-menu, .menu-item {
|
#messageList, .text-field, .password-field, .tooltip, .pane, .pane .content, .vbox, .titled-pane > .title, .titled-pane > *.content, .context-menu, .menu-item {
|
||||||
-fx-background-color: #262626;
|
-fx-background-color: #262626;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,3 +46,14 @@
|
|||||||
-fx-background-color: rgb(25, 25, 25);
|
-fx-background-color: rgb(25, 25, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#chatList {
|
||||||
|
-fx-background-color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listElement {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#messageEnterContainer {
|
||||||
|
-fx-background-color: #363636;
|
||||||
|
}
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<RowConstraints maxHeight="120.0" minHeight="40.0" prefHeight="83.333251953125" vgrow="NEVER" />
|
<RowConstraints maxHeight="120.0" minHeight="40.0" prefHeight="83.333251953125" vgrow="NEVER" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<ListView fx:id="chatList" onMouseClicked="#chatListClicked" prefHeight="211.0" prefWidth="300.0" GridPane.rowIndex="1" GridPane.rowSpan="2147483647">
|
<ListView id="chatList" fx:id="chatList" onMouseClicked="#chatListClicked" prefHeight="211.0" prefWidth="300.0" GridPane.rowIndex="1" GridPane.rowSpan="2147483647">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets right="4.0" top="1.0" />
|
<Insets right="2.0" top="1.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<padding>
|
<padding>
|
||||||
<Insets bottom="5.0" left="5.0" right="2.0" top="5.0" />
|
<Insets bottom="5.0" left="5.0" right="2.0" top="5.0" />
|
||||||
@ -59,7 +59,7 @@
|
|||||||
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</Button>
|
</Button>
|
||||||
<ListView fx:id="messageList" GridPane.columnIndex="1" GridPane.columnSpan="2147483647" GridPane.rowIndex="1" GridPane.rowSpan="2">
|
<ListView id="messageList" fx:id="messageList" GridPane.columnIndex="1" GridPane.columnSpan="2147483647" GridPane.rowIndex="1" GridPane.rowSpan="2">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets />
|
<Insets />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
|
Reference in New Issue
Block a user