Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
d645c289
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d645c289
编写于
6月 11, 2012
作者:
L
luchsh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7155887: ComboBox does not display focus outline in GTK L&F
Reviewed-by: rupashka
上级
27950133
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
33 addition
and
7 deletion
+33
-7
src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java
...share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java
+33
-7
未找到文件。
src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java
浏览文件 @
d645c289
...
@@ -926,9 +926,20 @@ class GTKPainter extends SynthPainter {
...
@@ -926,9 +926,20 @@ class GTKPainter extends SynthPainter {
int
x
,
int
y
,
int
w
,
int
h
)
{
int
x
,
int
y
,
int
w
,
int
h
)
{
// Text is odd in that it uses the TEXT_BACKGROUND vs BACKGROUND.
// Text is odd in that it uses the TEXT_BACKGROUND vs BACKGROUND.
JComponent
c
=
context
.
getComponent
();
JComponent
c
=
context
.
getComponent
();
Container
container
=
c
.
getParent
();
Container
containerParent
=
null
;
GTKStyle
style
=
(
GTKStyle
)
context
.
getStyle
();
GTKStyle
style
=
(
GTKStyle
)
context
.
getStyle
();
Region
id
=
context
.
getRegion
();
Region
id
=
context
.
getRegion
();
int
state
=
context
.
getComponentState
();
int
state
=
context
.
getComponentState
();
if
(
c
instanceof
ListCellRenderer
&&
container
!=
null
)
{
containerParent
=
container
.
getParent
();
if
(
containerParent
instanceof
JComboBox
&&
containerParent
.
hasFocus
())
{
state
|=
SynthConstants
.
FOCUSED
;
}
}
synchronized
(
UNIXToolkit
.
GTK_LOCK
)
{
synchronized
(
UNIXToolkit
.
GTK_LOCK
)
{
if
(
ENGINE
.
paintCachedImage
(
g
,
x
,
y
,
w
,
h
,
id
,
state
))
{
if
(
ENGINE
.
paintCachedImage
(
g
,
x
,
y
,
w
,
h
,
id
,
state
))
{
return
;
return
;
...
@@ -938,9 +949,10 @@ class GTKPainter extends SynthPainter {
...
@@ -938,9 +949,10 @@ class GTKPainter extends SynthPainter {
int
focusSize
=
0
;
int
focusSize
=
0
;
boolean
interiorFocus
=
style
.
getClassSpecificBoolValue
(
boolean
interiorFocus
=
style
.
getClassSpecificBoolValue
(
context
,
"interior-focus"
,
true
);
context
,
"interior-focus"
,
true
);
focusSize
=
style
.
getClassSpecificIntValue
(
context
,
"focus-line-width"
,
1
);
if
(!
interiorFocus
&&
(
state
&
SynthConstants
.
FOCUSED
)
!=
0
)
{
if
(!
interiorFocus
&&
(
state
&
SynthConstants
.
FOCUSED
)
!=
0
)
{
focusSize
=
style
.
getClassSpecificIntValue
(
context
,
"focus-line-width"
,
1
);
x
+=
focusSize
;
x
+=
focusSize
;
y
+=
focusSize
;
y
+=
focusSize
;
w
-=
2
*
focusSize
;
w
-=
2
*
focusSize
;
...
@@ -961,11 +973,25 @@ class GTKPainter extends SynthPainter {
...
@@ -961,11 +973,25 @@ class GTKPainter extends SynthPainter {
h
-
(
2
*
yThickness
),
h
-
(
2
*
yThickness
),
ColorType
.
TEXT_BACKGROUND
);
ColorType
.
TEXT_BACKGROUND
);
if
(
focusSize
>
0
)
{
if
(
focusSize
>
0
&&
(
state
&
SynthConstants
.
FOCUSED
)
!=
0
)
{
x
-=
focusSize
;
if
(!
interiorFocus
)
{
y
-=
focusSize
;
x
-=
focusSize
;
w
+=
2
*
focusSize
;
y
-=
focusSize
;
h
+=
2
*
focusSize
;
w
+=
2
*
focusSize
;
h
+=
2
*
focusSize
;
}
else
{
if
(
containerParent
instanceof
JComboBox
)
{
x
+=
(
focusSize
+
2
);
y
+=
(
focusSize
+
1
);
w
-=
(
2
*
focusSize
+
1
);
h
-=
(
2
*
focusSize
+
2
);
}
else
{
x
+=
focusSize
;
y
+=
focusSize
;
w
-=
2
*
focusSize
;
h
-=
2
*
focusSize
;
}
}
ENGINE
.
paintFocus
(
g
,
context
,
id
,
gtkState
,
ENGINE
.
paintFocus
(
g
,
context
,
id
,
gtkState
,
"entry"
,
x
,
y
,
w
,
h
);
"entry"
,
x
,
y
,
w
,
h
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录