Skip to content

Commit

Permalink
Improve styling
Browse files Browse the repository at this point in the history
  • Loading branch information
erikmafo committed Nov 6, 2020
1 parent f986221 commit 6bd6ba2
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 11 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
on: [push]
on:
pull_request:
branches:
- master
push:
branches:
- master
tags:
- v*

jobs:
build:
Expand Down Expand Up @@ -38,6 +46,7 @@ jobs:
- name: Show current dir
run: ls target/release
- name: Save artifact
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.installerName }}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.erikmafo</groupId>
<artifactId>bigtableviewer</artifactId>
<version>0.2.2</version>
<version>0.2.3</version>
<packaging>jar</packaging>
<name>bigtableviewer</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import javafx.beans.value.ObservableValue;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.css.PseudoClass;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.geometry.Insets;
import javafx.scene.control.*;
import javafx.scene.input.*;
import javafx.scene.layout.VBox;
Expand Down Expand Up @@ -166,6 +166,9 @@ private String getCellValue(TreeTablePosition<BigtableRow, ?> position) {
private TreeTableColumn<BigtableRow, String> createRowKeyColumn() {
TreeTableColumn<BigtableRow, String> tableColumn = new TreeTableColumn<>(ROW_KEY);
tableColumn.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(param.getValue().getValue().getRowKey()));
tableColumn.setCellValueFactory(features -> features.getValue().isLeaf() ?
new ReadOnlyStringWrapper("") :
new ReadOnlyObjectWrapper<>(features.getValue().getValue().getRowKey()));
tableColumn.setCellFactory(new RowCellFactory());
return tableColumn;
}
Expand Down
8 changes: 6 additions & 2 deletions src/main/resources/css/bigtable_view.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.tree-table-row-cell {
-fx-border-color: grey;
-fx-table-cell-border-color: grey;
}

.has-spacing {
Expand All @@ -19,6 +17,12 @@
-fx-padding: 0.0em;
}

.tree-table-row-cell:empty{
-fx-background-color: #F8F9FB;
-fx-background-insets: 0, 0 0 1 0;
-fx-padding: 0.0em;
}

.tree-disclosure-node {
-fx-padding: 10 5 0 5;
}
6 changes: 3 additions & 3 deletions src/main/resources/css/cell_view.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.bigtable-cell-value {
-fx-padding: 5px;
-fx-border-insets: 5px;
-fx-background-insets: 5px;
-fx-padding: 2px;
-fx-border-insets: 0px;
-fx-background-insets: 0px;
}

.bigtable-cell-timestamp {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fxml/bigtable_menu_bar.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<menus>
<Menu text="File">
<items>
<MenuItem fx:id="credentialsMenu" onAction="#onManageCredentialsAction" text="Credentials"/>
<MenuItem fx:id="credentialsMenu" onAction="#onManageCredentialsAction" text="Set credentials"/>
</items>
</Menu>

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fxml/cell_view.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<bottom>
<Label fx:id="versionLabel"
BorderPane.alignment="BOTTOM_RIGHT"
BorderPane.alignment="BOTTOM_CENTER"
styleClass="bigtable-cell-timestamp"/>
</bottom>

Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/fxml/main.fxml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.VBox?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.VBox?>
<BorderPane xmlns:fx="http://javafx.com/fxml"
fx:controller="com.erikmafo.btviewer.controllers.MainController"
stylesheets="/css/main.css"
styleClass="pane-view">
<top>
<VBox>
<BorderPane.margin>
<Insets bottom="10"/>
</BorderPane.margin>
<fx:include fx:id="menuBar" source="bigtable_menu_bar.fxml"/>
</VBox>
</top>
Expand Down

0 comments on commit 6bd6ba2

Please sign in to comment.