eric6/QScintilla/MarkupProviders/ImageMarkupDialog.py

changeset 7267
aedc309827c7
parent 7229
53054eb5b15a
child 7360
9190402e4505
--- a/eric6/QScintilla/MarkupProviders/ImageMarkupDialog.py	Wed Sep 25 18:25:43 2019 +0200
+++ b/eric6/QScintilla/MarkupProviders/ImageMarkupDialog.py	Wed Sep 25 18:37:35 2019 +0200
@@ -130,9 +130,10 @@
                 self.widthSpinBox.setValue(image.width())
                 self.heightSpinBox.setValue(image.height())
                 self.__originalImageSize = image.size()
-                self.__aspectRatio = \
-                    float(self.__originalImageSize.height()) / \
+                self.__aspectRatio = (
+                    float(self.__originalImageSize.height()) /
                     self.__originalImageSize.width()
+                )
         else:
             self.widthSpinBox.setValue(0)
             self.heightSpinBox.setValue(0)
@@ -183,8 +184,10 @@
         @param width width for the image
         @type int
         """
-        if self.aspectRatioCheckBox.isChecked() and \
-                self.widthSpinBox.hasFocus():
+        if (
+            self.aspectRatioCheckBox.isChecked() and
+            self.widthSpinBox.hasFocus()
+        ):
             height = width * self.__aspectRatio
             self.heightSpinBox.setValue(height)
     
@@ -196,8 +199,10 @@
         @param height height for the image
         @type int
         """
-        if self.aspectRatioCheckBox.isChecked() and \
-                self.heightSpinBox.hasFocus():
+        if (
+            self.aspectRatioCheckBox.isChecked() and
+            self.heightSpinBox.hasFocus()
+        ):
             width = height / self.__aspectRatio
             self.widthSpinBox.setValue(width)
     

eric ide

mercurial