fix some table styling, remove debug statement

This commit is contained in:
Bixilon 2021-12-06 23:32:12 +01:00
parent 4d8f8de18c
commit 82958351e6
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
5 changed files with 16 additions and 12 deletions

View File

@ -22,5 +22,5 @@ class LightC {
* In original minecraft this setting is called brightness
* Must be non-negative and may not exceed 1
*/
var gamma by delegate(0.0f) { check(it in 0.0f..1.0f) { "Gamma must be non negative and < 1" } }
var gamma by delegate(0.0f) { check(it in 0.0f..1.0f) { "Gamma must be non-negative and <= 1" } }
}

View File

@ -15,7 +15,6 @@ package de.bixilon.minosoft.gui.eros.dialog
import de.bixilon.minosoft.Minosoft
import de.bixilon.minosoft.config.profile.delegate.watcher.SimpleProfileDelegateLWatcher.Companion.profileWatchFX
import de.bixilon.minosoft.config.profile.profiles.audio.AudioProfileManager
import de.bixilon.minosoft.config.profile.profiles.eros.ErosProfileManager
import de.bixilon.minosoft.config.profile.profiles.eros.server.entries.Server
import de.bixilon.minosoft.data.registries.ResourceLocation
@ -66,8 +65,7 @@ class UpdateServerDialog(
private var profileSelectDialog: ProfileSelectDialog? = null
private var profiles = server?.profiles ?: mutableMapOf(AudioProfileManager.namespace to "Default") // ToDo
private var profiles = server?.profiles ?: mutableMapOf()
fun show() {
JavaFXUtil.runLater {

View File

@ -178,6 +178,7 @@ class ProfileSelectDialog(
tableView.refresh()
}
}
styleClass.add("table-row-cell")
}
override fun startEdit() {
@ -201,7 +202,6 @@ class ProfileSelectDialog(
override fun update(entry: ProfileEntry) = updateItem(entry.resourceLocation)
override fun updateItem(item: ResourceLocation?) {
label.ctext = item?.toString() ?: CLICK_ME_TO_ADD
tableRow.item.resourceLocation = item
@ -223,6 +223,7 @@ class ProfileSelectDialog(
comboBox.selectionModel.select(SelectSpecialOptions.NONE)
}
}
styleClass.add("table-row-cell")
}
override fun startEdit() {
@ -262,7 +263,7 @@ class ProfileSelectDialog(
private enum class SelectSpecialOptions(override val translationKey: ResourceLocation?) : Translatable {
NONE("".toResourceLocation()),
NONE("minosoft:general.dialog.profile.select.none".toResourceLocation()),
CREATE("minosoft:general.dialog.profile.select.add".toResourceLocation()),
;
}

View File

@ -25,8 +25,8 @@
<TableView fx:id="profilesFX" editable="true" GridPane.hgrow="ALWAYS" GridPane.rowIndex="1">
<columns>
<TableColumn fx:id="typeColumnFX" minWidth="220.0" prefWidth="220.0" reorderable="false" text="Type"/>
<TableColumn fx:id="profileColumnFX" maxWidth="1.7976931348623157E308" minWidth="-1.0" prefWidth="-1.0" reorderable="false" text="Profile"/>
<TableColumn fx:id="typeColumnFX" minWidth="220.0" prefWidth="220.0" sortable="false" reorderable="false" text="Type"/>
<TableColumn fx:id="profileColumnFX" maxWidth="1.7976931348623157E308" minWidth="-1.0" prefWidth="-1.0" sortable="false" reorderable="false" text="Profile"/>
</columns>
<GridPane.margin>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>

View File

@ -287,16 +287,17 @@
.table-view {
-fx-background-color: -secondary-color;
-fx-border-width: 1px;
-fx-border-color: -secondary-light-color;
}
.table-view .table-column {
.table-view .column-header {
-fx-background-color: -secondary-light-color;
}
.table-view .placeholder {
.table-view .column-header .filler,
.table-view .column-header-background .filler {
-fx-background-color: -secondary-color;
-fx-border-width: 1px;
-fx-border-color: -secondary-light-color;
}
.table-row-cell {
@ -319,3 +320,7 @@
.table-row-cell:empty {
-fx-background-color: -secondary-color;
}
.table-row-cell:empty:selected {
-fx-background-color: -secondary-color;
}