Horizontal Scroll Bar

Implemented primaryScrollBar support for horizontal scroll bar as well.
This commit is contained in:
DieGurke
2019-12-15 00:34:44 +01:00
parent 4a2d6f913b
commit 6bfa3c2b79
2 changed files with 28 additions and 8 deletions

View File

@ -262,7 +262,15 @@ public class ChatWindow extends JFrame {
scrollPane.getVerticalScrollBar()
.setUI(new PrimaryScrollBar(5, theme.getInteractableBackgroundColor(),
new Color(theme.getInteractableBackgroundColor().getRGB() - 50),
new Color(theme.getInteractableBackgroundColor().getRGB() + 170)));
new Color(theme.getInteractableBackgroundColor().getRGB() + 170), true));
scrollPane.getHorizontalScrollBar().setBackground(theme.getCellColor());
scrollPane.getHorizontalScrollBar()
.setUI(new PrimaryScrollBar(5, theme.getInteractableBackgroundColor(), new Color(theme.getInteractableBackgroundColor().getRGB() - 50),
new Color(theme.getInteractableBackgroundColor().getRGB() + 170), false));
// int currentVerticalScrollBarValue =
// scrollPane.getVerticalScrollBar().getValue() +
// scrollPane.getVerticalScrollBar().getVisibleAmount(); Work in Progress for
// autoscroll
// messageEnterTextArea
messageEnterTextArea.setCaretColor(theme.getTypingMessageColor());
messageEnterTextArea.setForeground(theme.getTypingMessageColor());