From f0883785194011e3e19bf1076f18932b67720777 Mon Sep 17 00:00:00 2001 From: j-dimension Date: Sun, 29 Oct 2023 19:00:41 +0100 Subject: [PATCH] increased scroll speed. close #2149 --- .../client/messenger/MessagingCenterPanel.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/messenger/MessagingCenterPanel.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/messenger/MessagingCenterPanel.java index 01c4e1ab9..5210d1342 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/messenger/MessagingCenterPanel.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/messenger/MessagingCenterPanel.java @@ -710,6 +710,8 @@ public class MessagingCenterPanel extends javax.swing.JPanel implements ThemeableEditor, StatusBarProvider, NewMessageConsumer, EventConsumer { private static final Logger log = Logger.getLogger(MessagingCenterPanel.class.getName()); + + private static final int SCROLLPANE_VERTICAL_INCREMENT=16; private Image backgroundImage = null; @@ -730,13 +732,13 @@ public MessagingCenterPanel() { initComponents(); this.jScrollPane1.getViewport().setOpaque(false); - this.jScrollPane1.getHorizontalScrollBar().setUnitIncrement(16); + this.jScrollPane1.getVerticalScrollBar().setUnitIncrement(SCROLLPANE_VERTICAL_INCREMENT); this.jScrollPane3.getViewport().setOpaque(false); - this.jScrollPane3.getHorizontalScrollBar().setUnitIncrement(16); + this.jScrollPane3.getVerticalScrollBar().setUnitIncrement(SCROLLPANE_VERTICAL_INCREMENT); this.jScrollPane2.getViewport().setOpaque(false); - this.jScrollPane2.getHorizontalScrollBar().setUnitIncrement(16); + this.jScrollPane2.getVerticalScrollBar().setUnitIncrement(SCROLLPANE_VERTICAL_INCREMENT); this.jScrollPane4.getViewport().setOpaque(false); - this.jScrollPane4.getHorizontalScrollBar().setUnitIncrement(16); + this.jScrollPane4.getVerticalScrollBar().setUnitIncrement(SCROLLPANE_VERTICAL_INCREMENT); this.messageSendPanel1.setMessageConsumer(this); ClientSettings cs = ClientSettings.getInstance(); @@ -1231,7 +1233,7 @@ private void addToTabIfRequired(InstantMessage msg) { JScrollPane targetScroll = null; if (existingTab < 0) { targetScroll = new JScrollPane(); - targetScroll.getVerticalScrollBar().setUnitIncrement(16); + targetScroll.getVerticalScrollBar().setUnitIncrement(SCROLLPANE_VERTICAL_INCREMENT); targetPanel = new JPanel(); BoxLayout layout = new javax.swing.BoxLayout(targetPanel, javax.swing.BoxLayout.Y_AXIS);