提交 ffe31786 编写于 作者: J jurgen

Folder list items background fix

上级 a1e7f4d1
...@@ -86,8 +86,7 @@ public class FolderList extends Composite { ...@@ -86,8 +86,7 @@ public class FolderList extends Composite {
private Color listBackground; private Color listBackground;
private Color hoverGradientStart; private Color hoverGradientStart;
private Color hoverGradientEnd; private Color hoverGradientEnd;
private Color defaultGradientStart; private Color elementBackground;
private Color defaultGradientEnd;
private Color indentedDefaultBackground; private Color indentedDefaultBackground;
private Color indentedHoverBackground; private Color indentedHoverBackground;
private Color navigationElementShadowStroke; private Color navigationElementShadowStroke;
...@@ -203,9 +202,10 @@ public class FolderList extends Composite { ...@@ -203,9 +202,10 @@ public class FolderList extends Composite {
e.gc.setBackground(indentedDefaultBackground); e.gc.setBackground(indentedDefaultBackground);
e.gc.fillRectangle(0, 2, bounds.width - 1, bounds.height - 1); e.gc.fillRectangle(0, 2, bounds.width - 1, bounds.height - 1);
} else { } else {
e.gc.setForeground(defaultGradientStart); e.gc.setBackground(elementBackground);
e.gc.setBackground(defaultGradientEnd); e.gc.fillRectangle(0, 2, bounds.width - 1, bounds.height - 1);
e.gc.fillGradientRectangle(0, 2, bounds.width - 1, bounds.height - 1, true); //e.gc.setBackground(defaultGradientEnd);
//e.gc.fillGradientRectangle(0, 2, bounds.width - 1, bounds.height - 1, true);
} }
if (!selected) { if (!selected) {
...@@ -750,11 +750,20 @@ public class FolderList extends Composite { ...@@ -750,11 +750,20 @@ public class FolderList extends Composite {
* white 20% + INFO_BACKGROUND 60% end colour WIDGET_NORMAL_SHADOW 100% + * white 20% + INFO_BACKGROUND 60% end colour WIDGET_NORMAL_SHADOW 100% +
* INFO_BACKGROUND 40% * INFO_BACKGROUND 40%
*/ */
/*
defaultGradientStart = sharedColors.getColor( defaultGradientStart = sharedColors.getColor(
UIUtils.blend(infoBackground, UIUtils.blend(infoBackground,
UIUtils.blend(white, widgetNormalShadow.getRGB(), 20), 60) UIUtils.blend(white, widgetNormalShadow.getRGB(), 20), 60)
); );
defaultGradientEnd = sharedColors.getColor(UIUtils.blend(infoBackground, widgetNormalShadow.getRGB(), 40)); defaultGradientEnd = sharedColors.getColor(UIUtils.blend(infoBackground, widgetNormalShadow.getRGB(), 40));
*/
if (widgetNormalShadow.hashCode() < widgetBackground.hashCode()) {
// Foreground darker than background - make element background darker
elementBackground = sharedColors.getColor(UIUtils.blend(black, widgetBackground.getRGB(), 15));
} else {
// Make element background lighter
elementBackground = sharedColors.getColor(UIUtils.blend(white, widgetBackground.getRGB(), 15));
}
navigationElementShadowStroke = sharedColors.getColor(UIUtils.blend(white, widgetNormalShadow.getRGB(), 55)); navigationElementShadowStroke = sharedColors.getColor(UIUtils.blend(white, widgetNormalShadow.getRGB(), 55));
bottomNavigationElementShadowStroke1 = sharedColors.getColor(UIUtils.blend(black, widgetBackground.getRGB(), 10)); bottomNavigationElementShadowStroke1 = sharedColors.getColor(UIUtils.blend(black, widgetBackground.getRGB(), 10));
......
...@@ -1569,7 +1569,7 @@ public class SQLEditor extends SQLEditorBase implements ...@@ -1569,7 +1569,7 @@ public class SQLEditor extends SQLEditorBase implements
if (outputViewer.isHasNewOutput()) { if (outputViewer.isHasNewOutput()) {
outputViewer.scrollToEnd(); outputViewer.scrollToEnd();
CTabItem outputItem = UIUtils.getTabItem(resultTabs, outputViewer); CTabItem outputItem = UIUtils.getTabItem(resultTabs, outputViewer);
if (outputItem != resultTabs.getSelection()) { if (outputItem != null && outputItem != resultTabs.getSelection()) {
outputItem.setImage(IMG_OUTPUT_ALERT); outputItem.setImage(IMG_OUTPUT_ALERT);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册