Skip to content

Commit

Permalink
increased scroll speed. close #2149
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Oct 29, 2023
1 parent 4f85a51 commit f088378
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f088378

Please sign in to comment.