remove adw gtk3 warnings

This commit is contained in:
0xMRTT 2022-08-10 17:51:24 +02:00
parent 803de5ea6c
commit c2354dd927
No known key found for this signature in database
GPG key ID: AC9E06BF3DECB6FB
2 changed files with 1 additions and 29 deletions

View file

@ -36,27 +36,15 @@ class AdwcustomizerOption(Adw.ActionRow):
text_value = Gtk.Template.Child("text-value")
value_stack = Gtk.Template.Child("value-stack")
text_value_toggle = Gtk.Template.Child("text-value-toggle")
warning_button = Gtk.Template.Child("warning-button")
warning_label = Gtk.Template.Child("warning-label")
explanation_button = Gtk.Template.Child("explanation-button")
explanation_label = Gtk.Template.Child("explanation-label")
def __init__(self, name, title, adw_gtk3_support, explanation, **kwargs):
def __init__(self, name, title, explanation, **kwargs):
super().__init__(**kwargs)
self.set_name(name)
self.set_title(title)
self.set_subtitle("@" + name)
if adw_gtk3_support == "yes":
self.warning_button.set_visible(False)
elif adw_gtk3_support == "partial":
self.warning_button.add_css_class("warning")
self.warning_label.set_label(_("This option is only partially supported by the adw-gtk3 theme."))
elif adw_gtk3_support == "no":
self.warning_button.add_css_class("error")
self.warning_label.set_label(_("This option is not supported by the adw-gtk3 theme."))
self.explanation_label.set_label(explanation or "")
if explanation is None:
self.explanation_button.set_visible(False)

View file

@ -2,14 +2,6 @@ using Gtk 4.0;
using Adw 1;
template AdwcustomizerOption : Adw.ActionRow {
[suffix]
MenuButton warning-button {
valign: center;
icon-name: "adw-gtk3-warning-symbolic";
popover: warning-popover;
tooltip-text: _("GTK 3 Support Warning");
}
[suffix]
MenuButton explanation-button {
valign: center;
@ -46,14 +38,6 @@ template AdwcustomizerOption : Adw.ActionRow {
}
}
Popover warning-popover {
Label warning-label {
max-width-chars: 50;
wrap: true;
justify: center;
}
}
Popover explanation-popover {
Label explanation-label {
max-width-chars: 50;