mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-26 16:58:28 +00:00
parent
a7184f32bd
commit
a01b55f07b
@ -406,7 +406,7 @@ def _convert_label(label):
|
|||||||
"""
|
"""
|
||||||
Convert a label from 1.X to the new format
|
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 {
|
return {
|
||||||
"text": label["text"],
|
"text": label["text"],
|
||||||
"rotation": 0,
|
"rotation": 0,
|
||||||
|
@ -24,6 +24,8 @@ def qt_font_to_style(font, color):
|
|||||||
"""
|
"""
|
||||||
Convert a Qt font to CSS style
|
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(",")
|
font_info = font.split(",")
|
||||||
style = "font-family: {};font-size: {};".format(font_info[0], font_info[1])
|
style = "font-family: {};font-size: {};".format(font_info[0], font_info[1])
|
||||||
if font_info[4] == "75":
|
if font_info[4] == "75":
|
||||||
|
Loading…
Reference in New Issue
Block a user