diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbon.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbon.java index 6b43e6cef..e9b4469b7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbon.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbon.java @@ -158,73 +158,73 @@ public final class MainFrameRibbon extends AppRibbonFrame implements MainFrame { public void setVisible(boolean b) { super.setVisible(b); - final MainFrameRibbon t = this; + final MainFrameRibbon t = this; - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - List mbuttons = new ArrayList<>(); - getApplicationMenuButtons(t, mbuttons); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + List mbuttons = new ArrayList<>(); + getApplicationMenuButtons(t, mbuttons); - for (final JRibbonApplicationMenuButton mbutton : mbuttons) { - mbutton.setIcon(View.getResizableIcon("buttonicon_256")); - mbutton.setDisplayState(new CommandButtonDisplayState( - "My Ribbon Application Menu Button", mbutton.getSize().width) { - @Override - public CommandButtonLayoutManager createLayoutManager( - AbstractCommandButton commandButton) { - return new CommandButtonLayoutManager() { - @Override - public int getPreferredIconSize() { - return mbutton.getSize().width; - } + for (final JRibbonApplicationMenuButton mbutton : mbuttons) { + mbutton.setIcon(View.getResizableIcon("buttonicon_256")); + mbutton.setDisplayState(new CommandButtonDisplayState( + "My Ribbon Application Menu Button", mbutton.getSize().width) { + @Override + public CommandButtonLayoutManager createLayoutManager( + AbstractCommandButton commandButton) { + return new CommandButtonLayoutManager() { + @Override + public int getPreferredIconSize() { + return mbutton.getSize().width; + } - @Override - public CommandButtonLayoutManager.CommandButtonLayoutInfo getLayoutInfo( - AbstractCommandButton commandButton, Graphics g) { - CommandButtonLayoutManager.CommandButtonLayoutInfo result = new CommandButtonLayoutManager.CommandButtonLayoutInfo(); - result.actionClickArea = new Rectangle(0, 0, 0, 0); - result.popupClickArea = new Rectangle(0, 0, commandButton - .getWidth(), commandButton.getHeight()); - result.popupActionRect = new Rectangle(0, 0, 0, 0); - ResizableIcon icon = commandButton.getIcon(); - icon.setDimension(new Dimension(commandButton.getWidth(), commandButton.getHeight())); - result.iconRect = new Rectangle( - 0, - 0, - commandButton.getWidth(), commandButton.getHeight()); - result.isTextInActionArea = false; - return result; - } + @Override + public CommandButtonLayoutManager.CommandButtonLayoutInfo getLayoutInfo( + AbstractCommandButton commandButton, Graphics g) { + CommandButtonLayoutManager.CommandButtonLayoutInfo result = new CommandButtonLayoutManager.CommandButtonLayoutInfo(); + result.actionClickArea = new Rectangle(0, 0, 0, 0); + result.popupClickArea = new Rectangle(0, 0, commandButton + .getWidth(), commandButton.getHeight()); + result.popupActionRect = new Rectangle(0, 0, 0, 0); + ResizableIcon icon = commandButton.getIcon(); + icon.setDimension(new Dimension(commandButton.getWidth(), commandButton.getHeight())); + result.iconRect = new Rectangle( + 0, + 0, + commandButton.getWidth(), commandButton.getHeight()); + result.isTextInActionArea = false; + return result; + } - @Override - public Dimension getPreferredSize( - AbstractCommandButton commandButton) { - return new Dimension(40, 40); - } + @Override + public Dimension getPreferredSize( + AbstractCommandButton commandButton) { + return new Dimension(40, 40); + } - @Override - public void propertyChange(PropertyChangeEvent evt) { - } + @Override + public void propertyChange(PropertyChangeEvent evt) { + } - @Override - public Point getKeyTipAnchorCenterPoint( - AbstractCommandButton commandButton) { - // dead center - return new Point(commandButton.getWidth() / 2, - commandButton.getHeight() / 2); - } - }; - } - }); + @Override + public Point getKeyTipAnchorCenterPoint( + AbstractCommandButton commandButton) { + // dead center + return new Point(commandButton.getWidth() / 2, + commandButton.getHeight() / 2); + } + }; + } + }); - MyRibbonApplicationMenuButtonUI mui = (MyRibbonApplicationMenuButtonUI) mbutton.getUI(); - mui.setHoverIcon(View.getResizableIcon("buttonicon_hover_256")); - mui.setNormalIcon(View.getResizableIcon("buttonicon_256")); - mui.setClickIcon(View.getResizableIcon("buttonicon_down_256")); - } + MyRibbonApplicationMenuButtonUI mui = (MyRibbonApplicationMenuButtonUI) mbutton.getUI(); + mui.setHoverIcon(View.getResizableIcon("buttonicon_hover_256")); + mui.setNormalIcon(View.getResizableIcon("buttonicon_256")); + mui.setClickIcon(View.getResizableIcon("buttonicon_down_256")); } - }); + } + }); panel.setVisible(b); }