improved css

This commit is contained in:
Stephan Richter
2020-12-05 23:14:24 +01:00
parent fd12d2b515
commit cd96006d7c
3 changed files with 18 additions and 10 deletions

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.srsoftware</groupId>
<artifactId>web4rail</artifactId>
<version>1.2.27</version>
<version>1.2.28</version>
<name>Web4Rail</name>
<packaging>jar</packaging>
<description>Java Model Railway Control</description>

View File

@@ -7,7 +7,10 @@ html{
}
body{
min-height: 100%;
background: rgb(198,219,210);
background-size: 30px 30px;
background-image:
linear-gradient(to right, grey 1px, transparent 1px),
linear-gradient(to bottom, grey 1px, transparent 1px);
}
button{
border: 1px solid blue;
@@ -36,11 +39,14 @@ button{
}
.tile{
border: 1px solid black;
width: 30px;
height: 30px;
position: absolute;
}
.tile.fill{
background: white;
border: 1px solid black;
}
.crossH{

View File

@@ -32,13 +32,6 @@ public class TextDisplay extends StretchableTile {
return super.load(json);
}
@Override
public Tag tag(Map<String, Object> replacements) throws IOException {
if (isNull(replacements)) replacements = new HashMap<String, Object>();
replacements.put("%text%",text);
return super.tag(replacements);
}
@Override
protected Window properties(List<Fieldset> preForm, FormInput formInputs, List<Fieldset> postForm) {
formInputs.add(t("Text"),new Input(TEXT, text));
@@ -61,6 +54,15 @@ public class TextDisplay extends StretchableTile {
protected String stretchType() {
return t("Width");
}
@Override
public Tag tag(Map<String, Object> replacements) throws IOException {
if (isNull(replacements)) replacements = new HashMap<String, Object>();
replacements.put("%text%",text);
Tag tag = super.tag(replacements);
return tag.clazz(tag.get("class")+" fill");
}
public TextDisplay text(String tx) {
text = tx;