diff --git a/bot/yomichan/glossary/daijirin2.py b/bot/yomichan/glossary/daijirin2.py index 71e06ad..0adaa96 100644 --- a/bot/yomichan/glossary/daijirin2.py +++ b/bot/yomichan/glossary/daijirin2.py @@ -111,8 +111,8 @@ def __convert_gaiji(soup, image_dir): ratio = Icons.calculate_ratio(path) img = BeautifulSoup("", "xml").img img.attrs = { - "height": 1.0 if ratio > 1.0 else ratio, - "width": ratio if ratio > 1.0 else 1.0, + "height": 1.0, + "width": ratio, "sizeUnits": "em", "collapsible": False, "collapsed": False, @@ -150,8 +150,8 @@ def __convert_logos(soup, image_dir): ratio = Icons.calculate_ratio(path) img = BeautifulSoup("", "xml").img img.attrs = { - "height": 1.0 if ratio > 1.0 else ratio, - "width": ratio if ratio > 1.0 else 1.0, + "height": 1.0, + "width": ratio, "sizeUnits": "em", "collapsible": False, "collapsed": False, @@ -174,8 +174,8 @@ def __convert_kanjion_logos(soup, image_dir): ratio = Icons.calculate_ratio(path) img = BeautifulSoup("", "xml").img img.attrs = { - "height": 1.0 if ratio > 1.0 else ratio, - "width": ratio if ratio > 1.0 else 1.0, + "height": 1.0, + "width": ratio, "sizeUnits": "em", "collapsible": False, "collapsed": False, @@ -198,8 +198,8 @@ def __convert_daigoginum(soup, image_dir): ratio = Icons.calculate_ratio(path) img = BeautifulSoup("", "xml").img img.attrs = { - "height": 1.0 if ratio > 1.0 else ratio, - "width": ratio if ratio > 1.0 else 1.0, + "height": 1.0, + "width": ratio, "sizeUnits": "em", "collapsible": False, "collapsed": False, @@ -222,8 +222,8 @@ def __convert_jundaigoginum(soup, image_dir): ratio = Icons.calculate_ratio(path) img = BeautifulSoup("", "xml").img img.attrs = { - "height": 1.0 if ratio > 1.0 else ratio, - "width": ratio if ratio > 1.0 else 1.0, + "height": 1.0, + "width": ratio, "sizeUnits": "em", "collapsible": False, "collapsed": False, diff --git a/bot/yomichan/glossary/jitenon.py b/bot/yomichan/glossary/jitenon.py index a342214..61111b4 100644 --- a/bot/yomichan/glossary/jitenon.py +++ b/bot/yomichan/glossary/jitenon.py @@ -118,8 +118,8 @@ class JitenonKokugoGlossary(JitenonGlossary): ratio = Icons.calculate_ratio(path) img = BeautifulSoup("", "xml").img img.attrs = { - "height": 1.0 if ratio > 1.0 else ratio, - "width": ratio if ratio > 1.0 else 1.0, + "height": 1.0, + "width": ratio, "sizeUnits": "em", "collapsible": False, "collapsed": False, diff --git a/bot/yomichan/glossary/smk8.py b/bot/yomichan/glossary/smk8.py index b49fc47..f17ee42 100644 --- a/bot/yomichan/glossary/smk8.py +++ b/bot/yomichan/glossary/smk8.py @@ -92,8 +92,8 @@ def __convert_gaiji(soup, image_dir): ratio = Icons.calculate_ratio(path) img = BeautifulSoup("", "xml").img img.attrs = { - "height": 1.0 if ratio > 1.0 else ratio, - "width": ratio if ratio > 1.0 else 1.0, + "height": 1.0, + "width": ratio, "sizeUnits": "em", "collapsible": False, "collapsed": False, @@ -124,8 +124,8 @@ def __convert_rectangles(soup, image_dir): ratio = Icons.calculate_ratio(path) img = BeautifulSoup("", "xml").img img.attrs = { - "height": 1.0 if ratio > 1.0 else ratio, - "width": ratio if ratio > 1.0 else 1.0, + "height": 1.0, + "width": ratio, "sizeUnits": "em", "collapsible": False, "collapsed": False,