5 changes: 5 additions & 0 deletions icons/scalable/qui-disk-space-warn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions icons/scalable/qui-disk-space.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 7 additions & 14 deletions icons/scalable/qui-domains-scalable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions icons/scalable/qui-updates-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions icons/scalable/qui-updates-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions icons/scalable/qui-updates.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion icons/scalable/settings-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion icons/scalable/settings-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion icons/scalable/smartphone-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion icons/scalable/smartphone-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions icons/scalable/url-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions icons/scalable/url-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions icons/scalable/usb-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions icons/scalable/usb-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,976 changes: 1,051 additions & 925 deletions qubes_config/global_config.glade

Large diffs are not rendered by default.

29 changes: 28 additions & 1 deletion qubes_config/global_config/global_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@
import qubesadmin.events
import qubesadmin.exc
import qubesadmin.vm
from ..widgets.gtk_utils import show_error, show_dialog_with_icon, load_theme
from ..widgets.gtk_utils import (
show_error,
show_dialog_with_icon,
load_theme,
is_theme_light,
)
from ..widgets.gtk_widgets import ProgressBarDialog, ViewportHandler
from ..widgets.utils import open_url_in_disposable
from .page_handler import PageHandler
Expand Down Expand Up @@ -398,6 +403,8 @@ def perform_setup(self):
dark_file_name="qubes-global-config-dark.css",
)

self.load_icons()

self.progress_bar_dialog.show_all()
self.progress_bar_dialog.update_progress(0)

Expand Down Expand Up @@ -536,6 +543,26 @@ def _activate_link(self, _widget, url):
open_url_in_disposable(url, self.qapp)
return True

def load_icons(self):
"""Load icons that have different light/dark modes"""
icon_dict = {
"settings_tab_icon": "settings-",
"usb_tab_icon": "usb-",
"updates_tab_icon": "qui-updates-",
"splitgpg_tab_icon": "key-",
"clipboard_tab_icon": "qui-clipboard-",
"file_tab_icon": "harddrive-",
"url_tab_icon": "url-",
"thisdevice_tab_icon": "laptop-",
}

current_theme = "light" if is_theme_light(self.main_window) else "dark"

for icon_id, icon_name in icon_dict.items():
self.builder.get_object(icon_id).set_from_icon_name(
icon_name + current_theme, Gtk.IconSize.LARGE_TOOLBAR
)

