summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-26 17:39:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-26 20:56:36 +0100
commitb9039e511ed103814dd3c2987c2e408aebb58058 (patch)
tree11832642de2177c2a41a3fb0c22e039b5868d829
parent47a863f09d1c1273dc0c00cc03719d322b00ddd4 (diff)
ensure no 'angle' is used in a GtkLabel
Change-Id: Id6231774fb1a8d12e771815023e661d5e0ac06a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129004 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rwxr-xr-xbin/ui-rules-enforcer.py16
-rw-r--r--chart2/uiconfig/ui/sidebartype.ui1
-rw-r--r--chart2/uiconfig/ui/tp_ChartType.ui1
3 files changed, 16 insertions, 2 deletions
diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index 6fec6293244e..5079d8e67ce1 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -294,6 +294,21 @@ def remove_label_pad(current):
if ypad != None:
current.remove(ypad)
+def remove_label_angle(current):
+ angle = None
+ islabel = current.get('class') == "GtkLabel"
+ for child in current:
+ remove_label_angle(child)
+ if not islabel:
+ continue
+ if child.tag == "property":
+ attributes = child.attrib
+ if attributes.get("name") == "angle":
+ angle = child
+
+ if angle != None:
+ current.remove(angle)
+
def remove_track_visited_links(current):
track_visited_links = None
islabel = current.get('class') == "GtkLabel"
@@ -576,6 +591,7 @@ remove_spin_button_input_purpose(root)
remove_spin_button_max_length(root)
remove_track_visited_links(root)
remove_label_pad(root)
+remove_label_angle(root)
remove_expander_label_fill(root)
remove_expander_spacing(root)
enforce_menubutton_indicator_consistency(root)
diff --git a/chart2/uiconfig/ui/sidebartype.ui b/chart2/uiconfig/ui/sidebartype.ui
index ae410375d1c0..686feacea397 100644
--- a/chart2/uiconfig/ui/sidebartype.ui
+++ b/chart2/uiconfig/ui/sidebartype.ui
@@ -126,7 +126,6 @@
<property name="label" translatable="yes" context="sidebartype|shapeft">Sh_ape</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">shape</property>
- <property name="angle">0.02</property>
<property name="xalign">0</property>
</object>
<packing>
diff --git a/chart2/uiconfig/ui/tp_ChartType.ui b/chart2/uiconfig/ui/tp_ChartType.ui
index a7cafb14e71b..68decb08f0d7 100644
--- a/chart2/uiconfig/ui/tp_ChartType.ui
+++ b/chart2/uiconfig/ui/tp_ChartType.ui
@@ -173,7 +173,6 @@
<property name="label" translatable="yes" context="tp_ChartType|shapeft">Sh_ape</property>
<property name="use-underline">True</property>
<property name="mnemonic-widget">shape</property>
- <property name="angle">0.02</property>
<property name="xalign">0</property>
</object>
<packing>