diff --git a/icons/scalable/laptop-dark.svg b/icons/scalable/laptop-dark.svg new file mode 100755 index 0000000..042d55d --- /dev/null +++ b/icons/scalable/laptop-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/scalable/laptop-light.svg b/icons/scalable/laptop-light.svg new file mode 100755 index 0000000..ea4779a --- /dev/null +++ b/icons/scalable/laptop-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/scalable/qubes-delete.svg b/icons/scalable/qubes-delete.svg index d7fe9d5..07fc8e7 100644 --- a/icons/scalable/qubes-delete.svg +++ b/icons/scalable/qubes-delete.svg @@ -1,7 +1,7 @@ - - - - - + + + + + diff --git a/icons/scalable/qubes-devices.svg b/icons/scalable/qubes-devices.svg index c1964c9..c3a829e 100644 --- a/icons/scalable/qubes-devices.svg +++ b/icons/scalable/qubes-devices.svg @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/icons/scalable/qui-clipboard-dark.svg b/icons/scalable/qui-clipboard-dark.svg new file mode 100755 index 0000000..0869d49 --- /dev/null +++ b/icons/scalable/qui-clipboard-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/scalable/qui-clipboard-light.svg b/icons/scalable/qui-clipboard-light.svg new file mode 100755 index 0000000..f132747 --- /dev/null +++ b/icons/scalable/qui-clipboard-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/scalable/qui-updates-dark.svg b/icons/scalable/qui-updates-dark.svg new file mode 100755 index 0000000..246cce8 --- /dev/null +++ b/icons/scalable/qui-updates-dark.svg @@ -0,0 +1,48 @@ + + + + diff --git a/icons/scalable/qui-updates-light.svg b/icons/scalable/qui-updates-light.svg new file mode 100755 index 0000000..c3de387 --- /dev/null +++ b/icons/scalable/qui-updates-light.svg @@ -0,0 +1,48 @@ + + + + diff --git a/icons/scalable/url-dark.svg b/icons/scalable/url-dark.svg new file mode 100755 index 0000000..efe7567 --- /dev/null +++ b/icons/scalable/url-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/scalable/url-light.svg b/icons/scalable/url-light.svg new file mode 100755 index 0000000..4caabac --- /dev/null +++ b/icons/scalable/url-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/scalable/usb-dark.svg b/icons/scalable/usb-dark.svg new file mode 100644 index 0000000..1c64ce1 --- /dev/null +++ b/icons/scalable/usb-dark.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/icons/scalable/usb-light.svg b/icons/scalable/usb-light.svg new file mode 100644 index 0000000..ff5ca31 --- /dev/null +++ b/icons/scalable/usb-light.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/qubes_config/global_config.glade b/qubes_config/global_config.glade index 8fb8ece..1006934 100644 --- a/qubes_config/global_config.glade +++ b/qubes_config/global_config.glade @@ -839,14 +839,36 @@ - + True False - General Settings - 0 - + + + True + False + settings-dark + + + False + True + 0 + + + + + True + False + General + + + + False + True + 1 + + False @@ -2223,14 +2245,36 @@ - + True False - USB Devices - 0 - + + + True + False + usb-dark + + + False + True + 0 + + + + + True + False + USB Devices + + + + False + True + 1 + + 1 @@ -3662,14 +3706,36 @@ - + True False - Updates - 0 - + + + True + False + usb-dark + + + False + True + 0 + + + + + True + False + Updates + + + + False + True + 1 + + 2 @@ -4468,14 +4534,36 @@ - + True False - Split GPG - 0 - + + + True + False + usb-dark + + + False + True + 0 + + + + + True + False + Split GPG + + + + False + True + 1 + + 3 @@ -5227,14 +5315,36 @@ Inter-qube copy and paste actions are performed via special keyboard shortcuts, - + True False - Clipboard - 0 - + + + True + False + usb-dark + + + False + True + 0 + + + + + True + False + Clipboard + + + + False + True + 1 + + 4 @@ -6381,14 +6491,36 @@ Inter-qube copy and paste actions are performed via special keyboard shortcuts, - + True False - File Access - 0 - + + + True + False + usb-dark + + + False + True + 0 + + + + + True + False + File Access + + + + False + True + 1 + + 5 @@ -6936,14 +7068,36 @@ Inter-qube copy and paste actions are performed via special keyboard shortcuts, - + True False - URL Handling - 0 - + + + True + False + usb-dark + + + False + True + 0 + + + + + True + False + URL Handling + + + + False + True + 1 + + 6 @@ -7418,14 +7572,36 @@ to global clipboard - + True False - This Device - 0 - + + + True + False + usb-dark + + + False + True + 0 + + + + + True + False + This Device + + + + False + True + 1 + + 7 @@ -7433,14 +7609,13 @@ to global clipboard - + logo_grid True False - center + start center - 10 10 30 10 @@ -7448,14 +7623,14 @@ to global clipboard 0 0 - 2 @@ -7463,36 +7638,16 @@ to global clipboard True False center - Qubes OS + 10 + Global Config center - - 0 - 1 - 2 - - - - - False - Release notes - - - 0 - 2 - - - - - False - Version information - 1 - 2 + 0 @@ -7511,7 +7666,7 @@ to global clipboard True False - center + end 20 20 20 @@ -7520,7 +7675,7 @@ to global clipboard True - _OK + _Apply Changes and Close True True True @@ -7538,16 +7693,16 @@ to global clipboard - - _Cancel + + _Apply Changes True True True True @@ -7557,22 +7712,22 @@ to global clipboard - - _Apply + + _Cancel True True True True False True - 3 + 2 diff --git a/qubes_config/global_config/global_config.py b/qubes_config/global_config/global_config.py index 192ce01..cf14529 100644 --- a/qubes_config/global_config/global_config.py +++ b/qubes_config/global_config/global_config.py @@ -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 @@ -298,9 +303,7 @@ def do_activate(self, *args, **kwargs): width = int(self.main_window.get_screen().get_width() * 0.9) else: # try to have at least 1100 pixels - width = min( - int(self.main_window.get_screen().get_width() * 0.9), 1100 - ) + width = min(int(self.main_window.get_screen().get_width() * 0.9), 1100) if ( self.main_window.get_allocated_height() > self.main_window.get_screen().get_height() * 0.9 @@ -380,16 +383,12 @@ def perform_setup(self): The function that performs actual widget realization and setup. """ self.builder = Gtk.Builder() - glade_ref = ( - importlib.resources.files("qubes_config") / "global_config.glade" - ) + glade_ref = importlib.resources.files("qubes_config") / "global_config.glade" with importlib.resources.as_file(glade_ref) as path: self.builder.add_from_file(str(path)) self.main_window: Gtk.Window = self.builder.get_object("main_window") - self.main_notebook: Gtk.Notebook = self.builder.get_object( - "main_notebook" - ) + self.main_notebook: Gtk.Notebook = self.builder.get_object("main_notebook") load_theme( widget=self.main_window, @@ -398,13 +397,13 @@ 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) self.apply_button: Gtk.Button = self.builder.get_object("apply_button") - self.cancel_button: Gtk.Button = self.builder.get_object( - "cancel_button" - ) + self.cancel_button: Gtk.Button = self.builder.get_object("cancel_button") self.ok_button: Gtk.Button = self.builder.get_object("ok_button") self.apply_button.connect("clicked", self._apply) @@ -536,6 +535,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() @@ -595,14 +614,10 @@ def _page_switched(self, *_args): def _ask_unsaved(self, description: str) -> Gtk.ResponseType: box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) label_1 = Gtk.Label() - label_1.set_markup( - _("The following unsaved changes were found:") - ) + label_1.set_markup(_("The following unsaved changes were found:")) label_1.set_xalign(0) label_2 = Gtk.Label() - label_2.set_text( - "\n".join([f"- {row}" for row in description.split("\n")]) - ) + label_2.set_text("\n".join([f"- {row}" for row in description.split("\n")])) label_2.set_margin_start(20) label_2.set_xalign(0) label_3 = Gtk.Label() diff --git a/qubes_config/new_qube.glade b/qubes_config/new_qube.glade index f9b071a..362a9d4 100644 --- a/qubes_config/new_qube.glade +++ b/qubes_config/new_qube.glade @@ -1,5 +1,5 @@ - + @@ -171,7 +171,7 @@ - _Close + _Close and save choice True True True @@ -217,8 +217,8 @@ False end - - _Cancel + + _Switch template True True True @@ -226,7 +226,7 @@ @@ -236,8 +236,8 @@ - - _OK + + _Cancel True True True @@ -245,7 +245,7 @@ @@ -308,7 +308,7 @@ True False - center + end center 20 20 @@ -319,7 +319,7 @@ True - C_reate + C_reate new qube True False True @@ -626,10 +626,12 @@ True False + vertical True False + start Do not clone @@ -639,19 +641,20 @@ - + True False - If you do not clone from an existing template, the resulting qube will be completely empty and you will need to install an operating system inside manually. - 0.5 - 0.6000000238418579 - 20 - qubes-question + start + If you do not clone from an existing template, the resulting qube will be completely empty and you will need to install an operating system inside manually. + True + 80 + False True - 3 1 @@ -756,10 +759,13 @@ True False + start + vertical True False + start Do not clone @@ -769,19 +775,20 @@ - + True False - If you do not clone from an existing template, the resulting qube will be completely empty and you will need to install an operating system inside manually. - 0.5 - 0.6000000238418579 - 20 - qubes-question + start + If you do not clone from an existing template, the resulting qube will be completely empty and you will need to install an operating system inside manually. + True + 80 + False True - 3 1 @@ -1146,6 +1153,9 @@ Choose applications available in the qube. This can be changed later in Qube Settings. True 0 + False @@ -1460,6 +1470,25 @@ True False + + + True + False + 0.5 + 0.6000000238418579 + 20 + appvm-blue + + + + False + True + 3 + 0 + + True @@ -1470,7 +1499,7 @@ False True - 0 + 1 @@ -1490,7 +1519,7 @@ False True 3 - 1 + 2 @@ -1517,6 +1546,25 @@ True False + + + True + False + 0.5 + 0.6000000238418579 + 20 + templatevm-blue + + + + False + True + 3 + 0 + + True @@ -1527,7 +1575,7 @@ False True - 0 + 1 @@ -1547,7 +1595,7 @@ False True 3 - 1 + 2 @@ -1574,6 +1622,25 @@ True False + + + True + False + 0.5 + 0.6000000238418579 + 20 + standalonevm-blue + + + + False + True + 3 + 0 + + True @@ -1584,7 +1651,7 @@ False True - 0 + 1 @@ -1604,7 +1671,7 @@ False True 3 - 1 + 2 @@ -1631,6 +1698,25 @@ True False + + + True + False + 0.5 + 0.6000000238418579 + 20 + dispvm-blue + + + + False + True + 3 + 0 + + True @@ -1641,7 +1727,7 @@ False True - 0 + 1 @@ -1661,7 +1747,7 @@ False True 3 - 1 + 2 diff --git a/qubes_config/qubes-global-config-base.css b/qubes_config/qubes-global-config-base.css index 8cf9fa3..a3c598c 100644 --- a/qubes_config/qubes-global-config-base.css +++ b/qubes_config/qubes-global-config-base.css @@ -16,26 +16,25 @@ separator { border-left: 0px; } -.qubes_version_label { - margin: 10px 0 10px 0; - color: @soft-text-color; - font-size: 120%; - font-weight: 700; +.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; } @@ -46,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 { diff --git a/qubes_config/qubes-new-qube-base.css b/qubes_config/qubes-new-qube-base.css index 96ffcce..177db7c 100644 --- a/qubes_config/qubes-new-qube-base.css +++ b/qubes_config/qubes-new-qube-base.css @@ -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; } @@ -66,14 +59,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%; +} diff --git a/qui/styles/qubes-colors-dark.css b/qui/styles/qubes-colors-dark.css index 9e35784..266977b 100644 --- a/qui/styles/qubes-colors-dark.css +++ b/qui/styles/qubes-colors-dark.css @@ -48,3 +48,5 @@ @define-color purple-label #911eb4; @define-color black-label #ffffff; @define-color custom-label #ffffff; + +@define-color blue-bg #1d4ed8; diff --git a/qui/styles/qubes-colors-light.css b/qui/styles/qubes-colors-light.css index 853fd6a..d6a870f 100644 --- a/qui/styles/qubes-colors-light.css +++ b/qui/styles/qubes-colors-light.css @@ -8,7 +8,7 @@ @define-color medium-gray-2 #e5e7eb; @define-color light-gray #f3f4f6; -@define-color top-background #ffffff; +@define-color top-background #f3f4f6; @define-color top-background-2 #f9fafb; @define-color bottom-background #858585; @define-color background-frame #979797; @@ -48,3 +48,5 @@ @define-color purple-label #3F0C46; @define-color black-label #000000; @define-color custom-label #000000; + +@define-color blue-bg #bfdbfe; diff --git a/qui/styles/qubes-widgets-base.css b/qui/styles/qubes-widgets-base.css index 66f98ab..d895b1a 100644 --- a/qui/styles/qubes-widgets-base.css +++ b/qui/styles/qubes-widgets-base.css @@ -142,7 +142,7 @@ radiobutton radio { } .background { - background: @bottom-background; + background: @top-background-2; } .invisible_button { diff --git a/qui/updater.glade b/qui/updater.glade index 4af54e0..6c456a0 100644 --- a/qui/updater.glade +++ b/qui/updater.glade @@ -7,9 +7,9 @@ True True False + Click here or press Ctrl+A to toggle selection True True - Click here or press Ctrl+A to toggle selection @@ -66,8 +66,8 @@ True False Qubes OS Update - qubes-manager center + qubes-manager @@ -684,17 +684,18 @@ Selected qubes will be automatically started if necessary and shutdown after suc 30 bottom - - _Cancel + + _Update True True - False + True end True @@ -704,18 +705,17 @@ Selected qubes will be automatically started if necessary and shutdown after suc - - _Update + + _Cancel True True - True + False end True diff --git a/rpm_spec/qubes-desktop-linux-manager.spec.in b/rpm_spec/qubes-desktop-linux-manager.spec.in index 7063e50..e3a41e3 100644 --- a/rpm_spec/qubes-desktop-linux-manager.spec.in +++ b/rpm_spec/qubes-desktop-linux-manager.spec.in @@ -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 @@ -293,15 +295,23 @@ gtk-update-icon-cache %{_datadir}/icons/Adwaita &>/dev/null || : /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