From 0a5b51de6ec62a46f57c718b050cff456cfbc41a Mon Sep 17 00:00:00 2001 From: DYefremov Date: Fri, 10 Apr 2020 23:09:17 +0300 Subject: [PATCH] style changes for some ui elements --- app/ui/main_app_window.py | 2 +- app/ui/main_window.glade | 2 - app/ui/style.css | 85 ++++++++++++++++++++++++++++++++++++++- app/ui/telnet.glade | 1 + app/ui/telnet.py | 5 +-- 5 files changed, 88 insertions(+), 7 deletions(-) diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 6cd9ce7d..7d34e661 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -1635,7 +1635,7 @@ class Application(Gtk.Application): self.update_fav_num_column(self._fav_model) @run_idle - def on_iptv_list_configuration(self, action, value): + def on_iptv_list_configuration(self, action, value=None): if self._s_type is SettingsType.NEUTRINO_MP: self.show_error_dialog("Neutrino at the moment not supported!") return diff --git a/app/ui/main_window.glade b/app/ui/main_window.glade index 60ca3a2c..f47faf3b 100644 --- a/app/ui/main_window.glade +++ b/app/ui/main_window.glade @@ -1211,7 +1211,6 @@ Author: Dmitriy Yefremov 1 - 32 True True gtk-find @@ -1304,7 +1303,6 @@ Author: Dmitriy Yefremov - 32 True True gtk-spell-check diff --git a/app/ui/style.css b/app/ui/style.css index 7028d92a..7297cb33 100644 --- a/app/ui/style.css +++ b/app/ui/style.css @@ -1,8 +1,91 @@ #digit-entry { - border-color: Red; + border-color: Red; } #status-bar-button { padding: 1px; margin: 1px; } + +#textview-large { + font-size: 14px; +} + +* { + -GtkDialog-action-area-border: 5; +} + +entry { + min-height: 24px; +} + +button { + min-height: 20px; + padding-top: 1px; + padding-bottom: 1px; +} + +button.image-button { + min-height: 24px; + padding-left: 2px; + padding-right: 2px; +} + +button.text-button.image-button { + min-height: 24px; + padding-left: 2px; + padding-right: 2px; +} + +spinbutton { + min-height: 20px; +} + +toolbutton { + padding: 2px; +} + +spinner { + padding-left: 10px; + padding-right: 10px; +} + +headerbar { + min-height: 34px; + padding-top: 1px; + padding-left: 5px; + padding-right: 5px; + padding-bottom: 1px; +} + +headerbar button { + min-height: 24px; + min-width: 24px; + padding-left: 2px; + padding-right: 2px; +} + +box button { + padding-left: 4px; + padding-right: 4px; +} + +infobar { + min-height: 24px; +} + +infobar button { + min-height: 16px; + min-width: 16px; + padding-left: 2px; + padding-right: 2px; +} + +switch { + border-radius: 50px; +} + +switch slider { + min-height: 18px; + min-width: 18px; +} diff --git a/app/ui/telnet.glade b/app/ui/telnet.glade index a38edcca..60f051f4 100755 --- a/app/ui/telnet.glade +++ b/app/ui/telnet.glade @@ -69,6 +69,7 @@ Author: Dmitriy Yefremov in + textview-large True True char diff --git a/app/ui/telnet.py b/app/ui/telnet.py index 99dc3bc6..a6a1b307 100755 --- a/app/ui/telnet.py +++ b/app/ui/telnet.py @@ -68,10 +68,9 @@ class TelnetDialog: self._end_tag = builder.get_object("end_tag") self._connect_button = builder.get_object("connect_button") self._connect_button.bind_property("visible", builder.get_object("disconnect_button"), "visible", 4) - # Font style provider = Gtk.CssProvider() - provider.load_from_data(b"textview {font-size: 14px;}") - self._text_view.get_style_context().add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_USER) + provider.load_from_path(UI_RESOURCES_PATH + "style.css") + builder.get_object("main_box").get_style_context().add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_USER) window_size = settings.get("telnet_dialog_window_size") if window_size: