Skip to content

Commit

Permalink
pcorlessGH-65 Updates icons, removes LockIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
gtache committed Mar 6, 2020
1 parent db0b33f commit 917573a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 123 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.icepdf.ri.common.utility.annotation.properties.FreeTextAnnotationPanel;
import org.icepdf.ri.common.views.*;
import org.icepdf.ri.common.views.annotations.summary.AnnotationSummaryBox;
import org.icepdf.ri.images.Images;

import javax.swing.*;
import javax.swing.event.DocumentEvent;
Expand Down Expand Up @@ -985,22 +986,21 @@ protected AnnotationComponent findAnnotationComponent(Annotation annotation) {
return null;
}

protected Icon createLockIcon(Color color, boolean isLock) {
return new LockIcon(color, BUTTON_SIZE, isLock);
}

protected void resetComponentColors() {
Color contrastColor = calculateContrastHighLowColor(popupBackgroundColor.getRGB());
minimizeButton.setForeground(contrastColor);
minimizeButton.setBackground(popupBackgroundColor);
minimizeButton.setBackground(popupBackgroundColor);
privateToggleButton.setBackground(popupBackgroundColor);
// lock icons.
Icon lockedIcon = createLockIcon(contrastColor, true);
Icon unlockedIcon = createLockIcon(contrastColor, false);
Icon lockedIcon = new ImageIcon(Images.get("lock_16.png"));
Icon unlockedIcon = new ImageIcon(Images.get("unlock_16.png"));
privateToggleButton.setIcon(unlockedIcon);
privateToggleButton.setPressedIcon(lockedIcon);
privateToggleButton.setPressedIcon(null);
privateToggleButton.setSelectedIcon(lockedIcon);
privateToggleButton.setRolloverIcon(unlockedIcon);
privateToggleButton.setRolloverSelectedIcon(lockedIcon);

// text colors.
titleLabel.setForeground(contrastColor);
creationLabel.setForeground(contrastColor);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 917573a

Please sign in to comment.