简体   繁体   English

javafx菜单样式的麻烦

[英]trouble with a javafx menu style

can someone tell me how i can fix this padding/shadow like effect around my MenuItems? 有人可以告诉我如何在MenuItems周围修复这种填充/阴影效果吗? I dont know the Name of it so a research was hard without an exact name of it: 我不知道它的名字,所以没有确切的名字很难进行研究:

http://imagizer.imageshack.us/v2/150x100q90/901/GyPRgA.png http://imagizer.imageshack.us/v2/150x100q90/901/GyPRgA.png

This gradient isn't part of my stage background its a background which opens with the Menu like a Container holding the Menu. 这个渐变不是我的舞台背景的一部分,它的背景像打开菜单的容器一样保持着菜单。

Sorry guys its hard to explain hopefully you can help me. 抱歉,很难解释,希望您能对我有所帮助。

The screenshot i cant post fully since i got only 1 reputation so i add a link to it 屏幕快照我无法完全发布,因为我只有1个声誉,因此我向其添加了一个链接

Thanks in advance. 提前致谢。

Since i was playing around trying to figure my problem while waiting i felt onto the solution for it. 因为我一直在玩耍,试图在等待时找出问题所在,所以我找到了解决方案。

For those which have the same Problem: Solution: Since the new Modena style is used by default, the context menu's are styled with a drop shadow / Gaussian blur effect, which made when opening the Menu it gave some kind of strange effect when using an other background on the stage. 对于具有相同问题的解决方案:解决方案:由于默认使用新的Modena样式,因此上下文菜单的样式带有阴影/高斯模糊效果,当打开菜单时,使用菜单时会产生某种奇怪的效果舞台上的其他背景。

To solve this its only needed to overwrite(resetting) the style.. in my case it was the follow one which i needed to overwrite in a new css file. 为了解决这个问题,它只需要覆盖(重置)样式即可。在我的情况下,这是我需要在新的CSS文件中覆盖的下一个样式。

-fx-effect: dropshadow( gaussian , rgba(0,0,0,0.2) , 12, 0.0 , 0 , 8 ); -fx-effect:dropshadow(高斯,rgba(0,0,0,0.2),12,0.0,0,8);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM