eric6/WebBrowser/Tools/PrintToPdfDialog.py

changeset 8260
2161475d9639
parent 8218
7c09585bd960
diff -r 2bbec88047dd -r 2161475d9639 eric6/WebBrowser/Tools/PrintToPdfDialog.py
--- a/eric6/WebBrowser/Tools/PrintToPdfDialog.py	Wed Apr 21 19:40:50 2021 +0200
+++ b/eric6/WebBrowser/Tools/PrintToPdfDialog.py	Thu Apr 22 18:02:47 2021 +0200
@@ -73,13 +73,12 @@
         """
         Private method to update the page layout label.
         """
-        if (
-            self.__currentPageLayout.orientation() ==
-            QPageLayout.Orientation.Portrait
-        ):
-            orientation = self.tr("Portrait")
-        else:
-            orientation = self.tr("Landscape")
+        orientation = (
+            self.tr("Portrait")
+            if (self.__currentPageLayout.orientation() ==
+                QPageLayout.Orientation.Portrait) else
+            self.tr("Landscape")
+        )
         self.pageLayoutLabel.setText(
             self.tr("{0}, {1}", "page size, page orientation").format(
                 self.__currentPageLayout.pageSize().name(),

eric ide

mercurial