This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 205464
Collapse All | Expand All

(-)a/core.windows/src/org/netbeans/core/windows/view/ui/toolbars/Bundle.properties (-3 / +2 lines)
Lines 41-47 Link Here
41
# made subject to such option by the copyright holder.
41
# made subject to such option by the copyright holder.
42
42
43
43
44
PROP_smallToolbarIcons=&Small Toolbar Icons
44
#Small Icons Checkbox
45
CTL_SmallIcons=&Small Toolbar Icons
45
46
46
# ToolbarLayout
47
# ToolbarLayout
47
EXC_wrongConstraints=cannot add to layout: does not use ToolbarConstraints
48
EXC_wrongConstraints=cannot add to layout: does not use ToolbarConstraints
Lines 51-58 Link Here
51
#New Toolbar Button label
52
#New Toolbar Button label
52
CTL_NewToolbar=&New Toolbar...
53
CTL_NewToolbar=&New Toolbar...
53
54
54
#Small Icons Checkbox
55
CTL_SmallIcons=&Small Toolbar Icons
56
55
57
#Drag and Drop hint
56
#Drag and Drop hint
58
CTL_TreeLabel=Drag items to or from the toolbars to add or remove them...
57
CTL_TreeLabel=Drag items to or from the toolbars to add or remove them...
(-)a/core.windows/src/org/netbeans/core/windows/view/ui/toolbars/ConfigureToolbarPanel.java (+4 lines)
Lines 99-104 Link Here
99
    private ConfigureToolbarPanel() {
99
    private ConfigureToolbarPanel() {
100
        initComponents();
100
        initComponents();
101
        
101
        
102
        if (checkSmallIcons.getText().isEmpty()) {
103
            checkSmallIcons.setVisible(false);
104
        }
105
        
102
        setCursor( Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) );
106
        setCursor( Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) );
103
        
107
        
104
        FileObject paletteFolder = FileUtil.getConfigFile( "Actions" ); // NOI18N
108
        FileObject paletteFolder = FileUtil.getConfigFile( "Actions" ); // NOI18N
(-)a/core.windows/src/org/netbeans/core/windows/view/ui/toolbars/ToolbarConfiguration.java (-28 / +29 lines)
Lines 46-52 Link Here
46
46
47
import java.awt.Color;
47
import java.awt.Color;
48
import java.awt.Component;
48
import java.awt.Component;
49
import java.awt.Frame;
50
import java.awt.GridLayout;
49
import java.awt.GridLayout;
51
import java.awt.Point;
50
import java.awt.Point;
52
import java.awt.Rectangle;
51
import java.awt.Rectangle;
Lines 76-82 Link Here
76
import org.netbeans.spi.settings.Saver;
75
import org.netbeans.spi.settings.Saver;
77
import org.openide.awt.Actions;
76
import org.openide.awt.Actions;
78
import org.openide.awt.Mnemonics;
77
import org.openide.awt.Mnemonics;
79
import org.openide.windows.WindowManager;
80
78
81
/** 
79
/** 
82
 * Toolbar configuration, it contains toolbar panel with a list of toolbar rows.
80
 * Toolbar configuration, it contains toolbar panel with a list of toolbar rows.
Lines 202-235 Link Here
202
200
203
        //Bigger toolbar icons
201
        //Bigger toolbar icons
204
        boolean smallToolbarIcons = (getToolbarPool().getPreferredIconSize() == 16);
202
        boolean smallToolbarIcons = (getToolbarPool().getPreferredIconSize() == 16);
203
        final String stiName = NbBundle.getMessage(ToolbarConfiguration.class, "CTL_SmallIcons");
205
204
206
        JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem( NbBundle.getMessage(ToolbarConfiguration.class, "PROP_smallToolbarIcons"), smallToolbarIcons );
205
        if (!stiName.isEmpty()) {
206
            JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem( stiName, smallToolbarIcons );
207
            cbmi.addActionListener (new ActionListener () {
208
                @Override
209
                public void actionPerformed (ActionEvent ev) {
210
                    if (ev.getSource() instanceof JCheckBoxMenuItem) {
211
                        JCheckBoxMenuItem cb = (JCheckBoxMenuItem) ev.getSource();
212
                        // toggle big/small icons
213
                        boolean state = cb.getState();
214
                        if (state) {
215
                            ToolbarPool.getDefault().setPreferredIconSize(16);
216
                        } else {
217
                            ToolbarPool.getDefault().setPreferredIconSize(24);
218
                        }
219
                        //Rebuild toolbar panel
220
                        //#43652: Find current toolbar configuration
221
                        String name = ToolbarPool.getDefault().getConfiguration();
222
                        ToolbarConfiguration tbConf = findConfiguration(name);
223
                        if (tbConf != null) {
224
                            tbConf.refresh();
225
                        }
226
                    }
227
                }
228
            });
229
            cbmi.setEnabled( !fullScreen );
230
            menu.add (cbmi);
231
            menu.add( new JPopupMenu.Separator() );
232
        }
207
233
208
        cbmi.addActionListener (new ActionListener () {
209
              public void actionPerformed (ActionEvent ev) {
210
                  if (ev.getSource() instanceof JCheckBoxMenuItem) {
211
                      JCheckBoxMenuItem cb = (JCheckBoxMenuItem) ev.getSource();
212
                      // toggle big/small icons
213
                      boolean state = cb.getState();
214
                      if (state) {
215
                          ToolbarPool.getDefault().setPreferredIconSize(16);
216
                      } else {
217
                          ToolbarPool.getDefault().setPreferredIconSize(24);
218
                      }
219
                      //Rebuild toolbar panel
220
                      //#43652: Find current toolbar configuration
221
                      String name = ToolbarPool.getDefault().getConfiguration();
222
                      ToolbarConfiguration tbConf = findConfiguration(name);
223
                      if (tbConf != null) {
224
                          tbConf.refresh();
225
                      }
226
                  }
227
              }
228
        });
229
        cbmi.setEnabled( !fullScreen );
230
        menu.add (cbmi);
231
232
        menu.add( new JPopupMenu.Separator() );
233
234
234
        JMenuItem menuItem = new JMenuItem( new ResetToolbarsAction() );
235
        JMenuItem menuItem = new JMenuItem( new ResetToolbarsAction() );
235
        menuItem.setEnabled( !fullScreen );
236
        menuItem.setEnabled( !fullScreen );

Return to bug 205464