It seems to be impossible to reduce the distance between text and arrow of a ComboBox.
If I use the css:
.combo-box-base > *.arrow-button {
-fx-padding: 0 0 0 0;
-fx-background-color: pink, pink, pink, pink; <- just to make the button bound visible
}
the arrow button gets smaller but the ComboBox itself still have the same size, only increasing the gap between the arrow and text to compensate.
If I do
.combo-box > .list-cell {
-fx-padding: 0 0 0 0;
-fx-border-insets: 0 0 0 0;
}
The combo get a smaller height but the width remain fixed.
Since all padding except the distance between the text and arrow can be reduced I recon this is an oversight/bug. To make a version of the ComboBox for where space is sparse this whitespace needs to be reduced.
A screenshot is available here: http://stackoverflow.com/questions/24852429/making-a-smaller-javafx-combobox
If I use the css:
.combo-box-base > *.arrow-button {
-fx-padding: 0 0 0 0;
-fx-background-color: pink, pink, pink, pink; <- just to make the button bound visible
}
the arrow button gets smaller but the ComboBox itself still have the same size, only increasing the gap between the arrow and text to compensate.
If I do
.combo-box > .list-cell {
-fx-padding: 0 0 0 0;
-fx-border-insets: 0 0 0 0;
}
The combo get a smaller height but the width remain fixed.
Since all padding except the distance between the text and arrow can be reduced I recon this is an oversight/bug. To make a version of the ComboBox for where space is sparse this whitespace needs to be reduced.
A screenshot is available here: http://stackoverflow.com/questions/24852429/making-a-smaller-javafx-combobox