gc.drawRectangle(drawRect);
}
}
else if (theme instanceof OfficeThemeRender)
{
OfficeThemeRender themeRender = (OfficeThemeRender) theme;
Color[] colors = null;
if (selected)
{
if (mc == null)
{
colors = new Color[] {
themeRender.getTool_item_outer_top_selected1(),
themeRender.getTool_item_outer_top_selected2(),
themeRender.getTool_item_outer_bottom_selected1(),
themeRender.getTool_item_outer_bottom_selected2(),
themeRender.getTool_item_inner_top_selected1(),
themeRender.getTool_item_inner_top_selected2(),
themeRender.getTool_item_inner_bottom_selected1(),
themeRender.getTool_item_inner_bottom_selected2(),
themeRender.getTool_item_border_selected(), };
drawGradientBack(gc, drawRect, colors);
drawGradientBorder(gc, drawRect, colors);
}
else
{
if (menuTracked || (mc.getMenu() != null && !mc.canSelected()))
{
colors = new Color[] {
themeRender
.getTool_item_outer_top_showmenu_color1(),
themeRender
.getTool_item_outer_top_showmenu_color2(),
themeRender
.getTool_item_outer_bottom_showmenu_color1(),
themeRender
.getTool_item_outer_bottom_showmenu_color2(),
themeRender
.getTool_item_inner_top_showmenu_color1(),
themeRender
.getTool_item_inner_top_showmenu_color2(),
themeRender
.getTool_item_inner_bottom_showmenu_color1(),
themeRender
.getTool_item_inner_bottom_showmenu_color2(),
themeRender.getTool_item_border_showmenu_color(), };
drawGradientBack(gc, drawRect, colors);
drawGradientBorder(gc, drawRect, colors);
}
else
{
colors = new Color[] {
themeRender.getTool_item_outer_top_selected1(),
themeRender.getTool_item_outer_top_selected2(),
themeRender.getTool_item_outer_bottom_selected1(),
themeRender.getTool_item_outer_bottom_selected2(),
themeRender.getTool_item_inner_top_selected1(),
themeRender.getTool_item_inner_top_selected2(),
themeRender.getTool_item_inner_bottom_selected1(),
themeRender.getTool_item_inner_bottom_selected2(),
themeRender.getTool_item_border_selected(), };
if (mc.getMenu() != null)
{
drawGradientBack(gc, getNonMenuRect(dc), colors);
colors = new Color[] {
themeRender.getTool_item_outer_top_track1(),
themeRender.getTool_item_outer_top_track2(),
themeRender.getTool_item_outer_bottom_track1(),
themeRender.getTool_item_outer_bottom_track2(),
themeRender.getTool_item_inner_top_track1(),
themeRender.getTool_item_inner_top_track2(),
themeRender.getTool_item_inner_bottom_track1(),
themeRender.getTool_item_inner_bottom_track2(),
themeRender.getTool_item_border_track(), };
drawGradientBack(gc, getMenuRect(dc), colors);
}
else
drawGradientBack(gc, drawRect, colors);
drawGradientBorder(gc, drawRect, colors);
}
}
}
else if (mc != null && (mc.getStyle() & SWT.CHECK) != 0
&& mc.getSelection())
{
colors = new Color[] {
themeRender.getTool_item_outer_top_checked_track1(),
themeRender.getTool_item_outer_top_checked_track2(),
themeRender.getTool_item_outer_bottom_checked_track1(),
themeRender.getTool_item_outer_bottom_checked_track2(),
themeRender.getTool_item_inner_top_checked_track1(),
themeRender.getTool_item_inner_top_checked_track2(),
themeRender.getTool_item_inner_bottom_checked_track1(),
themeRender.getTool_item_inner_bottom_checked_track2(),
themeRender.getTool_item_border_checked_track(), };
drawGradientBack(gc, drawRect, colors);
drawGradientBorder(gc, drawRect, colors);
}
else
{
colors = new Color[] {
themeRender.getTool_item_outer_top_track1(),
themeRender.getTool_item_outer_top_track2(),
themeRender.getTool_item_outer_bottom_track1(),
themeRender.getTool_item_outer_bottom_track2(),
themeRender.getTool_item_inner_top_track1(),
themeRender.getTool_item_inner_top_track2(),
themeRender.getTool_item_inner_bottom_track1(),
themeRender.getTool_item_inner_bottom_track2(),
themeRender.getTool_item_border_track(), };
drawGradientBack(gc, drawRect, colors);
drawGradientBorder(gc, drawRect, colors);
}
}
else if (theme instanceof GlossyThemeRender)
{
drawGlossyItem(gc, drawRect, dc, tracked);
}
if (selected) showMenuShadow(gc, dc.getDrawRect(), dc.getToolItem());
}
else if (mc != null && (mc.getStyle() & SWT.CHECK) != 0 && mc.getSelection())
{
if (theme instanceof GeneralThemeRender)
{
GeneralThemeRender themeRender = (GeneralThemeRender) theme;
gc
.setForeground(themeRender
.getTool_item_check_selection_bg_normal1());
gc
.setBackground(themeRender
.getTool_item_check_selection_bg_normal2());
gc.fillGradientRectangle(drawRect.x, drawRect.y, drawRect.width,
drawRect.height, true);
gc.setForeground(themeRender.getTool_item_check_selection_fg_normal());
gc.drawRectangle(drawRect);
}
else if (theme instanceof OfficeThemeRender)
{
OfficeThemeRender themeRender = (OfficeThemeRender) theme;
Color[] colors = new Color[] {
themeRender.getTool_item_outer_top_checked1(),
themeRender.getTool_item_outer_top_checked2(),
themeRender.getTool_item_outer_bottom_checked1(),
themeRender.getTool_item_outer_bottom_checked2(),
themeRender.getTool_item_inner_top_checked1(),
themeRender.getTool_item_inner_top_checked2(),
themeRender.getTool_item_inner_bottom_checked1(),
themeRender.getTool_item_inner_bottom_checked2(),
themeRender.getTool_item_border_checked(), };
drawGradientBack(gc, drawRect, colors);
drawGradientBorder(gc, drawRect, colors);
}
else if (theme instanceof GlossyThemeRender)
{