mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Co-authored-by: denny <dennis.sheirer@gmail.com>
This commit is contained in:
@@ -45,6 +45,7 @@ import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
/**
|
||||
* Custom frequency controller for displaying or editing frequency values in MHz.
|
||||
@@ -556,19 +557,20 @@ public class JFrequencyControl extends JPanel implements ISourceEventProcessor
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent e)
|
||||
{
|
||||
Digit.this.setBackground(mHighlightColor);
|
||||
repaint();
|
||||
}
|
||||
Color bg = UIManager.getColor("TextField.selectionBackground");
|
||||
Color fg = UIManager.getColor("TextField.selectionForeground");
|
||||
Digit.this.setBackground(bg != null ? bg : Color.YELLOW);
|
||||
Digit.this.setForeground(fg != null ? fg : Color.BLACK);
|
||||
repaint(); }
|
||||
|
||||
@Override
|
||||
public void mouseExited(MouseEvent e)
|
||||
{
|
||||
//Restore the LAF text-field background rather than hardcoding white so the digit
|
||||
//cells match the active theme when the mouse leaves.
|
||||
Color textBg = javax.swing.UIManager.getColor("TextField.background");
|
||||
Digit.this.setBackground(textBg != null ? textBg : Color.WHITE);
|
||||
repaint();
|
||||
}
|
||||
Color bg = UIManager.getColor("TextField.background");
|
||||
Color fg = UIManager.getColor("TextField.foreground");
|
||||
Digit.this.setBackground(bg != null ? bg : Color.WHITE);
|
||||
Digit.this.setForeground(fg != null ? fg : Color.BLACK);
|
||||
repaint(); }
|
||||
|
||||
@Override
|
||||
public void mouseWheelMoved(MouseWheelEvent e)
|
||||
|
||||
Reference in New Issue
Block a user