Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
135fd7dc
Commit
135fd7dc
authored
7 years ago
by
Egor Ushakov
Browse files
Options
Download
Email Patches
Plain Diff
fixed lines painting for hidpi
parent
f4e21964
Branches unavailable
Tags unavailable
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platform/util/src/com/intellij/util/ui/UIUtil.java
+21
-21
platform/util/src/com/intellij/util/ui/UIUtil.java
with
21 additions
and
21 deletions
+21
-21
platform/util/src/com/intellij/util/ui/UIUtil.java
+
21
-
21
View file @
135fd7dc
...
...
@@ -689,12 +689,12 @@ public class UIUtil {
if
(
x
==
x1
)
{
int
minY
=
Math
.
min
(
y
,
y1
);
int
maxY
=
Math
.
max
(
y
,
y1
);
graphics
.
drawLine
(
x
,
minY
+
1
,
x1
,
maxY
-
1
);
drawLine
(
graphics
,
x
,
minY
+
1
,
x1
,
maxY
-
1
);
}
else
if
(
y
==
y1
)
{
int
minX
=
Math
.
min
(
x
,
x1
);
int
maxX
=
Math
.
max
(
x
,
x1
);
graphics
.
drawLine
(
minX
+
1
,
y
,
maxX
-
1
,
y1
);
drawLine
(
graphics
,
minX
+
1
,
y
,
maxX
-
1
,
y1
);
}
else
{
drawLine
(
graphics
,
x
,
y
,
x1
,
y1
);
...
...
@@ -1801,25 +1801,25 @@ public class UIUtil {
g
.
fillRect
(
startX
,
3
,
endX
-
startX
,
height
-
5
);
if
(
drawRound
)
{
g
.
drawLine
(
startX
-
1
,
4
,
startX
-
1
,
height
-
4
);
g
.
drawLine
(
endX
,
4
,
endX
,
height
-
4
);
drawLine
(
g
,
startX
-
1
,
4
,
startX
-
1
,
height
-
4
);
drawLine
(
g
,
endX
,
4
,
endX
,
height
-
4
);
g
.
setColor
(
new
Color
(
100
,
100
,
100
,
50
));
g
.
drawLine
(
startX
-
1
,
4
,
startX
-
1
,
height
-
4
);
g
.
drawLine
(
endX
,
4
,
endX
,
height
-
4
);
drawLine
(
g
,
startX
-
1
,
4
,
startX
-
1
,
height
-
4
);
drawLine
(
g
,
endX
,
4
,
endX
,
height
-
4
);
g
.
drawLine
(
startX
,
3
,
endX
-
1
,
3
);
g
.
drawLine
(
startX
,
height
-
3
,
endX
-
1
,
height
-
3
);
drawLine
(
g
,
startX
,
3
,
endX
-
1
,
3
);
drawLine
(
g
,
startX
,
height
-
3
,
endX
-
1
,
height
-
3
);
}
config
.
restore
();
}
public
static
void
drawRectPickedOut
(
Graphics2D
g
,
int
x
,
int
y
,
int
w
,
int
h
)
{
g
.
drawLine
(
x
+
1
,
y
,
x
+
w
-
1
,
y
);
g
.
drawLine
(
x
+
w
,
y
+
1
,
x
+
w
,
y
+
h
-
1
);
g
.
drawLine
(
x
+
w
-
1
,
y
+
h
,
x
+
1
,
y
+
h
);
g
.
drawLine
(
x
,
y
+
1
,
x
,
y
+
h
-
1
);
drawLine
(
g
,
x
+
1
,
y
,
x
+
w
-
1
,
y
);
drawLine
(
g
,
x
+
w
,
y
+
1
,
x
+
w
,
y
+
h
-
1
);
drawLine
(
g
,
x
+
w
-
1
,
y
+
h
,
x
+
1
,
y
+
h
);
drawLine
(
g
,
x
,
y
+
1
,
x
,
y
+
h
-
1
);
}
private
static
void
drawBoringDottedLine
(
final
Graphics2D
g
,
...
...
@@ -1852,8 +1852,8 @@ public class UIUtil {
g
.
setColor
(
fgColor
!=
null
?
fgColor
:
oldColor
);
// Now draw bold line segments
for
(
int
dotXi
=
(
startX
/
step
+
startPosCorrection
)
*
step
;
dotXi
<
endX
;
dotXi
+=
step
)
{
g
.
drawLine
(
dotXi
,
lineY
,
dotXi
+
1
,
lineY
);
g
.
drawLine
(
dotXi
,
lineY
+
1
,
dotXi
+
1
,
lineY
+
1
);
drawLine
(
g
,
dotXi
,
lineY
,
dotXi
+
1
,
lineY
);
drawLine
(
g
,
dotXi
,
lineY
+
1
,
dotXi
+
1
,
lineY
+
1
);
}
// restore color
...
...
@@ -1896,8 +1896,8 @@ public class UIUtil {
g
.
fillRect
(
x
,
0
,
width
,
height
);
}
g
.
setColor
(
SystemInfo
.
isMac
&&
isUnderIntelliJLaF
()
?
Gray
.
xC9
:
Gray
.
x00
.
withAlpha
(
toolWindow
?
90
:
50
));
if
(
drawTopLine
)
g
.
drawLine
(
x
,
0
,
width
,
0
);
if
(
drawBottomLine
)
g
.
drawLine
(
x
,
height
-
(
jmHiDPI
?
1
:
2
),
width
,
height
-
(
jmHiDPI
?
1
:
2
));
if
(
drawTopLine
)
drawLine
(
g
,
x
,
0
,
width
,
0
);
if
(
drawBottomLine
)
drawLine
(
g
,
x
,
height
-
(
jmHiDPI
?
1
:
2
),
width
,
height
-
(
jmHiDPI
?
1
:
2
));
if
(
SystemInfo
.
isMac
&&
isUnderIntelliJLaF
())
{
g
.
setColor
(
Gray
.
xC9
);
...
...
@@ -1905,7 +1905,7 @@ public class UIUtil {
g
.
setColor
(
isUnderDarcula
()
?
CONTRAST_BORDER_COLOR
:
Gray
.
xFF
.
withAlpha
(
100
));
}
g
.
drawLine
(
x
,
0
,
width
,
0
);
drawLine
(
g
,
x
,
0
,
width
,
0
);
}
finally
{
config
.
restore
();
}
...
...
@@ -1921,10 +1921,10 @@ public class UIUtil {
g
.
setColor
(
fgColor
);
for
(
int
dot
=
start
;
dot
<
end
;
dot
+=
3
)
{
if
(
horizontal
)
{
g
.
drawLine
(
dot
,
xOrY
,
dot
,
xOrY
);
drawLine
(
g
,
dot
,
xOrY
,
dot
,
xOrY
);
}
else
{
g
.
drawLine
(
xOrY
,
dot
,
xOrY
,
dot
);
drawLine
(
g
,
xOrY
,
dot
,
xOrY
,
dot
);
}
}
}
...
...
@@ -3500,7 +3500,7 @@ public class UIUtil {
g
.
setColor
(
info
.
underlineColor
);
}
g
.
drawLine
(
x
-
maxBulletWidth
[
0
]
-
10
,
yOffset
[
0
]
+
fm
.
getDescent
(),
x
+
maxWidth
[
0
]
+
10
,
yOffset
[
0
]
+
fm
.
getDescent
());
drawLine
(
g
,
x
-
maxBulletWidth
[
0
]
-
10
,
yOffset
[
0
]
+
fm
.
getDescent
(),
x
+
maxWidth
[
0
]
+
10
,
yOffset
[
0
]
+
fm
.
getDescent
());
if
(
c
!=
null
)
{
g
.
setColor
(
c
);
}
...
...
@@ -3508,7 +3508,7 @@ public class UIUtil {
if
(
myDrawShadow
)
{
c
=
g
.
getColor
();
g
.
setColor
(
myShadowColor
);
g
.
drawLine
(
x
-
maxBulletWidth
[
0
]
-
10
,
yOffset
[
0
]
+
fm
.
getDescent
()
+
1
,
x
+
maxWidth
[
0
]
+
10
,
drawLine
(
g
,
x
-
maxBulletWidth
[
0
]
-
10
,
yOffset
[
0
]
+
fm
.
getDescent
()
+
1
,
x
+
maxWidth
[
0
]
+
10
,
yOffset
[
0
]
+
fm
.
getDescent
()
+
1
);
g
.
setColor
(
c
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help