ui: vm/Hardware: convert more icons from bitmap to font awesome

since commit 05d9252c00dcb3bc4d0be8e4ab869afaddd25f47 we can use the
Font Awesome icons without them being shown in the remove dialog, so
convert more to them - they are vectors and look a bit better.

Also ensure that all icons are rendered as fixed width, with fa-fw

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-07-24 10:48:15 +02:00
parent f8a710d743
commit 842ea2665c

View File

@ -149,7 +149,7 @@ Ext.define('PVE.qemu.HardwareView', {
header: gettext('Display'), header: gettext('Display'),
editor: caps.vms['VM.Config.HWType'] ? 'PVE.qemu.DisplayEdit' : undefined, editor: caps.vms['VM.Config.HWType'] ? 'PVE.qemu.DisplayEdit' : undefined,
never_delete: true, never_delete: true,
tdCls: 'pve-itype-icon-display', iconCls: 'desktop',
group:5, group:5,
defaultValue: '', defaultValue: '',
renderer: PVE.Utils.render_kvm_vga_driver renderer: PVE.Utils.render_kvm_vga_driver
@ -219,7 +219,7 @@ Ext.define('PVE.qemu.HardwareView', {
var confid = type + id; var confid = type + id;
rows[confid] = { rows[confid] = {
group: 10, group: 10,
tdCls: 'pve-itype-icon-storage', iconCls: 'hdd-o',
editor: 'PVE.qemu.HDEdit', editor: 'PVE.qemu.HDEdit',
never_delete: caps.vms['VM.Config.Disk'] ? false : true, never_delete: caps.vms['VM.Config.Disk'] ? false : true,
header: gettext('Hard Disk') + ' (' + confid +')', header: gettext('Hard Disk') + ' (' + confid +')',
@ -232,7 +232,7 @@ Ext.define('PVE.qemu.HardwareView', {
rows[confid] = { rows[confid] = {
group: 15, group: 15,
order: i, order: i,
tdCls: 'pve-itype-icon-network', iconCls: 'exchange',
editor: caps.vms['VM.Config.Network'] ? 'PVE.qemu.NetworkEdit' : undefined, editor: caps.vms['VM.Config.Network'] ? 'PVE.qemu.NetworkEdit' : undefined,
never_delete: caps.vms['VM.Config.Network'] ? false : true, never_delete: caps.vms['VM.Config.Network'] ? false : true,
header: gettext('Network Device') + ' (' + confid +')' header: gettext('Network Device') + ' (' + confid +')'
@ -240,7 +240,7 @@ Ext.define('PVE.qemu.HardwareView', {
} }
rows.efidisk0 = { rows.efidisk0 = {
group: 20, group: 20,
tdCls: 'pve-itype-icon-storage', iconCls: 'hdd-o',
editor: null, editor: null,
never_delete: caps.vms['VM.Config.Disk'] ? false : true, never_delete: caps.vms['VM.Config.Disk'] ? false : true,
header: gettext('EFI Disk') header: gettext('EFI Disk')
@ -526,7 +526,7 @@ Ext.define('PVE.qemu.HardwareView', {
var efidisk_menuitem = Ext.create('Ext.menu.Item',{ var efidisk_menuitem = Ext.create('Ext.menu.Item',{
text: gettext('EFI Disk'), text: gettext('EFI Disk'),
iconCls: 'pve-itype-icon-storage', iconCls: 'fa fa-fw fa-hdd-o black',
disabled: !caps.vms['VM.Config.Disk'], disabled: !caps.vms['VM.Config.Disk'],
handler: function() { handler: function() {
@ -630,7 +630,7 @@ Ext.define('PVE.qemu.HardwareView', {
items: [ items: [
{ {
text: gettext('Hard Disk'), text: gettext('Hard Disk'),
iconCls: 'pve-itype-icon-storage', iconCls: 'fa fa-fw fa-hdd-o black',
disabled: !caps.vms['VM.Config.Disk'], disabled: !caps.vms['VM.Config.Disk'],
handler: function() { handler: function() {
var win = Ext.create('PVE.qemu.HDEdit', { var win = Ext.create('PVE.qemu.HDEdit', {
@ -656,7 +656,7 @@ Ext.define('PVE.qemu.HardwareView', {
}, },
{ {
text: gettext('Network Device'), text: gettext('Network Device'),
iconCls: 'pve-itype-icon-network', iconCls: 'fa fa-fw fa-exchange black',
disabled: !caps.vms['VM.Config.Network'], disabled: !caps.vms['VM.Config.Network'],
handler: function() { handler: function() {
var win = Ext.create('PVE.qemu.NetworkEdit', { var win = Ext.create('PVE.qemu.NetworkEdit', {
@ -672,7 +672,7 @@ Ext.define('PVE.qemu.HardwareView', {
{ {
text: gettext('USB Device'), text: gettext('USB Device'),
itemId: 'addusb', itemId: 'addusb',
iconCls: 'fa fa-usb black', iconCls: 'fa fa-fw fa-usb black',
disabled: !caps.nodes['Sys.Console'], disabled: !caps.nodes['Sys.Console'],
handler: function() { handler: function() {
var win = Ext.create('PVE.qemu.USBEdit', { var win = Ext.create('PVE.qemu.USBEdit', {
@ -713,7 +713,7 @@ Ext.define('PVE.qemu.HardwareView', {
{ {
text: gettext('CloudInit Drive'), text: gettext('CloudInit Drive'),
itemId: 'addci', itemId: 'addci',
iconCls: 'fa fa-cloud black', iconCls: 'fa fa-fw fa-cloud black',
disabled: !caps.nodes['Sys.Console'], disabled: !caps.nodes['Sys.Console'],
handler: function() { handler: function() {
var win = Ext.create('PVE.qemu.CIDriveEdit', { var win = Ext.create('PVE.qemu.CIDriveEdit', {
@ -727,7 +727,7 @@ Ext.define('PVE.qemu.HardwareView', {
{ {
text: gettext('Audio Device'), text: gettext('Audio Device'),
itemId: 'addaudio', itemId: 'addaudio',
iconCls: 'fa fa-volume-up black', iconCls: 'fa fa-fw fa-volume-up black',
disabled: !caps.vms['VM.Config.HWType'], disabled: !caps.vms['VM.Config.HWType'],
handler: function() { handler: function() {
var win = Ext.create('PVE.qemu.AudioEdit', { var win = Ext.create('PVE.qemu.AudioEdit', {