edvin / tornadofx

Lightweight JavaFX Framework for Kotlin
Apache License 2.0
3.68k stars 272 forks source link

Remove percentage on ProgressIndicator #1297

Open cilki opened 4 years ago

cilki commented 4 years ago

With plain CSS, I used to do it like this:

.progress-indicator .percentage {
    -fx-fill: null;
}

I was expecting substructure CSS styles for ProgressIndicator to be similar to #676:

progressindicator {
    style {
        percentage {
            fill = Color.TRANSPARENT
        }
    }
}

But I get Unresolved reference: percentage. What am I missing here?

SchweinchenFuntik commented 4 years ago

your code css is different, there is no hierarchy in it, building the UI and building CSS are different builder

https://edvin.gitbooks.io/tornadofx-guide/content/part1/6_CSS.html?q=

style {
    progress-indicator { // psesudo name
        percentage { fill = Color.TRANSPARENT }
    }
}
cilki commented 4 years ago

When I tried that:

Unresolved reference: indicator
Unresolved reference: percentage

Is this possible to do inline or will it only work in a StyleSheet?

SchweinchenFuntik commented 4 years ago

I wrote that this is a pseudonym, you need to choose a suitable one, since the idea should prompt. Most likely, you need to remove the dash, and make the first letter of the second word uppercase

cilki commented 4 years ago

I also tried that one with the same issue. I'd like to do it inline, but I'll see if I can get it working in a StyleSheet next.