diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-02 15:48:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-02 18:42:10 +0200 |
commit | 6a8e7beef4f75e348536f971254fd4fd23c1806e (patch) | |
tree | 2df4121edd3c43f6992f40344bd8e7c1d2709e2e | |
parent | 64f7cda6e66de8e2e9af3c5f69fd13126681291c (diff) |
uniformly remove label-fill from GtkExpanders
Change-Id: Ife68cef7eeab0010c4d233c81e3bee808c2c1c28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116615
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rwxr-xr-x | bin/ui-rules-enforcer.py | 16 | ||||
-rw-r--r-- | sfx2/uiconfig/ui/panel.ui | 1 | ||||
-rw-r--r-- | svx/uiconfig/ui/findreplacedialog-mobile.ui | 1 | ||||
-rw-r--r-- | svx/uiconfig/ui/findreplacedialog.ui | 1 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 6 |
5 files changed, 16 insertions, 9 deletions
diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py index 5e46367112cf..dfffe79ce7cd 100755 --- a/bin/ui-rules-enforcer.py +++ b/bin/ui-rules-enforcer.py @@ -207,6 +207,21 @@ def remove_track_visited_links(current): if track_visited_links != None: current.remove(track_visited_links) +def remove_label_fill(current): + label_fill = None + isexpander = current.get('class') == "GtkExpander" + for child in current: + remove_label_fill(child) + if not isexpander: + continue + if child.tag == "property": + attributes = child.attrib + if attributes.get("name") == "label_fill" or attributes.get("name") == "label-fill": + label_fill = child + + if label_fill != None: + current.remove(label_fill) + with open(sys.argv[1], encoding="utf-8") as f: header = f.readline() f.seek(0) @@ -228,6 +243,7 @@ replace_button_use_stock(root) replace_image_stock(root) remove_check_button_align(root) remove_track_visited_links(root) +remove_label_fill(root) with open(sys.argv[1], 'wb') as o: # without encoding='unicode' (and the matching encode("utf8")) we get &#XXXX replacements for non-ascii characters diff --git a/sfx2/uiconfig/ui/panel.ui b/sfx2/uiconfig/ui/panel.ui index b2c5f9258fec..b6995f386bbd 100644 --- a/sfx2/uiconfig/ui/panel.ui +++ b/sfx2/uiconfig/ui/panel.ui @@ -31,7 +31,6 @@ <property name="can-focus">True</property> <property name="valign">center</property> <property name="hexpand">True</property> - <property name="label-fill">True</property> <child> <object class="GtkBox"> <property name="visible">True</property> diff --git a/svx/uiconfig/ui/findreplacedialog-mobile.ui b/svx/uiconfig/ui/findreplacedialog-mobile.ui index bee7cdb3b03e..7fb77726c691 100644 --- a/svx/uiconfig/ui/findreplacedialog-mobile.ui +++ b/svx/uiconfig/ui/findreplacedialog-mobile.ui @@ -626,7 +626,6 @@ <property name="margin_top">1</property> <property name="margin_bottom">1</property> <property name="hexpand">True</property> - <property name="label_fill">True</property> <property name="resize_toplevel">True</property> <child> <object class="GtkBox" id="box2"> diff --git a/svx/uiconfig/ui/findreplacedialog.ui b/svx/uiconfig/ui/findreplacedialog.ui index cfba469f6a88..6d8b4e170e38 100644 --- a/svx/uiconfig/ui/findreplacedialog.ui +++ b/svx/uiconfig/ui/findreplacedialog.ui @@ -680,7 +680,6 @@ <property name="margin_top">1</property> <property name="margin_bottom">1</property> <property name="hexpand">True</property> - <property name="label_fill">True</property> <property name="resize_toplevel">True</property> <child> <object class="GtkBox" id="box2"> diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index bcbbfa473e1b..083b076a3926 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -20989,12 +20989,6 @@ ConvertResult Convert3To4(const Reference<css::xml::dom::XNode>& xNode) xRemoveList.push_back(xChild); } - if (sName == "label-fill") - { - if (GetParentObjectType(xChild) == "GtkExpander") - xRemoveList.push_back(xChild); - } - // remove 'Help' button label and replace with a help icon instead if (sName == "label" && GetParentObjectType(xChild) == "GtkButton") { |