Make welcome wizard a little more colorful

This commit is contained in:
Kovid Goyal 2009-05-30 16:37:33 -07:00
parent 493920beb9
commit 84e0dac816
4 changed files with 1724 additions and 2 deletions

View File

@ -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)

View File

@ -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

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -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()