|
|
@@ -104,10 +104,18 @@ class CardGridGenerator(Extension):
|
|
|
docWidth = doc.width()
|
|
|
docHeight = doc.height()
|
|
|
|
|
|
+ # Card dimensions.
|
|
|
+ multiplier = 1
|
|
|
+ docPPI = doc.resolution()
|
|
|
+ if self.unitInput.currentText() == "inch":
|
|
|
+ multiplier = docPPI
|
|
|
+ if self.unitInput.currentText() == "mm":
|
|
|
+ multiplier = docPPI/25.4
|
|
|
+ bleedSize = float(self.bleedInput.text()) * multiplier
|
|
|
+ cardWidth = float(self.widthInput.text()) * multiplier
|
|
|
+ cardHeight = float(self.heightInput.text()) * multiplier
|
|
|
+
|
|
|
# Card dimensions with bleed.
|
|
|
- bleedSize = int(self.bleedInput.text())
|
|
|
- cardWidth = int(self.widthInput.text())
|
|
|
- cardHeight = int(self.heightInput.text())
|
|
|
cardBledWidth = cardWidth + bleedSize * 2
|
|
|
cardBledHeight = cardHeight + bleedSize * 2
|
|
|
|