mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make welcome wizard a little more colorful
This commit is contained in:
parent
493920beb9
commit
84e0dac816
@ -35,6 +35,11 @@ class MOBIOutput(OutputFormatPlugin):
|
||||
recommended_value=False, level=OptionRecommendation.LOW,
|
||||
help=_('Disable generation of MOBI index.')
|
||||
),
|
||||
OptionRecommendation(name='dont_compress',
|
||||
recommended_value=False, level=OptionRecommendation.LOW,
|
||||
help=_('Disable compression of the file contents.')
|
||||
),
|
||||
|
||||
|
||||
])
|
||||
|
||||
@ -44,7 +49,8 @@ class MOBIOutput(OutputFormatPlugin):
|
||||
|
||||
def convert(self, oeb, output_path, input_plugin, opts, log):
|
||||
self.log, self.opts, self.oeb = log, opts, oeb
|
||||
from calibre.ebooks.mobi.writer import PALM_MAX_IMAGE_SIZE, MobiWriter
|
||||
from calibre.ebooks.mobi.writer import PALM_MAX_IMAGE_SIZE, \
|
||||
MobiWriter, PALMDOC, UNCOMPRESSED
|
||||
from calibre.ebooks.mobi.mobiml import MobiMLizer
|
||||
from calibre.ebooks.oeb.transforms.manglecase import CaseMangler
|
||||
from calibre.ebooks.oeb.transforms.rasterize import SVGRasterizer
|
||||
@ -59,6 +65,7 @@ class MOBIOutput(OutputFormatPlugin):
|
||||
mobimlizer = MobiMLizer(ignore_tables=opts.linearize_tables)
|
||||
mobimlizer(oeb, opts)
|
||||
writer = MobiWriter(opts, imagemax=imagemax,
|
||||
compression=UNCOMPRESSED if opts.dont_compress else PALMDOC,
|
||||
prefer_author_sort=opts.prefer_author_sort)
|
||||
writer(oeb, output_path)
|
||||
|
||||
|
@ -307,7 +307,7 @@ class MobiWriter(object):
|
||||
COLLAPSE_RE = re.compile(r'[ \t\r\n\v]+')
|
||||
|
||||
def __init__(self, opts, compression=PALMDOC, imagemax=None,
|
||||
prefer_author_sort=False):
|
||||
prefer_author_sort=False):
|
||||
self.opts = opts
|
||||
self._compression = compression or UNCOMPRESSED
|
||||
self._imagemax = imagemax or OTHER_MAX_IMAGE_SIZE
|
||||
|
1712
src/calibre/gui2/images/welcome_wizard.svg
Normal file
1712
src/calibre/gui2/images/welcome_wizard.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 108 KiB |
@ -468,6 +468,9 @@ class Wizard(QWizard):
|
||||
p.loadFromData(server_resources['calibre.png'])
|
||||
self.setPixmap(self.LogoPixmap, p.scaledToHeight(80,
|
||||
Qt.SmoothTransformation))
|
||||
self.setPixmap(self.WatermarkPixmap,
|
||||
QPixmap(':/images/welcome_wizard.svg'))
|
||||
self.setPixmap(self.BackgroundPixmap, QPixmap(':/images/wizard.svg'))
|
||||
self.device_page = DevicePage()
|
||||
self.library_page = LibraryPage()
|
||||
self.finish_page = FinishPage()
|
||||
|
Loading…
x
Reference in New Issue
Block a user