Notes Plugin slight design tweak
- Increased the padding on the overall panel and the title. - Recolored the background and text editor. - Wrapped the text editor in a panel to prevent substance's hover effects. - Added 10px padding to the text editor
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Charlie Waters
|
||||
* Copyright (c) 2018, Psikoi <https://github.com/psikoi>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,13 +25,17 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.notes;
|
||||
|
||||
import java.awt.Color;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.text.BadLocationException;
|
||||
import javax.swing.text.Document;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.ui.ColorScheme;
|
||||
import net.runelite.client.ui.PluginPanel;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
@@ -50,14 +55,24 @@ public class NotesPanel extends PluginPanel
|
||||
getParent().add(this, BorderLayout.CENTER);
|
||||
|
||||
setLayout(new BorderLayout());
|
||||
setBorder(BorderFactory.createEmptyBorder(2, 6, 6, 6));
|
||||
setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
|
||||
setBackground(ColorScheme.DARK_GRAY_COLOR);
|
||||
|
||||
final JLabel notesHeader = new JLabel("Notes");
|
||||
notesHeader.setForeground(Color.WHITE);
|
||||
notesHeader.setBorder(new EmptyBorder(1, 0, 10, 0));
|
||||
|
||||
add(notesHeader, BorderLayout.NORTH);
|
||||
|
||||
notesEditor.setLineWrap(true);
|
||||
notesEditor.setWrapStyleWord(true);
|
||||
|
||||
JPanel notesContainer = new JPanel();
|
||||
notesContainer.setLayout(new BorderLayout());
|
||||
notesContainer.setBackground(ColorScheme.DARKER_GRAY_COLOR);
|
||||
|
||||
notesEditor.setOpaque(false);
|
||||
|
||||
// load note text
|
||||
String data = config.notesData();
|
||||
notesEditor.setText(data);
|
||||
@@ -90,7 +105,10 @@ public class NotesPanel extends PluginPanel
|
||||
}
|
||||
}
|
||||
});
|
||||
add(notesEditor, BorderLayout.CENTER);
|
||||
notesContainer.add(notesEditor, BorderLayout.CENTER);
|
||||
notesContainer.setBorder(new EmptyBorder(10, 10, 10, 10));
|
||||
|
||||
add(notesContainer, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
void setNotes(String data)
|
||||
|
||||
Reference in New Issue
Block a user