mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
virtManager: Convert to CSS for most color usage
* Add CSS data in config.py and install it * Strip out all hardcoded colors and use style class annotations * Fix colors to be more theme appropriate to fix dark theme look Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
1ad470c021
commit
67ef81895e
@ -100,8 +100,14 @@
|
||||
<property name="label">Page title</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">fill</property>
|
||||
<style>
|
||||
<class name="vmm-header-text"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="vmm-header"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.2 -->
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
@ -100,8 +100,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label"><span color='#484848'>Free Space</span></property>
|
||||
<property name="label">Free Space</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
61
ui/clone.ui
61
ui/clone.ui
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<object class="GtkImage" id="image1">
|
||||
@ -12,6 +12,9 @@
|
||||
<property name="title" translatable="yes">Clone Virtual Machine</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<signal name="delete-event" handler="on_clone_delete_event" swapped="no"/>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
@ -50,8 +53,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><span size='large' color='white'>Clone virtual machine</span></property>
|
||||
<property name="label" translatable="yes"><span size='large'>Clone virtual machine</span></property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-header-text"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@ -68,6 +74,9 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="vmm-header"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -216,8 +225,11 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Networking:</span></property>
|
||||
<property name="label" translatable="yes">Networking:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -344,8 +356,11 @@
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Storage:</span></property>
|
||||
<property name="label" translatable="yes">Storage:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -358,10 +373,13 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>_Name:</span></property>
|
||||
<property name="label" translatable="yes">_Name:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">clone-new-name</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -563,6 +581,9 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.</sp
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<signal name="delete-event" handler="on_vmm_change_mac_delete_event" swapped="no"/>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
@ -728,8 +749,11 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.</sp
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Type:</span></property>
|
||||
<property name="label" translatable="yes">Type:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@ -742,8 +766,11 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.</sp
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>MAC:</span></property>
|
||||
<property name="label" translatable="yes">MAC:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@ -788,6 +815,9 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.</sp
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<signal name="delete-event" handler="on_vmm_change_storage_delete_event" swapped="no"/>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox2">
|
||||
<property name="visible">True</property>
|
||||
@ -922,8 +952,11 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.</sp
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Size:</span></property>
|
||||
<property name="label" translatable="yes">Size:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -935,8 +968,11 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.</sp
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Target:</span></property>
|
||||
<property name="label" translatable="yes">Target:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -949,8 +985,11 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.</sp
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Path:</span></property>
|
||||
<property name="label" translatable="yes">Path:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -1000,7 +1039,7 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.</sp
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>New _Path:</span></property>
|
||||
<property name="label" translatable="yes">New _Path:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">change-storage-new</property>
|
||||
|
@ -60,8 +60,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><span size='large' color='white'>Create virtual network</span></property>
|
||||
<property name="label" translatable="yes"><span size='large'>Create virtual network</span></property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-header-text"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -85,6 +88,9 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="vmm-header"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -50,8 +50,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><span size='large' color='white'>Create storage pool</span></property>
|
||||
<property name="label" translatable="yes"><span size='large'>Create storage pool</span></property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-header-text"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -68,6 +71,9 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="vmm-header"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -71,8 +71,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><span size='large' color='white'>Create a new virtual machine</span></property>
|
||||
<property name="label" translatable="yes"><span size='large'>Create a new virtual machine</span></property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-header-text"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -85,13 +88,16 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label"><span color='#59B0E2'>Step foo of bar</span></property>
|
||||
<property name="label">Step foo of bar</property>
|
||||
<property name="use_markup">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="header-pagenum-atkobject">
|
||||
<property name="AtkObject::accessible-name">pagenum-label</property>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="vmm-header-subtext"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@ -115,6 +121,9 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="vmm-header"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -2109,10 +2118,13 @@ connections is not yet supported.</small></property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>_Name:</span></property>
|
||||
<property name="label" translatable="yes">_Name:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">create-vm-name</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -2137,8 +2149,11 @@ connections is not yet supported.</small></property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Install:</span></property>
|
||||
<property name="label" translatable="yes">Install:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -2151,8 +2166,11 @@ connections is not yet supported.</small></property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Memory:</span></property>
|
||||
<property name="label" translatable="yes">Memory:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -2165,8 +2183,11 @@ connections is not yet supported.</small></property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>CPUs:</span></property>
|
||||
<property name="label" translatable="yes">CPUs:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -2179,8 +2200,11 @@ connections is not yet supported.</small></property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Storage:</span></property>
|
||||
<property name="label" translatable="yes">Storage:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -2193,8 +2217,11 @@ connections is not yet supported.</small></property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>OS:</span></property>
|
||||
<property name="label" translatable="yes">OS:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
|
@ -71,8 +71,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><span size='large' color='white'>Create storage volume</span></property>
|
||||
<property name="label" translatable="yes"><span size='large'>Create storage volume</span></property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-header-text"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@ -89,6 +92,9 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="vmm-header"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
13
ui/delete.ui
13
ui/delete.ui
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<object class="GtkWindow" id="vmm-delete">
|
||||
@ -10,6 +10,9 @@
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<signal name="delete-event" handler="on_vmm_delete_delete_event" swapped="no"/>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
@ -45,8 +48,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label"><span size='large' color='white'>Placeholder</span></property>
|
||||
<property name="label"><span size='large'>Placeholder</span></property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-header-text"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -56,6 +62,9 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="vmm-header"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
@ -17,6 +17,9 @@
|
||||
<property name="default_height">300</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<signal name="delete-event" handler="on_vmm_migrate_delete_event" swapped="no"/>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
@ -52,8 +55,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label"><span size='large' color='white'>Placeholder</span></property>
|
||||
<property name="label"><span size='large'>Placeholder</span></property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-header-text"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -63,6 +69,9 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="vmm-header"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -94,8 +103,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Migrating VM:</span></property>
|
||||
<property name="label" translatable="yes">Migrating VM:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -107,8 +119,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>Original host:</span></property>
|
||||
<property name="label" translatable="yes">Original host:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -120,10 +135,13 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes"><span color='#484848'>New _host:</span></property>
|
||||
<property name="label" translatable="yes">New _host:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">migrate-dest</property>
|
||||
<style>
|
||||
<class name="vmm-lighter"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
|
@ -54,8 +54,11 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><span size='large' color='white'>Create snapshot</span></property>
|
||||
<property name="label" translatable="yes"><span size='large'>Create snapshot</span></property>
|
||||
<property name="use_markup">True</property>
|
||||
<style>
|
||||
<class name="vmm-header-text"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@ -72,6 +75,9 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="vmm-header"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -7,7 +7,6 @@
|
||||
import traceback
|
||||
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
|
||||
from virtinst import (DeviceChannel, DeviceConsole,
|
||||
DeviceController, DeviceDisk, DeviceGraphics, DeviceHostdev,
|
||||
@ -173,9 +172,6 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
self.widget("create-pages").set_show_tabs(False)
|
||||
self.widget("top-pages").set_show_tabs(False)
|
||||
|
||||
blue = Gdk.color_parse("#0072A8")
|
||||
self.widget("page-title-box").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
hw_col = Gtk.TreeViewColumn(_("Hardware"))
|
||||
hw_col.set_spacing(6)
|
||||
hw_col.set_min_width(165)
|
||||
@ -1098,8 +1094,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
|
||||
def _set_page_title(self, page):
|
||||
title = self._dev_to_title(page)
|
||||
markup = "<span size='large' color='white'>%s</span>" % title
|
||||
self.widget("page-title-label").set_markup(markup)
|
||||
self.widget("page-title-label").set_markup(title)
|
||||
|
||||
def _xmleditor_xml_requested_cb(self, src):
|
||||
dev = self._build_device(check_xmleditor=False)
|
||||
|
@ -7,7 +7,6 @@
|
||||
import os
|
||||
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
|
||||
import virtinst
|
||||
from virtinst import Cloner
|
||||
@ -233,9 +232,6 @@ class vmmCloneVM(vmmGObjectUI):
|
||||
# First time setup
|
||||
|
||||
def _init_ui(self):
|
||||
blue = Gdk.Color.parse("#0072A8")[1]
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
context = self.topwin.get_style_context()
|
||||
defcolor = context.get_background_color(Gtk.StateType.NORMAL)
|
||||
self.widget("storage-viewport").override_background_color(
|
||||
|
@ -17,6 +17,29 @@ from .lib.inspection import vmmInspection
|
||||
from .lib.keyring import vmmKeyring, vmmSecret
|
||||
|
||||
|
||||
CSSDATA = """
|
||||
/* Lighter colored text in some wizard summary fields */
|
||||
.vmm-lighter {
|
||||
color: @insensitive_fg_color
|
||||
}
|
||||
|
||||
/* Text on the blue header in our wizards */
|
||||
.vmm-header-text {
|
||||
color: white
|
||||
}
|
||||
|
||||
/* Subtext on the blue header in our wizards */
|
||||
.vmm-header-subtext {
|
||||
color: #59B0E2
|
||||
}
|
||||
|
||||
/* The blue header */
|
||||
.vmm-header {
|
||||
background-color: #0072A8
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
class _SettingsWrapper(object):
|
||||
"""
|
||||
Wrapper class to simplify interacting with gsettings APIs.
|
||||
@ -185,6 +208,25 @@ class vmmConfig(object):
|
||||
self.default_add_spice_usbredir = "yes"
|
||||
|
||||
self._objects = []
|
||||
self.color_insensitive = None
|
||||
self._init_css()
|
||||
|
||||
def _init_css(self):
|
||||
from gi.repository import Gdk
|
||||
screen = Gdk.Screen.get_default()
|
||||
|
||||
css_provider = Gtk.CssProvider()
|
||||
css_provider.load_from_data(CSSDATA.encode("utf-8"))
|
||||
|
||||
context = Gtk.StyleContext()
|
||||
context.add_provider_for_screen(screen, css_provider,
|
||||
Gtk.STYLE_PROVIDER_PRIORITY_USER)
|
||||
|
||||
found, color = context.lookup_color("insensitive_fg_color")
|
||||
if not found:
|
||||
log.debug("Didn't find insensitive_fg_color in theme")
|
||||
return
|
||||
self.color_insensitive = color.to_string()
|
||||
|
||||
|
||||
# General app wide helpers (gsettings agnostic)
|
||||
|
@ -7,7 +7,6 @@
|
||||
import ipaddress
|
||||
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import Pango
|
||||
|
||||
import libvirt
|
||||
@ -90,9 +89,6 @@ class vmmCreateNetwork(vmmGObjectUI):
|
||||
###########
|
||||
|
||||
def set_initial_state(self):
|
||||
blue = Gdk.Color.parse("#0072A8")[1]
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
# [ dev name, label ]
|
||||
pf_list = self.widget("net-hostdevs")
|
||||
pf_model = Gtk.ListStore(str, str)
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
import os
|
||||
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import Gtk
|
||||
|
||||
from virtinst import log
|
||||
@ -87,9 +86,6 @@ class vmmCreatePool(vmmGObjectUI):
|
||||
model.append([typ, "%s: %s" % (typ, desc)])
|
||||
|
||||
def _init_ui(self):
|
||||
blue = Gdk.Color.parse("#0072A8")[1]
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
format_list = self.widget("pool-format")
|
||||
format_model = Gtk.ListStore(str, str)
|
||||
format_list.set_model(format_model)
|
||||
|
@ -10,7 +10,6 @@ import os
|
||||
import threading
|
||||
import time
|
||||
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Pango
|
||||
|
||||
@ -261,9 +260,6 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
self.widget("create-pages").set_show_tabs(False)
|
||||
self.widget("install-method-pages").set_show_tabs(False)
|
||||
|
||||
blue = Gdk.Color.parse("#0072A8")[1]
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
# Connection list
|
||||
self.widget("create-conn-label").set_text("")
|
||||
self.widget("startup-error").set_text("")
|
||||
@ -591,8 +587,7 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
memory = int(self.conn.host_memory_size())
|
||||
mem_label = (_("Up to %(maxmem)s available on the host") %
|
||||
{'maxmem': _pretty_memory(memory)})
|
||||
mem_label = ("<span size='small' color='#484848'>%s</span>" %
|
||||
mem_label)
|
||||
mem_label = ("<span size='small'>%s</span>" % mem_label)
|
||||
self.widget("mem").set_range(50, memory // 1024)
|
||||
self.widget("phys-mem-label").set_markup(mem_label)
|
||||
|
||||
@ -603,8 +598,7 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
cmax = 1
|
||||
cpu_label = (_("Up to %(numcpus)d available") %
|
||||
{'numcpus': int(phys_cpus)})
|
||||
cpu_label = ("<span size='small' color='#484848'>%s</span>" %
|
||||
cpu_label)
|
||||
cpu_label = ("<span size='small'>%s</span>" % cpu_label)
|
||||
self.widget("cpus").set_range(1, cmax)
|
||||
self.widget("phys-cpu-label").set_markup(cpu_label)
|
||||
|
||||
@ -885,7 +879,7 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
###############################
|
||||
|
||||
def _populate_summary_storage(self, path=None):
|
||||
storagetmpl = "<span size='small' color='#484848'>%s</span>"
|
||||
storagetmpl = "<span size='small'>%s</span>"
|
||||
storagesize = ""
|
||||
storagepath = ""
|
||||
|
||||
@ -1290,8 +1284,7 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
final -= 1
|
||||
cur = min(cur, final)
|
||||
|
||||
page_lbl = ("<span color='#59B0E2'>%s</span>" %
|
||||
_("Step %(current_page)d of %(max_page)d") %
|
||||
page_lbl = (_("Step %(current_page)d of %(max_page)d") %
|
||||
{'current_page': cur, 'max_page': final})
|
||||
|
||||
self.widget("header-pagenum").set_markup(page_lbl)
|
||||
|
@ -5,7 +5,6 @@
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
|
||||
from virtinst import log
|
||||
from virtinst import StorageVolume
|
||||
@ -108,9 +107,6 @@ class vmmCreateVolume(vmmGObjectUI):
|
||||
###########
|
||||
|
||||
def _init_state(self):
|
||||
blue = Gdk.color_parse("#0072A8")
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
format_list = self.widget("vol-format")
|
||||
format_model = Gtk.ListStore(str, str)
|
||||
format_list.set_model(format_model)
|
||||
|
@ -9,7 +9,6 @@ import stat
|
||||
import traceback
|
||||
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import Pango
|
||||
|
||||
import virtinst
|
||||
@ -62,9 +61,6 @@ class _vmmDeleteBase(vmmGObjectUI):
|
||||
|
||||
|
||||
def _init_state(self):
|
||||
blue = Gdk.Color.parse("#0072A8")[1]
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
_prepare_storage_list(self.widget("delete-storage-list"))
|
||||
|
||||
def show(self, parent, vm):
|
||||
@ -101,7 +97,7 @@ class _vmmDeleteBase(vmmGObjectUI):
|
||||
# Set VM name or disk.target in title'
|
||||
text = self._get_dialog_text()
|
||||
|
||||
title_str = ("<span size='large' color='white'>%s</span>" %
|
||||
title_str = ("<span size='large'>%s</span>" %
|
||||
xmlutil.xml_escape(text))
|
||||
self.widget("header-label").set_markup(title_str)
|
||||
|
||||
|
@ -9,7 +9,6 @@ import glob
|
||||
import io
|
||||
import os
|
||||
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import GdkPixbuf
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Pango
|
||||
@ -110,9 +109,6 @@ class vmmSnapshotNew(vmmGObjectUI):
|
||||
###########
|
||||
|
||||
def _init_ui(self):
|
||||
blue = Gdk.color_parse("#0072A8")
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
buf = Gtk.TextBuffer()
|
||||
self.widget("snapshot-new-description").set_buffer(buf)
|
||||
|
||||
|
@ -64,7 +64,7 @@ class vmmAddStorage(vmmGObjectUI):
|
||||
|
||||
hd_label = (_("%s available in the default location") %
|
||||
pretty_storage(max_storage))
|
||||
hd_label = ("<span color='#484848'>%s</span>" % hd_label)
|
||||
hd_label = ("<span>%s</span>" % hd_label)
|
||||
widget.set_markup(hd_label)
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@ def _get_pool_size_percent(pool):
|
||||
per = 0
|
||||
else:
|
||||
per = int(((float(alloc) / float(cap)) * 100))
|
||||
return "<span size='small' color='#484848'>%s%%</span>" % int(per)
|
||||
return "<span size='small'>%s%%</span>" % int(per)
|
||||
|
||||
|
||||
class vmmHostStorage(vmmGObjectUI):
|
||||
|
@ -9,6 +9,8 @@ from gi.repository import Gtk
|
||||
# pylint: disable=arguments-differ
|
||||
# Newer pylint can detect, but warns that overridden arguments are wrong
|
||||
|
||||
BASECOLOR = Gtk.StyleContext().lookup_color("theme_base_color")[1]
|
||||
|
||||
|
||||
def rect_print(name, rect):
|
||||
# For debugging
|
||||
@ -162,8 +164,8 @@ class CellRendererSparkline(Gtk.CellRenderer):
|
||||
cell_area.height - (BORDER_PADDING * 2))
|
||||
cr.stroke()
|
||||
|
||||
# Fill in white box inside graph outline
|
||||
cr.set_source_rgb(1, 1, 1)
|
||||
# Fill in basecolor box inside graph outline
|
||||
cr.set_source_rgb(BASECOLOR.red, BASECOLOR.green, BASECOLOR.blue)
|
||||
cr.rectangle(cell_area.x + BORDER_PADDING,
|
||||
cell_area.y + BORDER_PADDING,
|
||||
border_width,
|
||||
@ -205,6 +207,7 @@ class CellRendererSparkline(Gtk.CellRenderer):
|
||||
|
||||
# Set color to light blue for the fill
|
||||
cr.set_source_rgba(0.71484375, 0.84765625, 0.89453125, .5)
|
||||
|
||||
draw_fill(cr,
|
||||
cell_area.x, cell_area.y,
|
||||
cell_area.width, cell_area.height,
|
||||
|
@ -595,7 +595,7 @@ class vmmManager(vmmGObjectUI):
|
||||
def _build_conn_color(self, conn):
|
||||
color = None
|
||||
if conn.is_disconnected():
|
||||
color = "#5b5b5b"
|
||||
color = self.config.color_insensitive
|
||||
return color
|
||||
|
||||
def _build_vm_markup(self, name, status):
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
import traceback
|
||||
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Pango
|
||||
|
||||
@ -104,9 +103,6 @@ class vmmMigrateDialog(vmmGObjectUI):
|
||||
################
|
||||
|
||||
def _init_state(self):
|
||||
blue = Gdk.color_parse("#0072A8")
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
# Connection combo
|
||||
cols = [None] * NUM_COLS
|
||||
cols[COL_LABEL] = str
|
||||
@ -153,7 +149,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
||||
self.widget("migrate-temporary-label").get_tooltip_text())
|
||||
|
||||
def _reset_state(self):
|
||||
title_str = ("<span size='large' color='white'>%s '%s'</span>" %
|
||||
title_str = ("<span size='large'>%s '%s'</span>" %
|
||||
(_("Migrate"), xmlutil.xml_escape(self.vm.get_name())))
|
||||
self.widget("header-label").set_markup(title_str)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user