英文:
How to disable selected button hover in java-fx
问题
我试图使选定的按钮看起来完全像未选定的按钮。我只需能够检查按钮是否被点击。我尝试了几乎所有的方法,但仍然无法实现我想要的效果。现在我有这个CSS。如果按钮被选中,它的下边框会变得比其他按钮更粗。是否有可能摆脱这个问题,以便所有选定按钮的边框大小都相同?
这是它的外观:
英文:
I am trying to make selected button look completely like unselected. All I need is to be able to check whether button was clicked or not. I have tried almost everything but still can't do what I want. Now I have this css. If button is selected its
lower border becomes thicker than others. Is there any possibility to get rid of that, so all the borders of selected button will be the same size?
.button {
-fx-focus-color: transparent;
}
.button:focused {
-fx-focus-color: transparent;
-fx-faint-focus-color: transparent;
}
.button:hover {
-fx-focus-color: transparent;
-fx-faint-focus-color: transparent;
}
This is how it looks like
专注分享java语言的经验与见解,让所有开发者获益!
评论