mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
parent
a7184f32bd
commit
a01b55f07b
@ -406,7 +406,7 @@ def _convert_label(label):
|
||||
"""
|
||||
Convert a label from 1.X to the new format
|
||||
"""
|
||||
style = qt_font_to_style(label["font"], label["color"])
|
||||
style = qt_font_to_style(label.get("font"), label["color"])
|
||||
return {
|
||||
"text": label["text"],
|
||||
"rotation": 0,
|
||||
|
@ -24,6 +24,8 @@ def qt_font_to_style(font, color):
|
||||
"""
|
||||
Convert a Qt font to CSS style
|
||||
"""
|
||||
if font is None:
|
||||
font = "TypeWriter,10,-1,5,75,0,0,0,0,0"
|
||||
font_info = font.split(",")
|
||||
style = "font-family: {};font-size: {};".format(font_info[0], font_info[1])
|
||||
if font_info[4] == "75":
|
||||
|
Loading…
Reference in New Issue
Block a user