mac/win icons in IconUtil

This commit is contained in:
Konstantin Bulenkov
2012-03-27 14:24:28 +02:00
parent b7336c47bd
commit b71edf4851
16 changed files with 39 additions and 24 deletions
@@ -187,24 +187,24 @@ public class IconUtil {
}
}
public static Icon getAddRowIcon() {
return SystemInfo.isMac ? PlatformIcons.TABLE_ADD_ROW : PlatformIcons.ADD_ICON;
public static Icon getAddIcon() {
return getToolbarDecoratorIcon("add.png");
}
public static Icon getRemoveRowIcon() {
return SystemInfo.isMac ? PlatformIcons.TABLE_REMOVE_ROW : PlatformIcons.DELETE_ICON;
public static Icon getRemoveIcon() {
return getToolbarDecoratorIcon("remove.png");
}
public static Icon getMoveRowUpIcon() {
return SystemInfo.isMac ? PlatformIcons.TABLE_MOVE_ROW_UP : PlatformIcons.MOVE_UP_ICON;
public static Icon getMoveUpIcon() {
return getToolbarDecoratorIcon("moveUp.png");
}
public static Icon getMoveRowDownIcon() {
return SystemInfo.isMac ? PlatformIcons.TABLE_MOVE_ROW_DOWN : PlatformIcons.MOVE_DOWN_ICON;
public static Icon getMoveDownIcon() {
return getToolbarDecoratorIcon("moveDown.png");
}
public static Icon getEditIcon() {
return SystemInfo.isMac ? PlatformIcons.TABLE_EDIT_ROW : PlatformIcons.EDIT;
return getToolbarDecoratorIcon("edit.png");
}
public static Icon getAddClassIcon() {
@@ -216,6 +216,6 @@ public class IconUtil {
}
private static String getToolbarDecoratorIconsFolder() {
return "/toolbarDecorator/" + (SystemInfo.isMac ? "" : "mac/");
return "/toolbarDecorator/" + (SystemInfo.isMac ? "mac/" : "");
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -181,7 +181,7 @@ public class FavoritesTreeViewPanel extends JPanel implements DataProvider {
.disableUpAction()
.addExtraAction(new DeleteFromFavoritesAction() {
{
getTemplatePresentation().setIcon(IconUtil.getRemoveRowIcon());
getTemplatePresentation().setIcon(IconUtil.getRemoveIcon());
}
@Override
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,11 +38,11 @@ public class CommonActionsPanel extends JPanel {
Icon getIcon() {
switch (this) {
case ADD: return IconUtil.getAddRowIcon();
case ADD: return IconUtil.getAddIcon();
case EDIT: return IconUtil.getEditIcon();
case REMOVE: return IconUtil.getRemoveRowIcon();
case UP: return IconUtil.getMoveRowUpIcon();
case DOWN: return IconUtil.getMoveRowDownIcon();
case REMOVE: return IconUtil.getRemoveIcon();
case UP: return IconUtil.getMoveUpIcon();
case DOWN: return IconUtil.getMoveDownIcon();
}
return null;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -202,7 +202,7 @@ public abstract class ValidatingTableEditor<Item> implements ComponentWithEmptyT
});
myRemoveButton = new AnActionButton(ApplicationBundle.message("button.remove"), IconUtil.getRemoveRowIcon()) {
myRemoveButton = new AnActionButton(ApplicationBundle.message("button.remove"), IconUtil.getRemoveIcon()) {
@Override
public void actionPerformed(AnActionEvent e) {
removeSelected();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -477,7 +477,7 @@ public abstract class AndroidLogcatToolWindowView implements Disposable {
private class MyAddFilterAction extends AnAction {
private MyAddFilterAction() {
super(CommonBundle.message("button.add"), AndroidBundle.message("android.logcat.add.logcat.filter.button"), IconUtil.getAddRowIcon());
super(CommonBundle.message("button.add"), AndroidBundle.message("android.logcat.add.logcat.filter.button"), IconUtil.getAddIcon());
}
@Override
@@ -503,7 +503,7 @@ public abstract class AndroidLogcatToolWindowView implements Disposable {
private class MyRemoveFilterAction extends AnAction {
private MyRemoveFilterAction() {
super(CommonBundle.message("button.delete"), AndroidBundle.message("android.logcat.remove.logcat.filter.button"),
IconUtil.getRemoveRowIcon());
IconUtil.getRemoveIcon());
}
@Override
@@ -1,3 +1,18 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.android.uipreview;
import com.intellij.openapi.actionSystem.AnActionEvent;
@@ -72,7 +87,7 @@ public class LayoutDeviceConfigurationsDialog extends DialogWrapper {
AnActionButton addButton =
new AnActionButton(AndroidBundle.message("android.layout.preview.device.configurations.dialog.add.button"), null,
IconUtil.getAddRowIcon()) {
IconUtil.getAddIcon()) {
@Override
public void actionPerformed(AnActionEvent e) {
doAdd();
@@ -90,7 +105,7 @@ public class LayoutDeviceConfigurationsDialog extends DialogWrapper {
myEditButton.setShortcut(CustomShortcutSet.fromString("alt E"));
myRemoveButton = new AnActionButton(AndroidBundle.message("android.layout.preview.device.configurations.dialog.remove.button"), null,
IconUtil.getRemoveRowIcon()) {
IconUtil.getRemoveIcon()) {
@Override
public void actionPerformed(AnActionEvent e) {
doRemove();