Eclipse 切换到windows经典主题组合贡献项目时
我和经理之间确实有问题。我在这样一个视图的工具栏上添加了一个组合和微调器Eclipse 切换到windows经典主题组合贡献项目时,eclipse,eclipse-rcp,Eclipse,Eclipse Rcp,我和经理之间确实有问题。我在这样一个视图的工具栏上添加了一个组合和微调器 IToolbarManager mgr = getViewSite().getActionBars().getToolBarManager(); mgr.add(spinnerCntrAction); spinnerCntrAction = new ControContribution(){ public Control createControl(){ //Creates composite
IToolbarManager mgr = getViewSite().getActionBars().getToolBarManager();
mgr.add(spinnerCntrAction);
spinnerCntrAction = new ControContribution(){
public Control createControl(){
//Creates composite
//Create a spinner and add that to composite
//return composite
}
};
在windows XP/Vista主题中,此微调器显示正确。但当程序在WindowsClassic主题下运行时,微调器会缩小并且无法正确显示
这是一个已知的问题吗?你知道这方面的解决方法/补丁吗
谢谢
Jijoy这是SWT中的一个bug。看 以下是一个解决方法:
mgr.add(new DummyAction());
private static class DummyAction extends Action {
DummyAction() {
setEnabled(false);
setText(" ");
}
}
...
mgr.add(spinnerCntrAction);
这将导致工具栏管理器使所有控件贡献与操作大小相同,因此调整操作文本中的空格数以获得所需的结果。非常感谢您的回答。此错误在3.5.0中已修复