Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
f953d376
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f953d376
编写于
12月 27, 2019
作者:
S
Serge Rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#7287 Dark theme coloring fixes
Former-commit-id:
a956d576
上级
14cd1ba7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
37 addition
and
83 deletion
+37
-83
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/editors/entity/properties/TabbedFolderPageForm.java
...er/ui/editors/entity/properties/TabbedFolderPageForm.java
+5
-17
plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/controls/folders/TabbedFolderList.java
...g/jkiss/dbeaver/ui/controls/folders/TabbedFolderList.java
+32
-66
未找到文件。
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/editors/entity/properties/TabbedFolderPageForm.java
浏览文件 @
f953d376
...
...
@@ -54,8 +54,6 @@ import org.jkiss.dbeaver.runtime.properties.ObjectPropertyDescriptor;
import
org.jkiss.dbeaver.ui.*
;
import
org.jkiss.dbeaver.ui.controls.ObjectEditorPageControl
;
import
org.jkiss.dbeaver.ui.controls.folders.TabbedFolderPage
;
import
org.jkiss.dbeaver.ui.css.CSSUtils
;
import
org.jkiss.dbeaver.ui.css.DBStyles
;
import
org.jkiss.dbeaver.ui.editors.IDatabaseEditorInput
;
import
org.jkiss.dbeaver.ui.editors.entity.EntityEditor
;
import
org.jkiss.dbeaver.ui.navigator.actions.NavigatorHandlerObjectOpen
;
...
...
@@ -64,8 +62,8 @@ import org.jkiss.utils.BeanUtils;
import
org.jkiss.utils.CommonUtils
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.*
;
import
java.util.List
;
import
java.util.*
;
/**
* TabbedFolderPageProperties
...
...
@@ -107,17 +105,7 @@ public class TabbedFolderPageForm extends TabbedFolderPage implements IRefreshab
// scrolled.setLayout(new GridLayout(1, false));
propertiesGroup
=
new
Composite
(
parent
,
SWT
.
NONE
);
CSSUtils
.
setCSSClass
(
propertiesGroup
,
DBStyles
.
COLORED_BY_CONNECTION_TYPE
);
//propertiesGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
// scrolled.setContent(propertiesGroup);
// scrolled.setExpandHorizontal(true);
// scrolled.setExpandVertical(true);
//
// scrolled.addListener( SWT.Resize, event -> {
// int width = scrolled.getClientArea().width;
// scrolled.setMinSize( propertiesGroup.computeSize( width, SWT.DEFAULT ) );
// } );
//CSSUtils.setCSSClass(propertiesGroup, DBStyles.COLORED_BY_CONNECTION_TYPE);
curPropertySource
=
input
.
getPropertySource
();
...
...
@@ -242,7 +230,7 @@ public class TabbedFolderPageForm extends TabbedFolderPage implements IRefreshab
}
Composite
primaryGroup
=
new
Composite
(
propertiesGroup
,
SWT
.
NONE
);
CSSUtils
.
setCSSClass
(
primaryGroup
,
DBStyles
.
COLORED_BY_CONNECTION_TYPE
);
//
CSSUtils.setCSSClass(primaryGroup, DBStyles.COLORED_BY_CONNECTION_TYPE);
primaryGroup
.
setLayout
(
new
GridLayout
(
2
,
false
));
GridData
gd
=
new
GridData
(
GridData
.
FILL_BOTH
);
gd
.
widthHint
=
maxGroupWidth
;
...
...
@@ -253,7 +241,7 @@ public class TabbedFolderPageForm extends TabbedFolderPage implements IRefreshab
if
(
hasSecondaryProps
)
{
secondaryGroup
=
new
Composite
(
propertiesGroup
,
SWT
.
NONE
);
secondaryGroup
.
setLayout
(
new
GridLayout
(
2
,
false
));
CSSUtils
.
setCSSClass
(
secondaryGroup
,
DBStyles
.
COLORED_BY_CONNECTION_TYPE
);
//
CSSUtils.setCSSClass(secondaryGroup, DBStyles.COLORED_BY_CONNECTION_TYPE);
gd
=
new
GridData
(
GridData
.
FILL_BOTH
);
gd
.
widthHint
=
maxGroupWidth
;
secondaryGroup
.
setLayoutData
(
gd
);
...
...
@@ -263,7 +251,7 @@ public class TabbedFolderPageForm extends TabbedFolderPage implements IRefreshab
if
(
hasSpecificProps
)
{
specificGroup
=
new
Composite
(
propertiesGroup
,
SWT
.
NONE
);
specificGroup
.
setLayout
(
new
GridLayout
(
2
,
false
));
CSSUtils
.
setCSSClass
(
secondaryGroup
,
DBStyles
.
COLORED_BY_CONNECTION_TYPE
);
//
CSSUtils.setCSSClass(secondaryGroup, DBStyles.COLORED_BY_CONNECTION_TYPE);
gd
=
new
GridData
(
GridData
.
FILL_BOTH
);
gd
.
widthHint
=
maxGroupWidth
;
specificGroup
.
setLayoutData
(
gd
);
...
...
plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/controls/folders/TabbedFolderList.java
浏览文件 @
f953d376
...
...
@@ -28,7 +28,6 @@
package
org.jkiss.dbeaver.ui.controls.folders
;
import
org.eclipse.jface.resource.ColorRegistry
;
import
org.eclipse.jface.resource.JFaceResources
;
import
org.eclipse.jface.text.source.ISharedTextColors
;
import
org.eclipse.swt.SWT
;
...
...
@@ -43,7 +42,6 @@ import org.eclipse.swt.widgets.*;
import
org.jkiss.dbeaver.ui.DBeaverIcons
;
import
org.jkiss.dbeaver.ui.UIStyles
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.css.CSSUtils
;
import
java.util.IdentityHashMap
;
import
java.util.Map
;
...
...
@@ -136,17 +134,14 @@ public class TabbedFolderList extends Composite {
}
}
});
addMouseMoveListener
(
new
MouseMoveListener
()
{
public
void
mouseMove
(
MouseEvent
e
)
{
String
tooltip
=
tab
.
getTooltip
();
if
(
tooltip
!=
null
)
{
setToolTipText
(
tooltip
);
}
if
(!
hover
)
{
hover
=
true
;
redraw
();
}
addMouseMoveListener
(
e
->
{
String
tooltip
=
tab
.
getTooltip
();
if
(
tooltip
!=
null
)
{
setToolTipText
(
tooltip
);
}
if
(!
hover
)
{
hover
=
true
;
redraw
();
}
});
addMouseTrackListener
(
new
MouseTrackAdapter
()
{
...
...
@@ -296,12 +291,7 @@ public class TabbedFolderList extends Composite {
*/
public
TopNavigationElement
(
Composite
parent
)
{
super
(
parent
,
SWT
.
NO_FOCUS
);
addPaintListener
(
new
PaintListener
()
{
public
void
paintControl
(
PaintEvent
e
)
{
paint
(
e
);
}
});
addPaintListener
(
this
::
paint
);
addMouseListener
(
new
MouseAdapter
()
{
public
void
mouseUp
(
MouseEvent
e
)
{
...
...
@@ -379,12 +369,7 @@ public class TabbedFolderList extends Composite {
*/
public
BottomNavigationElement
(
Composite
parent
)
{
super
(
parent
,
SWT
.
NO_FOCUS
);
addPaintListener
(
new
PaintListener
()
{
public
void
paintControl
(
PaintEvent
e
)
{
paint
(
e
);
}
});
addPaintListener
(
this
::
paint
);
addMouseListener
(
new
MouseAdapter
()
{
public
void
mouseUp
(
MouseEvent
e
)
{
...
...
@@ -488,19 +473,12 @@ public class TabbedFolderList extends Composite {
computeTopAndBottomTab
();
}
});
this
.
addTraverseListener
(
new
TraverseListener
()
{
public
void
keyTraversed
(
TraverseEvent
e
)
{
handleTraverse
(
e
);
}
});
addDisposeListener
(
new
DisposeListener
()
{
@Override
public
void
widgetDisposed
(
DisposeEvent
e
)
{
for
(
Image
di
:
grayedImages
.
values
())
{
UIUtils
.
dispose
(
di
);
}
grayedImages
.
clear
();
this
.
addTraverseListener
(
this
::
handleTraverse
);
addDisposeListener
(
e
->
{
for
(
Image
di
:
grayedImages
.
values
())
{
UIUtils
.
dispose
(
di
);
}
grayedImages
.
clear
();
});
}
...
...
@@ -721,17 +699,16 @@ public class TabbedFolderList extends Composite {
Display
display
=
Display
.
getCurrent
();
ISharedTextColors
sharedColors
=
UIUtils
.
getSharedTextColors
();
ColorRegistry
colorRegistry
=
UIUtils
.
getColorRegistry
();
listBackground
=
UIStyles
.
getDefaultTextBackground
();
Color
widgetBackground
=
getBackground
();
if
(
UIUtils
.
isInDialog
(
this
)
&&
UIStyles
.
isDarkTheme
())
{
// FIXME: hacking of dark theme
Color
widgetBackground
;
if
(
UIStyles
.
isDarkTheme
())
{
// By some reason E4 sets white background in dark theme.
widgetBackground
=
UIStyles
.
getDefaultTextBackground
();
super
.
setBackground
(
widgetBackground
);
topNavigationElement
.
setBackground
(
widgetBackground
);
bottomNavigationElement
.
setBackground
(
widgetBackground
);
}
else
{
widgetBackground
=
getBackground
();
}
widgetForeground
=
UIStyles
.
getDefaultTextForeground
();
widgetDarkShadow
=
display
.
getSystemColor
(
SWT
.
COLOR_WIDGET_DARK_SHADOW
);
...
...
@@ -779,19 +756,16 @@ public class TabbedFolderList extends Composite {
@Override
public
void
setBackground
(
Color
color
)
{
super
.
setBackground
(
color
);
UIUtils
.
asyncExec
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
isDisposed
())
{
return
;
}
initColours
();
for
(
ListElement
e
:
elements
)
{
e
.
redraw
();
}
topNavigationElement
.
redraw
();
bottomNavigationElement
.
redraw
();
UIUtils
.
asyncExec
(()
->
{
if
(
isDisposed
())
{
return
;
}
initColours
();
for
(
ListElement
e
:
elements
)
{
e
.
redraw
();
}
topNavigationElement
.
redraw
();
bottomNavigationElement
.
redraw
();
});
}
...
...
@@ -996,21 +970,13 @@ public class TabbedFolderList extends Composite {
}
});
addListener
(
SWT
.
Selection
,
new
Listener
()
{
public
void
handleEvent
(
Event
event
)
{
if
(
isFocusControl
())
{
accessible
.
setFocus
(
ACC
.
CHILDID_SELF
);
}
}
});
addListener
(
SWT
.
FocusIn
,
new
Listener
()
{
public
void
handleEvent
(
Event
event
)
{
addListener
(
SWT
.
Selection
,
event
->
{
if
(
isFocusControl
())
{
accessible
.
setFocus
(
ACC
.
CHILDID_SELF
);
}
});
addListener
(
SWT
.
FocusIn
,
event
->
accessible
.
setFocus
(
ACC
.
CHILDID_SELF
));
}
public
void
addSelectionListener
(
SelectionListener
listener
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录