diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-17 11:50:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-17 16:26:33 +0200 |
commit | 1442ab9c7d57de2242ff1a690c4fa7bcb3c1f757 (patch) | |
tree | 79b06bf1e6a6cbe38b20d11dc6b378cdb850f518 /bin/ui-rules-enforcer.py | |
parent | 9ef167c38495a67639366357833041b33be3f978 (diff) |
remove 'relief' from CheckButtons
Change-Id: I8a17c36489946327113e63f80b952525ae4201a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117377
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'bin/ui-rules-enforcer.py')
-rwxr-xr-x | bin/ui-rules-enforcer.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py index 644f8d0ba431..f2da99524737 100755 --- a/bin/ui-rules-enforcer.py +++ b/bin/ui-rules-enforcer.py @@ -192,6 +192,22 @@ def remove_check_button_align(current): raise Exception(sys.argv[1] + ': non-default yalign', yalign.text) current.remove(yalign) +def remove_check_button_relief(current): + relief = None + ischeckorradiobutton = current.get('class') == "GtkCheckButton" or current.get('class') == "GtkRadioButton" + for child in current: + remove_check_button_relief(child) + if not ischeckorradiobutton: + continue + if child.tag == "property": + attributes = child.attrib + if attributes.get("name") == "relief": + relief = child + + if ischeckorradiobutton: + if relief != None: + current.remove(relief) + def remove_spin_button_input_purpose(current): input_purpose = None isspinbutton = current.get('class') == "GtkSpinButton" @@ -348,6 +364,7 @@ if not sys.argv[1].endswith('/multiline.ui'): # let this one alone not truncate replace_button_use_stock(root) replace_image_stock(root) remove_check_button_align(root) +remove_check_button_relief(root) remove_spin_button_input_purpose(root) remove_track_visited_links(root) remove_expander_label_fill(root) |