def get_current_page(self) -> Optional[PageHandler]:
"""Get currently visible page."""
page_num = self.main_notebook.get_current_page()
Expand Down
7 changes: 6 additions & 1 deletion qubes_config/global_config/policy_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ def __init__(
self.include_adminvm = include_admin_vm

# main widgets
self.custom_settings_box: Gtk.Box = gtk_builder.get_object(
f"{prefix}_custom_box"
)

self.main_list_box: Gtk.ListBox = gtk_builder.get_object(
f"{prefix}_main_list"
)
Expand Down Expand Up @@ -281,7 +285,8 @@ def populate_rule_lists(self, rules: List[Rule]):
self.check_custom_rules(rules)

def set_custom_editable(self, state: bool):
"""If true, set widgets to accept editing custom rules."""
"""If true, set widgets to accept editing custom rules and show them."""
self.custom_settings_box.set_visible(state)
self.add_button.set_sensitive(state)
self.main_list_box.set_sensitive(state)
self.exception_list_box.set_sensitive(state)
Expand Down
9 changes: 5 additions & 4 deletions qubes_config/global_config/rule_list_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def __init__(
)

self.combobox: Gtk.ComboBox = Gtk.ComboBox.new_with_entry()
self.combobox.get_style_context().add_class("flat_combo")
self.combobox.get_child().set_width_chars(24)
self.model = VMListModeler(
combobox=self.combobox,
Expand Down Expand Up @@ -140,10 +141,10 @@ def __init__(
additional_text_widget = Gtk.Label()
additional_text_widget.set_text(additional_text)
additional_text_widget.get_style_context().add_class("didascalia")
additional_text_widget.set_halign(Gtk.Align.END)
additional_text_widget.set_halign(Gtk.Align.CENTER)
self.pack_end(additional_text_widget, False, False, 0)
if additional_widget:
additional_widget.set_halign(Gtk.Align.END)
additional_widget.set_halign(Gtk.Align.CENTER)
self.pack_end(additional_widget, False, False, 0)

self.set_editable(False)
Expand Down Expand Up @@ -385,8 +386,8 @@ def __init__(
click_function=self.revert,
style_classes=["button_cancel", "flat_button"],
)
self.additional_widget_box.pack_end(save_button, False, False, 10)
self.additional_widget_box.pack_end(cancel_button, False, False, 10)
self.additional_widget_box.pack_start(save_button, False, False, 10)
self.additional_widget_box.pack_start(cancel_button, False, False, 10)

self.additional_widget_box.set_no_show_all(True)
self.outer_box.pack_start(self.additional_widget_box, False, False, 10)
Expand Down
14 changes: 2 additions & 12 deletions qubes_config/global_config/updates_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,19 +305,9 @@ def __init__(self, gtk_builder: Gtk.Builder, qapp: qubesadmin.Qubes):

def _set_label(self):
if self.enable_radio.get_active():
self.exception_label.set_markup(
_(
"Except the following qubes, for which checking for updates"
" will be <b>disabled</b>"
)
)
self.exception_label.set_markup(_("<b>disabled</b>"))
else:
self.exception_label.set_markup(
_(
"Except the following qubes, for which checking for updates"
" will be <b>enabled</b>"
)
)
self.exception_label.set_markup(_("<b>enabled</b>"))

def _enable_disable_toggled(self, *_args):
self._set_label()
Expand Down
2 changes: 1 addition & 1 deletion qubes_config/global_config/vm_flowbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, vm: qubesadmin.vm.QubesVM):
box.pack_start(token_widget, False, False, 0)
remove_icon = Gtk.Image()
remove_icon.set_from_pixbuf(load_icon("qubes-delete", 14, 14))
box.pack_start(remove_icon, False, False, 10)
box.pack_start(remove_icon, False, False, 0)

button.add(box)
button.connect("clicked", self._remove_self)
Expand Down
156 changes: 121 additions & 35 deletions qubes_config/new_qube.glade

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions qubes_config/new_qube/new_qube_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def perform_setup(self):
)

self.qube_name.connect("changed", self._name_changed)
self.qube_name.connect("focus-out-event", self._name_changed)

self.progress_bar_dialog.update_progress(0.1)

Expand Down Expand Up @@ -218,6 +219,8 @@ def perform_setup(self):
self.progress_bar_dialog.update_progress(1)
self.progress_bar_dialog.hide()

self.main_window.set_focus(self.qube_name)

def _quit(self, *_args):
self.quit()

Expand All @@ -232,11 +235,14 @@ def register_signals():
(str,),
)

def _name_changed(self, entry: Gtk.Entry):
def _name_changed(self, entry: Gtk.Entry, event=None):
# pylint: disable=unused-argument
if not entry.get_text():
self.create_button.set_sensitive(False)
self.qube_name.get_style_context().add_class("invalid_entry")
else:
self.create_button.set_sensitive(True)
self.qube_name.get_style_context().remove_class("invalid_entry")

def _type_selected(self, button: Gtk.RadioButton):
button_name = button.get_name()
Expand All @@ -253,7 +259,7 @@ def _type_selected(self, button: Gtk.RadioButton):
self.network_selector.network_default.set_active(True)

self.tooltips[button_name].set_from_pixbuf(
load_icon("qubes-question-light", 20, 20)
load_icon("qubes-question", 20, 20)
)

def _do_create_qube(self, *_args):
Expand Down
102 changes: 66 additions & 36 deletions qubes_config/qubes-global-config-base.css
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
separator {
background: @separator-color;
border-top: 1px solid @dark-gray-2;
margin-top: 5px;
margin-bottom: 5px;
}

.combo {
padding: 2px;
padding: 2px 2px 2px 10px;
background: @top-background;
border-width: 1px;
border-color: @background-frame
}

