From 367da7e6762806a4360b8d6285a54b841eea24f1 Mon Sep 17 00:00:00 2001 From: Viktor Govako Date: Fri, 5 Nov 2021 13:28:40 +0100 Subject: [PATCH] Added -x-me-min-text-priority hack. Signed-off-by: Viktor Govako --- src/libkomwm.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libkomwm.py b/src/libkomwm.py index c598b5f..c9af8d6 100644 --- a/src/libkomwm.py +++ b/src/libkomwm.py @@ -353,7 +353,7 @@ def komap_mapswithme(options): if has_fills and 'fill-color' in st and float(st.get('fill-opacity', 1)) > 0: dr_element.area.border.color = mwm_encode_color(colors, st, "casing") dr_element.area.border.width = st.get('casing-width', 0) * WIDTH_SCALE - + # Let's try without this additional line style overhead. Needed only for casing in road endings. # if st.get('casing-linecap', st.get('linecap', 'round')) != 'butt': # dr_line = LineRuleProto() @@ -462,10 +462,15 @@ def komap_mapswithme(options): else: dr_cur_subtext.is_optional = True has_text.pop() + if '-x-me-text-priority' in st: dr_text.priority = int(st.get('-x-me-text-priority')) else: dr_text.priority = min(19000, (base_z + int(st.get('z-index', 0)))) + if '-x-me-min-text-priority' in st: + min_priority = int(st.get('-x-me-min-text-priority')) + dr_text.priority = max(min_priority, dr_text.priority) + has_text = None if has_fills: