This repository was archived by the owner on Sep 28, 2024. It is now read-only.
This repository was archived by the owner on Sep 28, 2024. It is now read-only.
Open
Description
For the Drawer view, the items are automatically rotated if they're placed on either side, and I suppose it is done by this method:
tornadofx/src/main/java/tornadofx/Drawer.kt
Lines 153 to 159 in 904617a
I would like these items to be put horizontally so it can be read more easily. Basically, I want my drawer to look like this:
instead of this:
Since the method is private, I can't override it. I suppose that I can do that with CSS, but I don't know how. Here are the approaches I tried:
drawer {
item("Item 1", expanded = true) {
addClass(DrawerViewStyle.horizontalDrawerItem) // no effect
style { rotate = 0.deg } // no effect
}
style { rotate = 0.deg } // no effect
addClass(DrawerViewStyle.horizontalDrawerItem) // no effect
}
Stylesheet class:
class DrawerViewStyle: Stylesheet() {
companion object {
val horizontalDrawerItem by cssclass()
val item by css class()
}
init {
horizontalDrawerItem {
rotate = 0.deg
}
button { // no effect
rotate = 0.deg
}
item { // no effect
rotate = 0.deg
}
toggleButton { // no effect
rotate = 0.deg
}
}
}
I didn't find any guide on this and the document doesn't really help. Is there any simple way I can handle this?
Metadata
Metadata
Assignees
Labels
No labels