.qubes_version_label {
margin: 10px 0 10px 0;
color: @soft-text-color;
font-size: 120%;
font-weight: 700;
.flat_combo button.combo {
border-left: 0px;
}

.global_config_label {
font-weight: 600;
font-size: 110%;
}

.content_box {
background: @top-background-2;
border-width: 2px;
border-width: 0px 0px 0px 1px;
border-color: @background-frame;
padding-left: 50px;
padding-right: 50px;
box-shadow: @background-frame 2px -2px 2px -2px inset;
padding-top: 50px;
border-style: solid;
padding-left: 30px;
padding-right: 30px;
padding-top: 30px;
box-shadow: none;
padding-bottom: 50px;
}

#main_notebook {
border-width: 1px;
border-width: 1px 1px 0px 1px;
border-color: @bottom-background;
border-style: solid;
}
Expand All @@ -36,21 +45,21 @@ separator {
}

#main_notebook header tabs tab {
border-width: 0;
box-shadow: @background-frame 0px 2px 2px -2px inset;
margin: 0px;
font-weight: bold;
font-weight: 500;
}

#main_notebook header tabs tab:checked {
background: @qubes-blue;
color: white;
background: @blue-bg;
}

#main_notebook header tabs tab:hover {
box-shadow: @background-frame 0px 2px 2px -2px inset;
border-width: 0px;
border-color: @background-frame;
background: @blue-bg;
}

.frame {
box-shadow: none;
border-width: 0 0 1px 0;
}

