IDEMPIERE-4122 missing font icons (#231)

Integrate patch from Murilo
This commit is contained in:
hengsin 2020-08-24 18:31:40 +08:00 committed by GitHub
parent 2ad8fdfb3e
commit 64a46577a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 112 additions and 26 deletions

View File

@ -477,17 +477,26 @@ public class WAcctViewer extends Window implements EventListener<Event>
forcePost.setVisible(false);
// Elaine 2009/07/29
bZoom.setImage(ThemeManager.getThemeResource("images/Zoom16.png"));
if (ThemeManager.isUseFontIconForImage())
bZoom.setIconSclass("z-icon-Zoom");
else
bZoom.setImage(ThemeManager.getThemeResource("images/Zoom16.png"));
bZoom.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Zoom")));
bZoom.setVisible(tabbedPane.getSelectedIndex() == 1);
bZoom.addEventListener(Events.ON_CLICK, this);
//
bQuery.setImage(ThemeManager.getThemeResource("images/Refresh16.png"));
if (ThemeManager.isUseFontIconForImage())
bQuery.setIconSclass("z-icon-Refresh");
else
bQuery.setImage(ThemeManager.getThemeResource("images/Refresh16.png"));
bQuery.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh")));
bQuery.addEventListener(Events.ON_CLICK, this);
bExport.setImage(ThemeManager.getThemeResource("images/Export16.png"));
if (ThemeManager.isUseFontIconForImage())
bExport.setIconSclass("z-icon-Export");
else
bExport.setImage(ThemeManager.getThemeResource("images/Export16.png"));
bExport.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Export")));
bExport.addEventListener(Events.ON_CLICK, this);
bExport.setVisible(false);
@ -625,7 +634,10 @@ public class WAcctViewer extends Window implements EventListener<Event>
m_data.fillTable(selTable);
selTable.addEventListener(Events.ON_SELECT, this);
selRecord.setImage(ThemeManager.getThemeResource("images/Find16.png"));
if (ThemeManager.isUseFontIconForImage())
selRecord.setIconSclass("z-icon-Find");
else
selRecord.setImage(ThemeManager.getThemeResource("images/Find16.png"));
selRecord.addEventListener(Events.ON_CLICK, this);
selRecord.setLabel("");
@ -638,7 +650,10 @@ public class WAcctViewer extends Window implements EventListener<Event>
selAcct.setName("Account_ID");
selAcct.addEventListener(Events.ON_CLICK, this);
selAcct.setLabel("");
selAcct.setImage(ThemeManager.getThemeResource("images/Find16.png"));
if (ThemeManager.isUseFontIconForImage())
selAcct.setIconSclass("z-icon-Find");
else
selAcct.setImage(ThemeManager.getThemeResource("images/Find16.png"));
statusLine.setValue(" " + Msg.getMsg(Env.getCtx(), "ViewerOptions"));
@ -855,7 +870,10 @@ public class WAcctViewer extends Window implements EventListener<Event>
labels[selectionIndex].setVisible(true);
buttons[selectionIndex].setName(columnName); // actionCommand
buttons[selectionIndex].addEventListener(Events.ON_CLICK, this);
buttons[selectionIndex].setImage(ThemeManager.getThemeResource("images/Find16.png"));
if (ThemeManager.isUseFontIconForImage())
buttons[selectionIndex].setIconSclass("z-icon-Find");
else
buttons[selectionIndex].setImage(ThemeManager.getThemeResource("images/Find16.png"));
buttons[selectionIndex].setLabel("");
buttons[selectionIndex].setVisible(true);
selectionIndex++;

View File

@ -221,7 +221,12 @@ public class FeedbackRequestWindow extends Window implements EventListener<Event
southPane.appendChild(confirmPanel);
Button btn = new Button();
btn.setImage(ThemeManager.getThemeResource("images/Attachment24.png"));
//devCoffee #6142
if (ThemeManager.isUseFontIconForImage())
btn.setIconSclass("z-icon-Attachment");
else
btn.setImage(ThemeManager.getThemeResource("images/Attachment24.png"));
btn.setUpload(AdempiereWebUI.getUploadSetting());
btn.addEventListener(Events.ON_UPLOAD, this);
btn.setTooltiptext(Msg.getMsg(Env.getCtx(), "Attachment"));

View File

@ -285,7 +285,11 @@ public class WReportCustomization implements IFormController,EventListener<Even
btnSave = new Button();
btnSave.setName("btnSave");
btnSave.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Save")));
btnSave.setImage(ThemeManager.getThemeResource("images/Save24.png"));
//devCoffee #6142
if (ThemeManager.isUseFontIconForImage())
btnSave.setIconSclass("z-icon-Save");
else
btnSave.setImage(ThemeManager.getThemeResource("images/Save24.png"));
if(fm.getAD_Client_ID()== 0 || !isChange)
{
btnSave.setDisabled(true);
@ -297,7 +301,11 @@ public class WReportCustomization implements IFormController,EventListener<Even
if (m_isCanExport)
{
bExport.setImage(ThemeManager.getThemeResource("images/Export24.png"));
//devCoffee #6142
if (ThemeManager.isUseFontIconForImage())
bExport.setIconSclass("z-icon-Export");
else
bExport.setImage(ThemeManager.getThemeResource("images/Export24.png"));
bExport.setName("btnExport");
bExport.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Export")));
confirmPanelMain.addComponentsLeft(bExport);

View File

@ -153,8 +153,10 @@ public class WSQLProcess extends ADForm implements EventListener<Event>
public static final Button createProcessButton()
{
Button btnProcess = new Button();
btnProcess.setImage(ThemeManager.getThemeResource("images/Process24.png"));
if(ThemeManager.isUseFontIconForImage())
btnProcess.setIconSclass("z-icon-Process");
else
btnProcess.setImage(ThemeManager.getThemeResource("images/Process24.png"));
btnProcess.setName(Msg.getMsg(Env.getCtx(), "Process"));
return btnProcess;

View File

@ -781,9 +781,14 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
* @param popupMenu
*/
protected void addTextEditorMenu(WEditorPopupMenu popupMenu) {
Menuitem editor = new Menuitem(Msg.getMsg(Env.getCtx(), "Editor"), ThemeManager.getThemeResource("images/Editor16.png"));
Menuitem editor = new Menuitem();
editor.setAttribute("EVENT", WEditorPopupMenu.EDITOR_EVENT);
editor.addEventListener(Events.ON_CLICK, popupMenu);
editor.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Editor")).intern());
if (ThemeManager.isUseFontIconForImage())
editor.setIconSclass("z-icon-Edit");
else
editor.setImage(ThemeManager.getThemeResource("images/Editor16.png"));
editor.addEventListener(Events.ON_CLICK, popupMenu);
popupMenu.appendChild(editor);
}

View File

@ -241,7 +241,10 @@ ContextMenuListener, IZoomableEditor
searchMode = new Menuitem();
searchMode.setAttribute(WEditorPopupMenu.EVENT_ATTRIBUTE, SHORT_LIST_EVENT);
searchMode.setLabel(Msg.getMsg(Env.getCtx(), "ShortListSwitchSearchMode"));
searchMode.setImage(ThemeManager.getThemeResource("images/Lock16.png"));
if(ThemeManager.isUseFontIconForImage())
searchMode.setIconSclass("z-icon-Lock");
else
searchMode.setImage(ThemeManager.getThemeResource("images/Lock16.png"));
searchMode.addEventListener(Events.ON_CLICK, popupMenu);
popupMenu.appendChild(searchMode);
}

View File

@ -363,7 +363,10 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
LayoutUtils.addSclass("large-toolbarbutton", btn);
bAddDefaultMailText = new Button();
bAddDefaultMailText.setImage(ThemeManager.getThemeResource("images/DefaultMailText.png"));
if(ThemeManager.isUseFontIconForImage())
bAddDefaultMailText.setIconSclass("z-icon-GetMail");
else
bAddDefaultMailText.setImage(ThemeManager.getThemeResource("images/DefaultMailText.png"));
bAddDefaultMailText.addEventListener(Events.ON_CLICK, this);
bAddDefaultMailText.setTooltiptext(Msg.getMsg(Env.getCtx(), "AddDefaultMailTextContent"));
if (new MUser(Env.getCtx(), Env.getAD_User_ID(Env.getCtx()), null).getR_DefaultMailText_ID() > 0)

View File

@ -157,16 +157,25 @@ public class WMediaDialog extends Window implements EventListener<Event>
bSave.setEnabled(false);
bSave.setImage(ThemeManager.getThemeResource("images/Export24.png"));
if (ThemeManager.isUseFontIconForImage())
bSave.setIconSclass("z-icon-Export");
else
bSave.setImage(ThemeManager.getThemeResource("images/Download24.png"));
bSave.setTooltiptext(Msg.getMsg(Env.getCtx(), "AttachmentSave"));
bSave.addEventListener(Events.ON_CLICK, this);
bLoad.setImage(ThemeManager.getThemeResource("images/Import24.png"));
if (ThemeManager.isUseFontIconForImage())
bLoad.setIconSclass("z-icon-Import");
else
bLoad.setImage(ThemeManager.getThemeResource("images/Upload24.png"));
bLoad.setTooltiptext(Msg.getMsg(Env.getCtx(), "Load"));
bLoad.addEventListener(Events.ON_UPLOAD, this);
bLoad.setUpload(AdempiereWebUI.getUploadSetting());
bDelete.setImage(ThemeManager.getThemeResource("images/Delete24.png"));
if (ThemeManager.isUseFontIconForImage())
bDelete.setIconSclass("z-icon-Delete");
else
bDelete.setImage(ThemeManager.getThemeResource("images/Delete24.png"));
bDelete.setTooltiptext(Msg.getMsg(Env.getCtx(), "Delete"));
bDelete.addEventListener(Events.ON_CLICK, this);
@ -187,10 +196,16 @@ public class WMediaDialog extends Window implements EventListener<Event>
southPane.appendChild(confirmPanel);
ZKUpdateUtil.setHeight(southPane, "30px");
bOk.setImage(ThemeManager.getThemeResource("images/Ok24.png"));
if(ThemeManager.isUseFontIconForImage())
bOk.setIconSclass("z-icon-Ok");
else
bOk.setImage(ThemeManager.getThemeResource("images/Ok24.png"));
bOk.addEventListener(Events.ON_CLICK, this);
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel24.png"));
if(ThemeManager.isUseFontIconForImage())
bCancel.setIconSclass("z-icon-Cancel");
else
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel24.png"));
bCancel.addEventListener(Events.ON_CLICK, this);
confirmPanel.appendChild(bOk);

View File

@ -351,7 +351,10 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
cbNewEdit.addEventListener(Events.ON_CHECK, this);
row.appendChild(cbNewEdit);
bSelect.setLabel(Msg.getMsg(Env.getCtx(), "SelectExisting"));
bSelect.setImage(ThemeManager.getThemeResource("images/PAttribute16.png"));
if (ThemeManager.isUseFontIconForImage())
bSelect.setIconSclass("z-icon-PAttribute");
else
bSelect.setImage(ThemeManager.getThemeResource("images/PAttribute16.png"));
bSelect.addEventListener(Events.ON_CLICK, this);
row.appendChild(bSelect);
ZKUpdateUtil.setHflex(bSelect, "1");
@ -430,6 +433,11 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
// Popup
// fieldLot.addMouseListener(new VPAttributeDialog_mouseAdapter(this)); // popup
mZoom = new Menuitem(Msg.getMsg(Env.getCtx(), "Zoom"), ThemeManager.getThemeResource("images/Zoom16.png"));
if(ThemeManager.isUseFontIconForImage()) {
mZoom.setIconSclass("z-icon-Zoom");
mZoom.setImage("");
}
mZoom.addEventListener(Events.ON_CLICK, this);
popupMenu.appendChild(mZoom);
this.appendChild(popupMenu);

View File

@ -152,13 +152,29 @@ public class WRecordAccessDialog extends Window implements EventListener<Event>
*/
private void jbInit() throws Exception
{
bDelete.setImage(ThemeManager.getThemeResource("images/Delete16.png"));
//devCoffee #6142
if(ThemeManager.isUseFontIconForImage())
bDelete.setIconSclass("z-icon-Delete");
else
bDelete.setImage(ThemeManager.getThemeResource("images/Delete16.png"));
bDelete.setTooltiptext(Msg.getMsg(Env.getCtx(), "Delete"));
bNew.setImage(ThemeManager.getThemeResource("images/New16.png"));
//devCoffee #6142
if(ThemeManager.isUseFontIconForImage())
bNew.setIconSclass("z-icon-New");
else
bNew.setImage(ThemeManager.getThemeResource("images/New16.png"));
bNew.setTooltiptext(Msg.getMsg(Env.getCtx(), "New"));
bUp.setImage(ThemeManager.getThemeResource("images/Previous16.png"));
//devCoffee #6142
if(ThemeManager.isUseFontIconForImage())
bUp.setIconSclass("z-icon-Previous");
else
bUp.setImage(ThemeManager.getThemeResource("images/Previous16.png"));
bUp.setTooltiptext(Msg.getMsg(Env.getCtx(), "Previous"));
bDown.setImage(ThemeManager.getThemeResource("images/Next16.png"));
//devCoffee #6142
if(ThemeManager.isUseFontIconForImage())
bDown.setIconSclass("z-icon-Next");
else
bDown.setImage(ThemeManager.getThemeResource("images/Next16.png"));
bDown.setTooltiptext(Msg.getMsg(Env.getCtx(), "Next"));
cbActive.setText(Msg.translate(Env.getCtx(), "IsActive"));

View File

@ -291,4 +291,7 @@
}
.z-icon-UnSort:before {
content: "\f074";
}
}
.z-icon-GetMail:before {
content: "\f0e0";
}