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
3652c7bb
Commit
3652c7bb
authored
6 years ago
by
Roman Vasiliev
Browse files
Options
Download
Email Patches
Plain Diff
IdeErrorsDialog: restore original design
parent
1bf4c8ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
platform/platform-impl/src/com/intellij/diagnostic/BlinkingLabel.kt
+0
-55
...latform-impl/src/com/intellij/diagnostic/BlinkingLabel.kt
platform/platform-impl/src/com/intellij/diagnostic/IdeErrorsDialog.java
+2
-6
...orm-impl/src/com/intellij/diagnostic/IdeErrorsDialog.java
with
2 additions
and
61 deletions
+2
-61
platform/platform-impl/src/com/intellij/diagnostic/BlinkingLabel.kt
deleted
100644 → 0
+
0
-
55
View file @
1bf4c8ab
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package
com.intellij.diagnostic
import
com.intellij.ui.AncestorListenerAdapter
import
com.intellij.ui.components.JBLabel
import
java.awt.Font
import
javax.swing.Timer
import
javax.swing.event.AncestorEvent
internal
class
BlinkingLabel
internal
constructor
(
text
:
String
)
:
JBLabel
(
text
)
{
private
val
myTimer
:
Timer
=
Timer
(
750
)
{
onTimer
()
}
init
{
myTimer
.
isRepeats
=
false
addAncestorListener
(
object
:
AncestorListenerAdapter
()
{
override
fun
ancestorAdded
(
event
:
AncestorEvent
?)
{
myTimer
.
start
()
}
override
fun
ancestorRemoved
(
event
:
AncestorEvent
?)
{
myTimer
.
stop
()
}
})
prepareSizeForBoldChange
()
}
private
fun
onTimer
()
{
if
(
isPlainFont
())
{
setBoldFont
()
myTimer
.
restart
()
}
else
{
setPlainFont
()
}
}
private
fun
isPlainFont
()
=
font
.
style
and
Font
.
BOLD
==
0
private
fun
setPlainFont
()
{
font
=
font
.
deriveFont
(
font
.
style
and
Font
.
BOLD
.
inv
())
}
private
fun
setBoldFont
()
{
font
=
font
.
deriveFont
(
font
.
style
or
Font
.
BOLD
)
}
private
fun
prepareSizeForBoldChange
()
{
val
sampleLabel
=
JBLabel
(
text
)
sampleLabel
.
font
=
font
.
deriveFont
(
font
.
style
or
Font
.
BOLD
)
minimumSize
=
sampleLabel
.
minimumSize
preferredSize
=
sampleLabel
.
preferredSize
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
platform/platform-impl/src/com/intellij/diagnostic/IdeErrorsDialog.java
+
2
-
6
View file @
3652c7bb
...
...
@@ -295,7 +295,7 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
};
myAssigneePanel
=
new
JPanel
();
myAssigneePanel
.
add
(
new
BlinkingLabel
(
"Suggested a
ssignee:"
));
myAssigneePanel
.
add
(
new
JBLabel
(
"A
ssignee:"
));
myAssigneePanel
.
add
(
myAssigneeCombo
);
}
...
...
@@ -330,6 +330,7 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
attachmentsPanel
.
add
(
scrollPane
(
myAttachmentArea
,
500
,
350
),
BorderLayout
.
CENTER
);
JPanel
accountRow
=
new
JPanel
(
new
BorderLayout
());
if
(
myAssigneeVisible
)
accountRow
.
add
(
myAssigneePanel
,
BorderLayout
.
WEST
);
accountRow
.
add
(
myCredentialsLabel
,
BorderLayout
.
EAST
);
myNoticePanel
=
new
JPanel
(
new
GridBagLayout
());
myNoticePanel
.
add
(
new
JBLabel
(
UIUtil
.
getBalloonWarningIcon
()),
new
GridBagConstraints
(
0
,
0
,
1
,
1
,
0
,
0
,
NORTH
,
NONE
,
JBUI
.
insets
(
7
,
0
,
0
,
5
),
0
,
0
));
...
...
@@ -337,11 +338,6 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
JPanel
bottomRow
=
new
JPanel
(
new
BorderLayout
());
bottomRow
.
add
(
accountRow
,
BorderLayout
.
NORTH
);
bottomRow
.
add
(
myNoticePanel
,
BorderLayout
.
CENTER
);
if
(
myAssigneeVisible
)
{
JPanel
assigneeRow
=
new
JPanel
(
new
BorderLayout
());
assigneeRow
.
add
(
myAssigneePanel
,
BorderLayout
.
EAST
);
bottomRow
.
add
(
assigneeRow
,
BorderLayout
.
SOUTH
);
}
JPanel
rootPanel
=
new
JPanel
(
new
BorderLayout
());
rootPanel
.
setPreferredSize
(
JBUI
.
size
(
800
,
400
));
...
...
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