.category {
Expand All @@ -64,6 +73,15 @@ separator {
.section_title {
margin-top: 10px;
margin-bottom: 2px;
font-weight: 600;
font-size: 150%;
}

.page_title {
font-weight: 400;
font-size: 180%;
margin-top: 20px;
margin-bottom: 2px;
}

.flowbox_container {
Expand Down Expand Up @@ -100,17 +118,25 @@ separator {
}

.add_label {
color: @qubes-blue;
font-weight: bold;
color: @text-color;
font-weight: 600;
font-size: 100%;
}

.add_label:disabled {
color: @misc-text-color;
font-weight: bold;
color: @soft-text-color;
font-size: 100%;
font-weight: 600;
}

.add_button {
border: 0;
border-image: none;
background-image: none;
border: 2px;
border-style: solid;
border-color: @medium-gray-2;
background: @add-button;
box-shadow: none;
}

.permission_list {
Expand All @@ -130,10 +156,8 @@ separator {

.edited_row {
padding: 5px 5px 5px 5px;
background: @top-background;
border-color: @background-frame;
border-style: solid;
border-width: 1px;
background: none;
border-style: none;
margin: 5px;
}

Expand All @@ -142,11 +166,12 @@ separator {
}

.problem_box {
margin: 5px 80px 5px 40px;
margin: 5px 0px 5px 0px;
padding: 10px;
border: 1px;
border-width: 2px;
border-style: solid;
border-color: @background-frame;
border-radius: 4px;
border-color: @problem-frame;
background: @problem-background;
}

Expand Down Expand Up @@ -197,12 +222,17 @@ separator {
}

.info_box {
padding: 10px 20px 10px 20px;
margin: 5px 50px 5px 30px;
padding: 10px 10px 10px 10px;
margin: 5px 0px 5px 0px;
background: @info-background;
border-width: 1px;
border-width: 2px;
border-style: solid;
border-color: @background-frame;
border-radius: 4px;
border-color: @info-frame;
}

.info_box link {
color: @link-color;
}

.action_text {
Expand Down
41 changes: 26 additions & 15 deletions qubes_config/qubes-new-qube-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,14 @@

.type_toggle {
font-weight: 600;
font-size: 120%;
border-radius: 0px;
border-width: 1px 0px 0px 0px;
border-color: @background-frame;
font-size: 110%;
border-width: 0px;
background: @top-background;
padding: 10px 15px 10px 20px;
}

.type_toggle_bottom {
border-width: 1px 0px 1px 0px;
}

.type_toggle:checked {
background: @qubes-blue;
color: white;
background: @blue-bg;
}


Expand All @@ -53,6 +46,18 @@ radiobutton:checked radio {
color: @text-color;
}

.flat_button:disabled {
background: @dark-gray;
}

.invalid_entry {
border-color: red;
}

.invalid_entry:focus {
box-shadow: none;
}

#applications {
background: @top-background;
margin-top: 10px;
Expand All @@ -66,14 +71,20 @@ radiobutton:checked radio {

.content_box {
background: @top-background-2;
border-width: 2px;
border-width: 0px 0px 0px 1px;
border-color: @background-frame;
padding-left: 100px;
padding-right: 100px;
box-shadow: @background-frame 2px -2px 2px -2px inset;
padding-top: 50px;
border-style: solid;
padding-left: 30px;
padding-right: 30px;
padding-top: 30px;
box-shadow: none;
padding-bottom: 50px;
}

#main_window {
background: @bottom-background;
}

.explanation {
font-size: 90%;
}
62 changes: 40 additions & 22 deletions qubes_config/tests/test.glade
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkWindow">
Expand Down Expand Up @@ -106,9 +106,45 @@
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkListBox" id="policytest_main_list">
<object class="GtkBox" id="policytest_custom_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkListBox" id="policytest_main_list">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkListBox" id="policytest_exception_list">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="policytest_add_rule_button">
<property name="label" translatable="yes">button</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
Expand All @@ -117,28 +153,10 @@
</packing>
</child>
<child>
<object class="GtkListBox" id="policytest_exception_list">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="policytest_add_rule_button">
<property name="label" translatable="yes">button</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="policytest_raw_event">
Expand Down
6 changes: 3 additions & 3 deletions qui/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def __init__(self, wm, qapp, dispatcher, **properties):
self.dispatcher = dispatcher

self.icon = Gtk.StatusIcon()
self.icon.set_from_icon_name("edit-copy")
self.icon.set_from_icon_name("qui-clipboard")
self.icon.set_tooltip_markup(
_(
"<b>Global Clipboard</b>\nInformation about the current"
Expand Down Expand Up @@ -350,7 +350,7 @@ def update_clipboard_contents(
self.clipboard_label.set_markup(
_("<i>Global clipboard is empty</i>")
)
self.icon.set_from_icon_name("edit-copy")
self.icon.set_from_icon_name("qui-clipboard")
# todo the icon should be empty and full depending on state

else:
Expand All @@ -359,7 +359,7 @@ def update_clipboard_contents(
"<i>Global clipboard contents: {0} from <b>{1}</b></i>"
).format(size, vm)
)
self.icon.set_from_icon_name("edit-copy")
self.icon.set_from_icon_name("qui-clipboard")

if message:
self.send_notify(message, icon=icon)
Expand Down
16 changes: 12 additions & 4 deletions qui/styles/qubes-colors-dark.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
@define-color qubes-blue #4180c9;
@define-color dark-blue #4488df;
@define-color blue-100 #dbeafe;

@define-color dark-gray-2 #858585;
@define-color dark-gray #cdcdcd;
@define-color medium-gray #979797;
@define-color medium-gray-2 #e7e7e7;
@define-color light-gray #f2f2f2;
@define-color medium-gray-2 #e5e7eb;
@define-color light-gray #f2f4f6;

@define-color top-background #181818;
@define-color top-background-2 #292929;
Expand All @@ -16,9 +17,14 @@
@define-color soft-text-color #e7e7e7;
@define-color misc-text-color #f2f2f2;

@define-color problem-background #614942;
@define-color problem-background #991b1b;
@define-color problem-frame #dc2626;

@define-color info-background #6e5f54;
@define-color info-background #a16207;
@define-color info-frame #a16207;
@define-color link-color #1d4ed8;

@define-color add-button #9ca3af;

@define-color text-color #ffffff;
@define-color dark-text-color #000000;
Expand All @@ -42,3 +48,5 @@
@define-color purple-label #911eb4;
@define-color black-label #ffffff;
@define-color custom-label #ffffff;

@define-color blue-bg #1d4ed8;
20 changes: 14 additions & 6 deletions qui/styles/qubes-colors-light.css
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
@define-color qubes-blue #4180c9;
@define-color dark-blue #4488df;
@define-color blue-100 #dbeafe;

@define-color dark-gray-2 #858585;
@define-color dark-gray #cdcdcd;
@define-color medium-gray #979797;
@define-color medium-gray-2 #e7e7e7;
@define-color light-gray #f2f2f2;
@define-color medium-gray-2 #e5e7eb;
@define-color light-gray #f3f4f6;

@define-color top-background #ffffff;
@define-color top-background-2 #f2f2f2;
@define-color top-background #f3f4f6;
@define-color top-background-2 #f9fafb;
@define-color bottom-background #858585;
@define-color background-frame #979797;
@define-color button-color #f2f2f2;
@define-color separator-color #cdcdcd;
@define-color soft-text-color #858585;
@define-color misc-text-color #979797;

@define-color problem-background #fce9e3;
@define-color problem-background #fecaca;
@define-color problem-frame #b91c1c;

@define-color info-background #f0e9e3;
@define-color info-background #fef3c7;
@define-color info-frame #a16207;
@define-color link-color #2563eb;

@define-color add-button #f3f4f6;

@define-color text-color #000000;
@define-color dark-text-color #000000;
Expand All @@ -42,3 +48,5 @@
@define-color purple-label #3F0C46;
@define-color black-label #000000;
@define-color custom-label #000000;

@define-color blue-bg #bfdbfe;
12 changes: 9 additions & 3 deletions qui/styles/qubes-widgets-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,22 @@ label {
}

.group_title {
font-weight: 400;
font-weight: 600;
font-size: 150%;
margin-top: 20px;
}

.explanation {
margin-bottom: 10px;
margin-left: 5px;
font-size: 90%;
font-size: 100%;
}

.main_text {
font-weight: 500;
font-size: 110%;
}

checkbutton check {
min-width: 20px;
min-height: 20px;
Expand Down Expand Up @@ -136,7 +142,7 @@ radiobutton radio {
}

.background {
background: @bottom-background;
background: @top-background-2;
}

.invisible_button {
Expand Down
4 changes: 2 additions & 2 deletions qui/tray/disk_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def refresh_icon(self):

def set_icon_state(self, pool_warning=None, vm_warning=None):
if pool_warning or vm_warning:
self.icon.set_from_icon_name("dialog-warning")
self.icon.set_from_icon_name("qui-disk-space-warn")
text = _("<b>Qubes Disk Space Monitor</b>\n\nWARNING!")
if pool_warning:
text += _("\nYou are running out of disk space.\n") + "".join(
Expand All @@ -432,7 +432,7 @@ def set_icon_state(self, pool_warning=None, vm_warning=None):
) + ", ".join([x.vm.name for x in vm_warning])
self.icon.set_tooltip_markup(text)
else:
self.icon.set_from_icon_name("drive-harddisk")
self.icon.set_from_icon_name("qui-disk-space")
self.icon.set_tooltip_markup(
_("<b>Qubes Disk Space Monitor</b>\nView free disk space.")
)
Expand Down
48 changes: 27 additions & 21 deletions qui/tray/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
class IconCache:
def __init__(self):
self.icon_files = {
"pause": "media-playback-pause",
"terminal": "utilities-terminal",
"preferences": "preferences-system",
"kill": "media-record",
"shutdown": "media-playback-stop",
"unpause": "media-playback-start",
"files": "system-file-manager",
"restart": "edit-redo",
"pause": "qubes-vm-pause",
"terminal": "qubes-terminal",
"preferences": "qubes-vm-settings",
"kill": "qubes-vm-kill",
"shutdown": "qubes-vm-shutdown",
"unpause": "qubes-vm-unpause",
"files": "qubes-files",
"restart": "qubes-vm-restart",
}
self.icons = {}

Expand Down Expand Up @@ -502,19 +502,14 @@ def __init__(self, vm, app, icon_cache, state=None):
self.decorator = qui.decorators.DomainDecorator(vm)

# Main horizontal box
hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
self.hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)

# Icon box with fixed width
iconbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
iconbox.set_size_request(16, 0)
icon = self.decorator.icon()
if icon:
iconbox.pack_start(icon, False, True, 0)
else:
placeholder = Gtk.Label()
iconbox.pack_start(placeholder, False, True, 0)
self.iconbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
self.iconbox.set_size_request(16, 0)
self.set_label_icon()

hbox.pack_start(iconbox, False, True, 6)
self.hbox.pack_start(self.iconbox, False, True, 6)

# Name box
namebox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
Expand All @@ -523,7 +518,7 @@ def __init__(self, vm, app, icon_cache, state=None):
self.spinner = Gtk.Spinner()
namebox.pack_start(self.spinner, False, True, 0)

hbox.pack_start(namebox, True, True, 0)
self.hbox.pack_start(namebox, True, True, 0)

# Memory and CPU box
mem_cpu_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
Expand All @@ -532,10 +527,10 @@ def __init__(self, vm, app, icon_cache, state=None):
self.cpu = self.decorator.cpu()
mem_cpu_box.pack_start(self.cpu, False, True, 0)

hbox.pack_start(mem_cpu_box, False, True, 0)
self.hbox.pack_start(mem_cpu_box, False, True, 0)

# Add hbox to the menu item
self.add(hbox)
self.add(self.hbox)

if self.vm is None: # if header
self.set_reserve_indicator(True) # align with submenu triangles
Expand Down Expand Up @@ -618,6 +613,17 @@ def update_stats(self, memory_kb, cpu_usage):
self.memory.update_state(int(memory_kb))
self.cpu.update_state(int(cpu_usage))

def set_label_icon(self):
for child in self.iconbox.get_children():
self.iconbox.remove(child)
icon = self.decorator.icon()
if icon:
self.iconbox.pack_start(icon, False, True, 0)
icon.show()
else:
placeholder = Gtk.Label()
self.iconbox.pack_start(placeholder, False, True, 0)


class DomainTray(Gtk.Application):
"""A tray icon application listing all but halted domains. ”"""
Expand Down
2 changes: 1 addition & 1 deletion qui/tray/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self, app_name, qapp, dispatcher):
self.register() # register Gtk Application

self.widget_icon = Gtk.StatusIcon()
self.widget_icon.set_from_icon_name("software-update-available")
self.widget_icon.set_from_icon_name("qui-updates")
self.widget_icon.set_visible(False)
self.widget_icon.connect("button-press-event", self.show_menu)
self.widget_icon.set_tooltip_markup(
Expand Down
26 changes: 13 additions & 13 deletions qui/updater.glade
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="tooltip-text" translatable="yes">Click here or press Ctrl+A to toggle selection</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<property name="tooltip-text" translatable="yes">Click here or press Ctrl+A to toggle selection</property>
<accelerator key="a" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
</object>
<object class="GtkListStore" id="list_store">
Expand Down Expand Up @@ -66,8 +66,8 @@
<property name="hexpand">True</property>
<property name="vexpand">False</property>
<property name="title" translatable="yes">Qubes OS Update</property>
<property name="icon-name">qubes-manager</property>
<property name="window-position">center</property>
<property name="icon-name">qubes-manager</property>
<child>
<!-- n-columns=1 n-rows=3 -->
<object class="GtkGrid">
Expand Down Expand Up @@ -684,17 +684,18 @@ Selected qubes will be automatically started if necessary and shutdown after suc
<property name="spacing">30</property>
<property name="baseline-position">bottom</property>
<child>
<object class="GtkButton" id="button_cancel">
<property name="label" translatable="yes">_Cancel</property>
<object class="GtkButton" id="button_next">
<property name="label" translatable="yes">_Update</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="receives-default">True</property>
<property name="valign">end</property>
<property name="use-underline">True</property>
<style>
<class name="button_text"/>
<class name="button_common"/>
<class name="ok_button"/>
<class name="button_highlighted"/>
<class name="bottom_button"/>
<class name="flat"/>
</style>
</object>
<packing>
Expand All @@ -704,18 +705,17 @@ Selected qubes will be automatically started if necessary and shutdown after suc
</packing>
</child>
<child>
<object class="GtkButton" id="button_next">
<property name="label" translatable="yes">_Update</property>
<object class="GtkButton" id="button_cancel">
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="receives-default">False</property>
<property name="valign">end</property>
<property name="use-underline">True</property>
<style>
<class name="ok_button"/>
<class name="button_highlighted"/>
<class name="button_text"/>
<class name="button_common"/>
<class name="bottom_button"/>
<class name="flat"/>
</style>
</object>
<packing>
Expand Down
2 changes: 1 addition & 1 deletion qui/updater/progress_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def do_render(self, context, widget, background_area, cell_area, flags):
elif status == UpdateStatus.NoUpdatesFound:
self.draw_icon("qubes-check-maybe", context, cell_area)
elif status in (UpdateStatus.Error, UpdateStatus.Cancelled):
self.draw_icon("qubes-delete-x", context, cell_area)
self.draw_icon("check_no", context, cell_area)
elif status == UpdateStatus.ProgressUnknown:
Gtk.CellRendererProgress.do_render(
self, context, widget, background_area, cell_area, flags
Expand Down
23 changes: 22 additions & 1 deletion rpm_spec/qubes-desktop-linux-manager.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ gtk-update-icon-cache %{_datadir}/icons/Adwaita &>/dev/null || :
/usr/share/icons/hicolor/scalable/apps/help-light.svg
/usr/share/icons/hicolor/scalable/apps/key-dark.svg
/usr/share/icons/hicolor/scalable/apps/key-light.svg
/usr/share/icons/hicolor/scalable/apps/laptop-dark.svg
/usr/share/icons/hicolor/scalable/apps/laptop-light.svg
/usr/share/icons/hicolor/scalable/apps/mic-dark.svg
/usr/share/icons/hicolor/scalable/apps/mic-light.svg
/usr/share/icons/hicolor/scalable/apps/mouse-dark.svg
Expand All @@ -276,21 +278,40 @@ gtk-update-icon-cache %{_datadir}/icons/Adwaita &>/dev/null || :
/usr/share/icons/hicolor/scalable/apps/qubes-expander-shown-black.svg
/usr/share/icons/hicolor/scalable/apps/qubes-expander-shown-white.svg
/usr/share/icons/hicolor/scalable/apps/qubes-global-config.svg
/usr/share/icons/hicolor/scalable/apps/qubes-files.svg
/usr/share/icons/hicolor/scalable/apps/qubes-terminal.svg
/usr/share/icons/hicolor/scalable/apps/qubes-vm-pause.svg
/usr/share/icons/hicolor/scalable/apps/qubes-vm-shutdown.svg
/usr/share/icons/hicolor/scalable/apps/qubes-vm-restart.svg
/usr/share/icons/hicolor/scalable/apps/qubes-vm-unpause.svg
/usr/share/icons/hicolor/scalable/apps/qubes-vm-kill.svg
/usr/share/icons/hicolor/scalable/apps/qubes-info.svg
/usr/share/icons/hicolor/scalable/apps/qubes-key.svg
/usr/share/icons/hicolor/scalable/apps/qubes-logo.svg
/usr/share/icons/hicolor/scalable/apps/qubes-new-qube.svg
/usr/share/icons/hicolor/scalable/apps/qubes-ok.svg
/usr/share/icons/hicolor/scalable/apps/qubes-padlock.svg
/usr/share/icons/hicolor/scalable/apps/qubes-policy-editor.svg
/usr/share/icons/hicolor/scalable/apps/qubes-question-light.svg
/usr/share/icons/hicolor/scalable/apps/qubes-question.svg
/usr/share/icons/hicolor/scalable/apps/qubes-this-device.svg
/usr/share/icons/hicolor/scalable/apps/qui-clipboard.svg
/usr/share/icons/hicolor/scalable/apps/qui-clipboard-light.svg
/usr/share/icons/hicolor/scalable/apps/qui-clipboard-dark.svg
/usr/share/icons/hicolor/scalable/apps/qui-domains-scalable.svg
/usr/share/icons/hicolor/scalable/apps/qui-disk-space.svg
/usr/share/icons/hicolor/scalable/apps/qui-disk-space-warn.svg
/usr/share/icons/hicolor/scalable/apps/qui-updates.svg
/usr/share/icons/hicolor/scalable/apps/qui-updates-dark.svg
/usr/share/icons/hicolor/scalable/apps/qui-updates-light.svg
/usr/share/icons/hicolor/scalable/apps/settings-dark.svg
/usr/share/icons/hicolor/scalable/apps/settings-light.svg
/usr/share/icons/hicolor/scalable/apps/smartphone-dark.svg
/usr/share/icons/hicolor/scalable/apps/smartphone-light.svg
/usr/share/icons/hicolor/scalable/apps/qubes-add.svg
/usr/share/icons/hicolor/scalable/apps/url-dark.svg
/usr/share/icons/hicolor/scalable/apps/url-light.svg
/usr/share/icons/hicolor/scalable/apps/usb-dark.svg
/usr/share/icons/hicolor/scalable/apps/usb-light.svg

/usr/share/gtksourceview-4/language-specs/qubes-rpc.lang

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.8
4.3.9