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,
|
recommended_value=False, level=OptionRecommendation.LOW,
|
||||||
help=_('Disable generation of MOBI index.')
|
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):
|
def convert(self, oeb, output_path, input_plugin, opts, log):
|
||||||
self.log, self.opts, self.oeb = log, opts, oeb
|
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.mobi.mobiml import MobiMLizer
|
||||||
from calibre.ebooks.oeb.transforms.manglecase import CaseMangler
|
from calibre.ebooks.oeb.transforms.manglecase import CaseMangler
|
||||||
from calibre.ebooks.oeb.transforms.rasterize import SVGRasterizer
|
from calibre.ebooks.oeb.transforms.rasterize import SVGRasterizer
|
||||||
@ -59,6 +65,7 @@ class MOBIOutput(OutputFormatPlugin):
|
|||||||
mobimlizer = MobiMLizer(ignore_tables=opts.linearize_tables)
|
mobimlizer = MobiMLizer(ignore_tables=opts.linearize_tables)
|
||||||
mobimlizer(oeb, opts)
|
mobimlizer(oeb, opts)
|
||||||
writer = MobiWriter(opts, imagemax=imagemax,
|
writer = MobiWriter(opts, imagemax=imagemax,
|
||||||
|
compression=UNCOMPRESSED if opts.dont_compress else PALMDOC,
|
||||||
prefer_author_sort=opts.prefer_author_sort)
|
prefer_author_sort=opts.prefer_author_sort)
|
||||||
writer(oeb, output_path)
|
writer(oeb, output_path)
|
||||||
|
|
||||||
|
@ -307,7 +307,7 @@ class MobiWriter(object):
|
|||||||
COLLAPSE_RE = re.compile(r'[ \t\r\n\v]+')
|
COLLAPSE_RE = re.compile(r'[ \t\r\n\v]+')
|
||||||
|
|
||||||
def __init__(self, opts, compression=PALMDOC, imagemax=None,
|
def __init__(self, opts, compression=PALMDOC, imagemax=None,
|
||||||
prefer_author_sort=False):
|
prefer_author_sort=False):
|
||||||
self.opts = opts
|
self.opts = opts
|
||||||
self._compression = compression or UNCOMPRESSED
|
self._compression = compression or UNCOMPRESSED
|
||||||
self._imagemax = imagemax or OTHER_MAX_IMAGE_SIZE
|
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'])
|
p.loadFromData(server_resources['calibre.png'])
|
||||||
self.setPixmap(self.LogoPixmap, p.scaledToHeight(80,
|
self.setPixmap(self.LogoPixmap, p.scaledToHeight(80,
|
||||||
Qt.SmoothTransformation))
|
Qt.SmoothTransformation))
|
||||||
|
self.setPixmap(self.WatermarkPixmap,
|
||||||
|
QPixmap(':/images/welcome_wizard.svg'))
|
||||||
|
self.setPixmap(self.BackgroundPixmap, QPixmap(':/images/wizard.svg'))
|
||||||
self.device_page = DevicePage()
|
self.device_page = DevicePage()
|
||||||
self.library_page = LibraryPage()
|
self.library_page = LibraryPage()
|
||||||
self.finish_page = FinishPage()
|
self.finish_page = FinishPage()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user