Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
be509c71
Commit
be509c71
authored
Jan 23, 2019
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): use editor font in search node column
parent
29316172
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
CommonSearchDialog.java
jadx-gui/src/main/java/jadx/gui/ui/CommonSearchDialog.java
+5
-3
No files found.
jadx-gui/src/main/java/jadx/gui/ui/CommonSearchDialog.java
View file @
be509c71
...
@@ -397,12 +397,14 @@ public abstract class CommonSearchDialog extends JDialog {
...
@@ -397,12 +397,14 @@ public abstract class CommonSearchDialog extends JDialog {
protected
class
ResultsTableCellRenderer
implements
TableCellRenderer
{
protected
class
ResultsTableCellRenderer
implements
TableCellRenderer
{
private
final
JLabel
emptyLabel
=
new
JLabel
();
private
final
JLabel
emptyLabel
=
new
JLabel
();
private
final
Font
font
;
private
final
Color
codeSelectedColor
;
private
final
Color
codeSelectedColor
;
private
final
Color
codeBackground
;
private
final
Color
codeBackground
;
private
final
Map
<
Integer
,
Component
>
componentCache
=
new
HashMap
<>();
private
final
Map
<
Integer
,
Component
>
componentCache
=
new
HashMap
<>();
public
ResultsTableCellRenderer
()
{
public
ResultsTableCellRenderer
()
{
RSyntaxTextArea
area
=
CodeArea
.
getDefaultArea
(
mainWindow
);
RSyntaxTextArea
area
=
CodeArea
.
getDefaultArea
(
mainWindow
);
this
.
font
=
area
.
getFont
();
this
.
codeSelectedColor
=
area
.
getSelectionColor
();
this
.
codeSelectedColor
=
area
.
getSelectionColor
();
this
.
codeBackground
=
area
.
getBackground
();
this
.
codeBackground
=
area
.
getBackground
();
}
}
...
@@ -414,7 +416,7 @@ public abstract class CommonSearchDialog extends JDialog {
...
@@ -414,7 +416,7 @@ public abstract class CommonSearchDialog extends JDialog {
Component
comp
=
componentCache
.
get
(
id
);
Component
comp
=
componentCache
.
get
(
id
);
if
(
comp
==
null
)
{
if
(
comp
==
null
)
{
if
(
obj
instanceof
JNode
)
{
if
(
obj
instanceof
JNode
)
{
comp
=
makeCell
(
table
,
(
JNode
)
obj
,
column
);
comp
=
makeCell
((
JNode
)
obj
,
column
);
componentCache
.
put
(
id
,
comp
);
componentCache
.
put
(
id
,
comp
);
}
else
{
}
else
{
comp
=
emptyLabel
;
comp
=
emptyLabel
;
...
@@ -442,10 +444,10 @@ public abstract class CommonSearchDialog extends JDialog {
...
@@ -442,10 +444,10 @@ public abstract class CommonSearchDialog extends JDialog {
}
}
}
}
private
Component
makeCell
(
J
Table
table
,
J
Node
node
,
int
column
)
{
private
Component
makeCell
(
JNode
node
,
int
column
)
{
if
(
column
==
0
)
{
if
(
column
==
0
)
{
JLabel
label
=
new
JLabel
(
node
.
makeLongString
()
+
" "
,
node
.
getIcon
(),
SwingConstants
.
LEFT
);
JLabel
label
=
new
JLabel
(
node
.
makeLongString
()
+
" "
,
node
.
getIcon
(),
SwingConstants
.
LEFT
);
label
.
setFont
(
table
.
getFont
()
);
label
.
setFont
(
font
);
label
.
setOpaque
(
true
);
label
.
setOpaque
(
true
);
label
.
setToolTipText
(
label
.
getText
());
label
.
setToolTipText
(
label
.
getText
());
return
label
;
return
label
;
...
...
Write
Preview
Markdown
is supported
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