From 4bd62deba143c766f3ca542aa7627845fa6024fb Mon Sep 17 00:00:00 2001 From: Henning Pohl Date: Mon, 29 Jun 2015 12:15:02 +0200 Subject: [PATCH] Removing plotting icon from toolbar --- app/src/processing/app/EditorToolbar.java | 32 +++++++--------------- build/shared/lib/theme/buttons.gif | Bin 3780 -> 3331 bytes 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/app/src/processing/app/EditorToolbar.java b/app/src/processing/app/EditorToolbar.java index 06b1c7e31..d007ed724 100644 --- a/app/src/processing/app/EditorToolbar.java +++ b/app/src/processing/app/EditorToolbar.java @@ -38,12 +38,12 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key /** Rollover titles for each button. */ static final String title[] = { - _("Verify"), _("Upload"), _("New"), _("Open"), _("Save"), _("Serial Monitor"), _("Serial Plotter") + _("Verify"), _("Upload"), _("New"), _("Open"), _("Save"), _("Serial Monitor") }; /** Titles for each button when the shift key is pressed. */ static final String titleShift[] = { - _("Verify"), _("Upload Using Programmer"), _("New"), _("Open in Another Window"), _("Save As..."), _("Serial Monitor"), _("Serial Plotter") + _("Verify"), _("Upload Using Programmer"), _("New"), _("Open in Another Window"), _("Save As..."), _("Serial Monitor") }; static final int BUTTON_COUNT = title.length; @@ -65,7 +65,6 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key static final int SAVE = 4; static final int SERIAL = 5; - static final int PLOTTER = 6; static final int INACTIVE = 0; static final int ROLLOVER = 1; @@ -111,7 +110,6 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key which[buttonCount++] = OPEN; which[buttonCount++] = SAVE; which[buttonCount++] = SERIAL; - which[buttonCount++] = PLOTTER; currentRollover = -1; @@ -175,11 +173,8 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key } // Serial button must be on the right - x1[SERIAL] = width - 2 * BUTTON_WIDTH - 14; - x2[SERIAL] = width - BUTTON_WIDTH - 14; - // Plotter button too - x1[PLOTTER] = width - BUTTON_WIDTH - 14; - x2[PLOTTER] = width - 14; + x1[SERIAL] = width - BUTTON_WIDTH - 14; + x2[SERIAL] = width - 14; } Graphics g = offscreen.getGraphics(); g.setColor(bgcolor); //getBackground()); @@ -206,15 +201,12 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key if (currentRollover != -1) { int statusY = (BUTTON_HEIGHT + g.getFontMetrics().getAscent()) / 2; String status = shiftPressed ? titleShift[currentRollover] : title[currentRollover]; - switch (currentRollover) { - case SERIAL: - case PLOTTER: - int statusX = x1[SERIAL] - BUTTON_GAP; - statusX -= g.getFontMetrics().stringWidth(status); - g.drawString(status, statusX, statusY); - break; - default: - g.drawString(status, (buttonCount-1) * BUTTON_WIDTH + 3 * BUTTON_GAP, statusY); + if (currentRollover != SERIAL) + g.drawString(status, (buttonCount-1) * BUTTON_WIDTH + 3 * BUTTON_GAP, statusY); + else { + int statusX = x1[SERIAL] - BUTTON_GAP; + statusX -= g.getFontMetrics().stringWidth(status); + g.drawString(status, statusX, statusY); } } @@ -364,10 +356,6 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key case SERIAL: editor.handleSerial(); break; - - case PLOTTER: - editor.handlePlotter(); - break; } } diff --git a/build/shared/lib/theme/buttons.gif b/build/shared/lib/theme/buttons.gif index f9f0f1f2a86aba2df3a0b8cdee7d0c3f45d9a460..4de0905d23dec4147b7d56b70b3a91950cd355e9 100644 GIT binary patch delta 2535 zcmV?NvqJ5fm?aa1rA#f#%c7j-!bidkl7`N)ezHk2mmMa)AL$7W-I7GZwal^rc z)lL+1(^68ggeGo1+ z-*pBRm4s+cXaK?$q5<(>hFU2hnieA#^pprJUI<@>GNE^#gA^)foP^9dSDbtL(FYeG zkx(JQOi?i6Mv4S!mBAyA5b`344dO_jOmGdi)Ob{~*ItfK9%P}ENUFHgbQz>qnhDc| zDbQ1Q+%XdyqRD^IWs+Coh-F~*$(Y`rch2Ubnggxa29vB?N!!Xdh}^0=i~<5C}-cPFh6&(gvxtdJ5%EbBK0F zevy<(=&JIyn5wCt>M3J$ehy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