mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GP-5341 - Decompiler - Fixed background not painting fully for undefined
functions
This commit is contained in:
parent
5002de13f4
commit
3717622c60
2 changed files with 19 additions and 11 deletions
|
@ -119,7 +119,6 @@ public class DecompilerPanel extends JPanel implements FieldMouseListener, Field
|
|||
|
||||
layoutController = new ClangLayoutController(options, this, metrics, hlFactory);
|
||||
fieldPanel = new DecompilerFieldPanel(layoutController);
|
||||
setBackground(options.getBackgroundColor());
|
||||
|
||||
scroller = new IndexedScrollPane(fieldPanel);
|
||||
fieldPanel.addFieldSelectionListener(this);
|
||||
|
@ -140,6 +139,8 @@ public class DecompilerPanel extends JPanel implements FieldMouseListener, Field
|
|||
}
|
||||
});
|
||||
|
||||
setBackground(options.getBackgroundColor());
|
||||
|
||||
decompilerHoverProvider = new DecompilerHoverProvider();
|
||||
|
||||
searchHighlightColor = options.getSearchHighlightColor();
|
||||
|
@ -454,6 +455,7 @@ public class DecompilerPanel extends JPanel implements FieldMouseListener, Field
|
|||
}
|
||||
if (fieldPanel != null) {
|
||||
fieldPanel.setBackgroundColor(bg);
|
||||
scroller.setBackground(bg);
|
||||
}
|
||||
super.setBackground(bg);
|
||||
}
|
||||
|
|
|
@ -64,9 +64,18 @@ public class IndexedScrollPane extends JPanel implements IndexScrollListener {
|
|||
this.indexMapper = createIndexMapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBackground(Color bg) {
|
||||
if (viewport != null) {
|
||||
viewport.setBackground(bg);
|
||||
}
|
||||
super.setBackground(bg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets this scroll pane to never show scroll bars. This is useful when you want a container
|
||||
* whose view is always as big as the component in this scroll pane.
|
||||
* @param b true to never scroll
|
||||
*/
|
||||
public void setNeverScroll(boolean b) {
|
||||
neverScroll = true;
|
||||
|
@ -75,16 +84,10 @@ public class IndexedScrollPane extends JPanel implements IndexScrollListener {
|
|||
useViewSizeAsPreferredSize = b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see JScrollPane#setVerticalScrollBarPolicy(int)
|
||||
*/
|
||||
public void setVerticalScrollBarPolicy(int policy) {
|
||||
scrollPane.setVerticalScrollBarPolicy(policy);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see JScrollPane#setHorizontalScrollBarPolicy(int)
|
||||
*/
|
||||
public void setHorizontalScrollBarPolicy(int policy) {
|
||||
scrollPane.setHorizontalScrollBarPolicy(policy);
|
||||
}
|
||||
|
@ -167,7 +170,8 @@ public class IndexedScrollPane extends JPanel implements IndexScrollListener {
|
|||
class ScrollViewLayout implements LayoutManager {
|
||||
|
||||
@Override
|
||||
public void addLayoutComponent(String name, Component comp) {
|
||||
public void addLayoutComponent(String name, Component c) {
|
||||
// stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -189,7 +193,8 @@ public class IndexedScrollPane extends JPanel implements IndexScrollListener {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void removeLayoutComponent(Component comp) {
|
||||
public void removeLayoutComponent(Component c) {
|
||||
// stub
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -231,6 +236,7 @@ public class IndexedScrollPane extends JPanel implements IndexScrollListener {
|
|||
|
||||
@Override
|
||||
protected void paintComponent(Graphics g) {
|
||||
// stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue