Browse Source

Small changes

Played around with the UI
master
Sogomn 9 years ago
parent
commit
2f55df5a4c
  1. BIN
      Ratty/res/gui_icon.png
  2. BIN
      Ratty/res/menu_icons.png
  3. BIN
      Ratty/res/menu_icons_tree.png
  4. 12
      Ratty/src/de/sogomn/rat/Ratty.java
  5. 3
      Ratty/src/de/sogomn/rat/server/gui/FileTreePanel.java
  6. 5
      Ratty/src/de/sogomn/rat/server/gui/RattyGui.java

BIN
Ratty/res/gui_icon.png

Before

Width: 16  |  Height: 16  |  Size: 164 B

After

Width: 16  |  Height: 16  |  Size: 168 B

BIN
Ratty/res/menu_icons.png

Before

Width: 48  |  Height: 48  |  Size: 618 B

After

Width: 96  |  Height: 96  |  Size: 766 B

BIN
Ratty/res/menu_icons_tree.png

Before

Width: 48  |  Height: 32  |  Size: 469 B

After

Width: 96  |  Height: 64  |  Size: 600 B

12
Ratty/src/de/sogomn/rat/Ratty.java

@ -27,13 +27,11 @@ public final class Ratty {
final NimbusLookAndFeel nimbus = new NimbusLookAndFeel();
final UIDefaults defaults = nimbus.getDefaults();
defaults.put("control", Color.GRAY);
defaults.put("nimbusBase", Color.BLACK);
defaults.put("text", Color.WHITE);
defaults.put("Table:\"Table.cellRenderer\".background", new Color(50, 50, 50));
defaults.put("Table.alternateRowColor", new Color(75, 75, 75));
defaults.put("TextField.foreground", Color.BLACK);
defaults.put("Tree.background", Color.GRAY);
defaults.put("control", new Color(245, 245, 245));
defaults.put("nimbusBase", new Color(225, 225, 225));
defaults.put("Table:\"Table.cellRenderer\".background", new Color(225, 225, 225));
defaults.put("Table.alternateRowColor", new Color(175, 175, 175));
defaults.put("Tree.background", new Color(245, 245, 245));
try {
UIManager.setLookAndFeel(nimbus);

3
Ratty/src/de/sogomn/rat/server/gui/FileTreePanel.java

@ -38,7 +38,7 @@ public final class FileTreePanel {
private static final int DEFAULT_WIDTH = 500;
private static final int DEFAULT_HEIGHT = 500;
private static final BufferedImage[] MENU_ICONS = new SpriteSheet("/menu_icons_tree.png", 16, 16).getSprites();
private static final BufferedImage[] MENU_ICONS = new SpriteSheet("/menu_icons_tree.png", 32, 32).getSprites();
public static final String REQUEST = "Show content";
public static final String DOWNLOAD = "Download file";
@ -95,6 +95,7 @@ public final class FileTreePanel {
dialog.setContentPane(scrollPane);
dialog.pack();
dialog.setLocationByPlatform(true);
dialog.setIconImages(RattyGui.GUI_ICONS);
}
private void addMenuItem(final String name, final Icon icon) {

5
Ratty/src/de/sogomn/rat/server/gui/RattyGui.java

@ -44,8 +44,9 @@ public final class RattyGui {
private static final BufferedImage GUI_ICON_SMALL = ImageUtils.loadImage("/gui_icon.png");
private static final BufferedImage GUI_ICON_MEDIUM = ImageUtils.scaleImage(ImageUtils.loadImage("/gui_icon.png"), 64, 64);
private static final BufferedImage GUI_ICON_LARGE = ImageUtils.scaleImage(ImageUtils.loadImage("/gui_icon.png"), 128, 128);
private static final ArrayList<BufferedImage> GUI_ICONS = new ArrayList<BufferedImage>(3);
private static final BufferedImage[] MENU_ICONS = new SpriteSheet("/menu_icons.png", 16, 16).getSprites();
private static final BufferedImage[] MENU_ICONS = new SpriteSheet("/menu_icons.png", 32, 32).getSprites();
public static final ArrayList<BufferedImage> GUI_ICONS = new ArrayList<BufferedImage>(3);
public static final String POPUP = "Open popup";
public static final String SCREENSHOT = "Take screenshot";

Loading…
Cancel
Save