diff --git a/src/calibre/gui2/splash_screen.py b/src/calibre/gui2/splash_screen.py index 995771be2d..56467067cc 100644 --- a/src/calibre/gui2/splash_screen.py +++ b/src/calibre/gui2/splash_screen.py @@ -15,7 +15,7 @@ from calibre.utils.monotonic import monotonic class SplashScreen(QSplashScreen): - TITLE_SIZE = 18 # pt + TITLE_SIZE = 20 # pt BODY_SIZE = 12 # pt FOOTER_SIZE = 9 # pt LOGO_SIZE = 96 # px @@ -31,8 +31,9 @@ class SplashScreen(QSplashScreen): self.body_font = f = QFont() f.setPointSize(self.BODY_SIZE) self.line_height = QFontMetrics(f).lineSpacing() + self.total_height = max(self.LOGO_SIZE, self.title_height + 3 * self.line_height) self.num_font = f = QFont() - f.setPixelSize(self.LOGO_SIZE) + f.setPixelSize(self.total_height) f.setItalic(True), f.setBold(True) f = QFontMetrics(f) self.num_ch = str(max(3, numeric_version[0])) @@ -56,7 +57,8 @@ class SplashScreen(QSplashScreen): painter.save() painter.setRenderHint(painter.TextAntialiasing, True) painter.setRenderHint(painter.Antialiasing, True) - pw = height = self.LOGO_SIZE + pw = self.LOGO_SIZE + height = max(pw, self.total_height) width = self.width() # Draw frame @@ -65,7 +67,8 @@ class SplashScreen(QSplashScreen): painter.fillRect(0, y, width, height, self.light_brush) painter.fillRect(0, y, width, self.title_height, self.dark_brush) painter.fillRect(0, y, pw, height, self.dark_brush) - painter.drawPixmap(0, y, self.pmap) + dy = (height - self.LOGO_SIZE) // 2 + painter.drawPixmap(0, y + dy, self.pmap) # Draw number painter.setFont(self.num_font)