mirror of
https://github.com/ciromattia/kcc
synced 2026-06-07 15:13:31 +00:00
remove getTopMargin from EPUBs
This commit is contained in:
@@ -136,7 +136,7 @@ def buildHTML(path, imgfile, imgfilepath, imgfile2=None):
|
|||||||
"content=\"width=" + str(imgsizeframe[0]) + ", height=" + str(imgsizeframe[1]) + "\"/>\n"
|
"content=\"width=" + str(imgsizeframe[0]) + ", height=" + str(imgsizeframe[1]) + "\"/>\n"
|
||||||
"</head>\n",
|
"</head>\n",
|
||||||
"<body style=\"" + additionalStyle + "\">\n",
|
"<body style=\"" + additionalStyle + "\">\n",
|
||||||
"<div style=\"text-align:center;top:" + getTopMargin(deviceres, imgsizeframe) + "%;\">\n",
|
"<div style=\"text-align:center;\">\n",
|
||||||
])
|
])
|
||||||
if options.iskindle:
|
if options.iskindle:
|
||||||
# this display none div fixes formatting issues with virtual panel mode, for some reason
|
# this display none div fixes formatting issues with virtual panel mode, for some reason
|
||||||
@@ -1075,11 +1075,6 @@ def getDirectorySize(start_path='.'):
|
|||||||
return total_size
|
return total_size
|
||||||
|
|
||||||
|
|
||||||
def getTopMargin(deviceres, size):
|
|
||||||
y = int((deviceres[1] - size[1]) / 2) / deviceres[1] * 100
|
|
||||||
return str(round(y, 1))
|
|
||||||
|
|
||||||
|
|
||||||
def getPanelViewResolution(imagesize, deviceres):
|
def getPanelViewResolution(imagesize, deviceres):
|
||||||
scale = float(deviceres[0]) / float(imagesize[0])
|
scale = float(deviceres[0]) / float(imagesize[0])
|
||||||
return int(deviceres[0]), int(scale * imagesize[1])
|
return int(deviceres[0]), int(scale * imagesize[1])
|
||||||
|
|||||||
Reference in New Issue
Block a user