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