Re-design the Look & Feel section of the conversion dialog to make options better organized

This commit is contained in:
Kovid Goyal 2016-03-10 12:27:42 +05:30
parent 2da3c9d30b
commit 61ae37d726
4 changed files with 451 additions and 394 deletions

View File

@ -47,7 +47,7 @@ PDF is a terrible format to convert from. For a list of the various issues you w
How do I convert my file containing non-English characters, or smart quotes? How do I convert my file containing non-English characters, or smart quotes?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are two aspects to this problem: There are two aspects to this problem:
1. Knowing the encoding of the source file: calibre tries to guess what character encoding your source files use, but often, this is impossible, so you need to tell it what encoding to use. This can be done in the GUI via the :guilabel:`Input character encoding` field in the :guilabel:`Look & Feel` section of the conversion dialog. The command-line tools all have an :option:`--input-encoding` option. 1. Knowing the encoding of the source file: calibre tries to guess what character encoding your source files use, but often, this is impossible, so you need to tell it what encoding to use. This can be done in the GUI via the :guilabel:`Input character encoding` field in the :guilabel:`Look & Feel->Text` section of the conversion dialog. The command-line tools all have an :option:`--input-encoding` option.
2. When adding HTML files to calibre, you may need to tell calibre what encoding the files are in. To do this go to :guilabel:`Preferences->Plugins->File Type plugins` and customize the HTML2Zip plugin, telling it what encoding your HTML files are in. Now when you add HTML files to calibre they will be correctly processed. HTML files from different sources often have different encodings, so you may have to change this setting repeatedly. A common encoding for many files from the web is ``cp1252`` and I would suggest you try that first. Note that when converting HTML files, leave the input encoding setting mentioned above blank. This is because the HTML2ZIP plugin automatically converts the HTML files to a standard encoding (utf-8). 2. When adding HTML files to calibre, you may need to tell calibre what encoding the files are in. To do this go to :guilabel:`Preferences->Plugins->File Type plugins` and customize the HTML2Zip plugin, telling it what encoding your HTML files are in. Now when you add HTML files to calibre they will be correctly processed. HTML files from different sources often have different encodings, so you may have to change this setting repeatedly. A common encoding for many files from the web is ``cp1252`` and I would suggest you try that first. Note that when converting HTML files, leave the input encoding setting mentioned above blank. This is because the HTML2ZIP plugin automatically converts the HTML files to a standard encoding (utf-8).
What's the deal with Table of Contents in MOBI files? What's the deal with Table of Contents in MOBI files?

View File

@ -11,7 +11,7 @@ from functools import partial
from PyQt5.Qt import (QWidget, QSpinBox, QDoubleSpinBox, QLineEdit, QTextEdit, from PyQt5.Qt import (QWidget, QSpinBox, QDoubleSpinBox, QLineEdit, QTextEdit,
QCheckBox, QComboBox, Qt, QIcon, pyqtSignal, QLabel, QFontComboBox, QFont, QCheckBox, QComboBox, Qt, QIcon, pyqtSignal, QLabel, QFontComboBox, QFont,
QFontInfo) QFontInfo, QPlainTextEdit)
from calibre.customize.conversion import OptionRecommendation from calibre.customize.conversion import OptionRecommendation
from calibre.ebooks.conversion.config import ( from calibre.ebooks.conversion.config import (
@ -143,7 +143,7 @@ class Widget(QWidget):
return ret return ret
if isinstance(g, (QSpinBox, QDoubleSpinBox)): if isinstance(g, (QSpinBox, QDoubleSpinBox)):
return g.value() return g.value()
elif isinstance(g, (QLineEdit, QTextEdit)): elif isinstance(g, (QLineEdit, QTextEdit, QPlainTextEdit)):
func = getattr(g, 'toPlainText', getattr(g, 'text', None))() func = getattr(g, 'toPlainText', getattr(g, 'text', None))()
ans = unicode(func) ans = unicode(func)
if self.STRIP_TEXT_FIELDS: if self.STRIP_TEXT_FIELDS:
@ -189,7 +189,7 @@ class Widget(QWidget):
from calibre.gui2.convert.regex_builder import RegexEdit from calibre.gui2.convert.regex_builder import RegexEdit
if isinstance(g, (QSpinBox, QDoubleSpinBox)): if isinstance(g, (QSpinBox, QDoubleSpinBox)):
g.valueChanged.connect(f) g.valueChanged.connect(f)
elif isinstance(g, (QLineEdit, QTextEdit)): elif isinstance(g, (QLineEdit, QTextEdit, QPlainTextEdit)):
g.textChanged.connect(f) g.textChanged.connect(f)
elif isinstance(g, QComboBox): elif isinstance(g, QComboBox):
g.editTextChanged.connect(f) g.editTextChanged.connect(f)

View File

@ -6,7 +6,7 @@ __license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
from PyQt5.Qt import Qt from PyQt5.Qt import Qt, QSize
from calibre.gui2.convert.look_and_feel_ui import Ui_Form from calibre.gui2.convert.look_and_feel_ui import Ui_Form
from calibre.gui2.convert import Widget from calibre.gui2.convert import Widget
@ -61,6 +61,7 @@ class LookAndFeelWidget(Widget, Ui_Form):
self.opt_unsmarten_punctuation.stateChanged.connect( self.opt_unsmarten_punctuation.stateChanged.connect(
lambda state: state != Qt.Unchecked and lambda state: state != Qt.Unchecked and
self.opt_smarten_punctuation.setCheckState(Qt.Unchecked)) self.opt_smarten_punctuation.setCheckState(Qt.Unchecked))
self.opt_extra_css.size_hint = QSize(400, 300)
def get_value_handler(self, g): def get_value_handler(self, g):
if g is self.opt_change_justification: if g is self.opt_change_justification:
@ -102,6 +103,9 @@ class LookAndFeelWidget(Widget, Ui_Form):
w.setChecked(False) w.setChecked(False)
self.filter_css_others.setText(', '.join(items)) self.filter_css_others.setText(', '.join(items))
return True return True
if g is self.opt_extra_css:
g.load_text(val or '', 'css')
return True
def connect_gui_obj_handler(self, gui_obj, slot): def connect_gui_obj_handler(self, gui_obj, slot):
if gui_obj is self.opt_filter_css: if gui_obj is self.opt_filter_css:

View File

@ -6,355 +6,347 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>699</width> <width>765</width>
<height>619</height> <height>619</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <layout class="QVBoxLayout" name="verticalLayout_2">
<string>Form</string> <property name="spacing">
</property> <number>0</number>
<layout class="QGridLayout" name="gridLayout"> </property>
<item row="12" column="1" colspan="2"> <property name="leftMargin">
<widget class="QCheckBox" name="opt_keep_ligatures"> <number>0</number>
<property name="text"> </property>
<string>Keep &amp;ligatures</string> <property name="topMargin">
</property> <number>0</number>
</widget> </property>
</item> <property name="rightMargin">
<item row="1" column="0"> <number>0</number>
<widget class="QLabel" name="label_18"> </property>
<property name="text"> <property name="bottomMargin">
<string>Base &amp;font size:</string> <number>0</number>
</property> </property>
<property name="buddy"> <item>
<cstring>opt_base_font_size</cstring> <widget class="QTabWidget" name="MainTabs">
</property>
</widget>
</item>
<item row="9" column="3">
<widget class="QLabel" name="label_7">
<property name="text">
<string>&amp;Line size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>opt_insert_blank_line_size</cstring>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="EncodingComboBox" name="opt_input_encoding">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<widget class="QCheckBox" name="opt_remove_paragraph_spacing">
<property name="text">
<string>Remove &amp;spacing between paragraphs</string>
</property>
</widget>
</item>
<item row="8" column="3">
<widget class="QLabel" name="label_4">
<property name="text">
<string>&amp;Indent size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>opt_remove_paragraph_spacing_indent_size</cstring>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QDoubleSpinBox" name="opt_line_height">
<property name="suffix">
<string> pt</string>
</property>
<property name="decimals">
<number>1</number>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<widget class="QCheckBox" name="opt_insert_blank_line">
<property name="text">
<string>Insert &amp;blank line between paragraphs</string>
</property>
</widget>
</item>
<item row="9" column="4">
<widget class="QDoubleSpinBox" name="opt_insert_blank_line_size">
<property name="suffix">
<string> em</string>
</property>
<property name="decimals">
<number>1</number>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Text &amp;justification:</string>
</property>
<property name="buddy">
<cstring>opt_change_justification</cstring>
</property>
</widget>
</item>
<item row="10" column="2" colspan="3">
<widget class="QComboBox" name="opt_change_justification"/>
</item>
<item row="11" column="0">
<widget class="QCheckBox" name="opt_smarten_punctuation">
<property name="text">
<string>Smarten &amp;punctuation</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QCheckBox" name="opt_unsmarten_punctuation">
<property name="text">
<string>&amp;UnSmarten punctuation</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="label">
<property name="text">
<string>Line &amp;height:</string>
</property>
<property name="buddy">
<cstring>opt_line_height</cstring>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Minimum &amp;line height:</string>
</property>
<property name="buddy">
<cstring>opt_minimum_line_height</cstring>
</property>
</widget>
</item>
<item row="2" column="1" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="opt_font_size_mapping">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="button_font_key">
<property name="toolTip">
<string>Wizard to help you choose an appropriate font size key</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../resources/images.qrc">
<normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Input character &amp;encoding:</string>
</property>
<property name="buddy">
<cstring>opt_input_encoding</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="opt_minimum_line_height">
<property name="suffix">
<string> %</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="maximum">
<double>900.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="opt_base_font_size">
<property name="suffix">
<string> pt</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>50.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>15.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="0" colspan="5">
<widget class="QCheckBox" name="opt_disable_font_rescaling">
<property name="text">
<string>&amp;Disable font size rescaling</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="2">
<widget class="FontFamilyChooser" name="opt_embed_font_family" native="true"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Font size &amp;key:</string>
</property>
<property name="buddy">
<cstring>opt_font_size_mapping</cstring>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>&amp;Embed font family:</string>
</property>
<property name="buddy">
<cstring>opt_embed_font_family</cstring>
</property>
</widget>
</item>
<item row="13" column="0" colspan="5">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="extra_css_tab"> <widget class="QWidget" name="tab1">
<attribute name="title"> <attribute name="title">
<string>&amp;Extra CSS</string> <string>Fonts</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QTextEdit" name="opt_extra_css"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="opt_filter_css">
<attribute name="title">
<string>&amp;Filter Style Information</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0" colspan="5">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Select what style information you want completely removed:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QCheckBox" name="filter_css_fonts"> <widget class="QLabel" name="label_18">
<property name="toolTip">
<string>Removes the font-family CSS property</string>
</property>
<property name="text"> <property name="text">
<string>&amp;Fonts</string> <string>Base font si&amp;ze:</string>
</property>
<property name="buddy">
<cstring>opt_base_font_size</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QCheckBox" name="filter_css_margins"> <widget class="QDoubleSpinBox" name="opt_base_font_size">
<property name="toolTip"> <property name="suffix">
<string>Removes the margin CSS properties. Note that page margins are not affected by this setting.</string> <string> pt</string>
</property> </property>
<property name="text"> <property name="decimals">
<string>&amp;Margins</string> <number>1</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>50.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>15.000000000000000</double>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="2" column="0">
<widget class="QCheckBox" name="filter_css_padding"> <widget class="QLabel" name="label_2">
<property name="toolTip">
<string>Removes the padding CSS properties</string>
</property>
<property name="text"> <property name="text">
<string>&amp;Padding</string> <string>Font size &amp;key:</string>
</property>
<property name="buddy">
<cstring>opt_font_size_mapping</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="3"> <item row="2" column="1">
<widget class="QCheckBox" name="filter_css_floats"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="toolTip">
<string>Convert floating images/text into static images/text</string>
</property>
<property name="text">
<string>F&amp;loats</string>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QCheckBox" name="filter_css_colors">
<property name="toolTip">
<string>Removes foreground and background colors</string>
</property>
<property name="text">
<string>&amp;Colors</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="5">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<widget class="QLabel" name="label_9"> <widget class="QLineEdit" name="opt_font_size_mapping">
<property name="text"> <property name="sizePolicy">
<string>&amp;Other CSS Properties:</string> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
</property> <horstretch>0</horstretch>
<property name="buddy"> <verstretch>0</verstretch>
<cstring>filter_css_others</cstring> </sizepolicy>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="filter_css_others"> <widget class="QToolButton" name="button_font_key">
<property name="toolTip"> <property name="toolTip">
<string>Comma separated list of CSS properties to remove. For example: display, color, font-family</string> <string>Wizard to help you choose an appropriate font size key</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../resources/images.qrc">
<normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="3" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Minim&amp;um line height:</string>
</property>
<property name="buddy">
<cstring>opt_minimum_line_height</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="opt_minimum_line_height">
<property name="suffix">
<string> %</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="maximum">
<double>900.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>L&amp;ine height:</string>
</property>
<property name="buddy">
<cstring>opt_line_height</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="opt_line_height">
<property name="suffix">
<string> pt</string>
</property>
<property name="decimals">
<number>1</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Embed font fami&amp;ly:</string>
</property>
<property name="buddy">
<cstring>opt_embed_font_family</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="FontFamilyChooser" name="opt_embed_font_family" native="true"/>
</item>
<item row="6" column="0" colspan="2">
<widget class="QCheckBox" name="opt_embed_all_fonts">
<property name="text">
<string>&amp;Embed all fonts in document</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="opt_subset_embedded_fonts">
<property name="text">
<string>&amp;Subset all embedded fonts</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QCheckBox" name="opt_expand_css">
<property name="text">
<string>E&amp;xpand CSS</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QCheckBox" name="opt_keep_ligatures">
<property name="text">
<string>Keep &amp;ligatures</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="opt_disable_font_rescaling">
<property name="text">
<string>&amp;Disable font size rescaling</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Text</string>
</attribute>
<layout class="QFormLayout" name="formLayout_2">
<item row="1" column="1">
<widget class="EncodingComboBox" name="opt_input_encoding">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Text &amp;justification:</string>
</property>
<property name="buddy">
<cstring>opt_change_justification</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="opt_change_justification"/>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="opt_smarten_punctuation">
<property name="text">
<string>Smarten &amp;punctuation</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="opt_unsmarten_punctuation">
<property name="text">
<string>&amp;UnSmarten punctuation</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="QCheckBox" name="opt_asciiize">
<property name="text">
<string>&amp;Transliterate unicode characters to ASCII</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>I&amp;nput character encoding:</string>
</property>
<property name="buddy">
<cstring>opt_input_encoding</cstring>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Layout</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="QLabel" name="label_7">
<property name="text">
<string>&amp;Line size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>opt_insert_blank_line_size</cstring>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QDoubleSpinBox" name="opt_remove_paragraph_spacing_indent_size">
<property name="toolTip">
<string>&lt;p&gt;When calibre removes inter paragraph spacing, it automatically sets a paragraph indent, to ensure that paragraphs can be easily distinguished. This option controls the width of that indent.</string>
</property>
<property name="specialValueText">
<string>No change</string>
</property>
<property name="suffix">
<string> em</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-0.100000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="opt_insert_blank_line">
<property name="text">
<string>Insert &amp;blank line between paragraphs</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="opt_remove_paragraph_spacing">
<property name="text">
<string>Remove &amp;spacing between paragraphs</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QDoubleSpinBox" name="opt_insert_blank_line_size">
<property name="suffix">
<string> em</string>
</property>
<property name="decimals">
<number>1</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
<string>I&amp;ndent size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>opt_remove_paragraph_spacing_indent_size</cstring>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="opt_linearize_tables">
<property name="text">
<string>&amp;Linearize tables</string>
</property>
</widget>
</item>
<item row="3" column="0"> <item row="3" column="0">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
@ -370,63 +362,119 @@
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> <widget class="QWidget" name="tab_3">
</item> <attribute name="title">
<item row="8" column="4"> <string>Styling</string>
<widget class="QDoubleSpinBox" name="opt_remove_paragraph_spacing_indent_size"> </attribute>
<property name="toolTip"> <layout class="QVBoxLayout" name="verticalLayout">
<string>&lt;p&gt;When calibre removes inter paragraph spacing, it automatically sets a paragraph indent, to ensure that paragraphs can be easily distinguished. This option controls the width of that indent.</string> <item>
</property> <widget class="QGroupBox" name="groupBox">
<property name="specialValueText"> <property name="title">
<string>No change</string> <string>Extra CSS</string>
</property> </property>
<property name="suffix"> <layout class="QGridLayout" name="gridLayout_4">
<string> em</string> <item row="0" column="0">
</property> <widget class="TextEdit" name="opt_extra_css"/>
<property name="decimals"> </item>
<number>1</number> </layout>
</property> </widget>
<property name="minimum"> </item>
<double>-0.100000000000000</double> <item>
</property> <widget class="QGroupBox" name="opt_filter_css">
<property name="singleStep"> <property name="title">
<double>0.100000000000000</double> <string>Filter Style Information</string>
</property> </property>
</widget> <layout class="QVBoxLayout" name="verticalLayout_3">
</item> <item>
<item row="7" column="3"> <widget class="QLabel" name="label_8">
<widget class="QCheckBox" name="opt_subset_embedded_fonts"> <property name="text">
<property name="text"> <string>Select what style information you want completely removed:</string>
<string>&amp;Subset all embedded fonts</string> </property>
</property> <property name="wordWrap">
</widget> <bool>true</bool>
</item> </property>
<item row="7" column="0" colspan="3"> </widget>
<widget class="QCheckBox" name="opt_embed_all_fonts"> </item>
<property name="text"> <item>
<string>&amp;Embed all fonts in document</string> <layout class="QHBoxLayout" name="horizontalLayout_3">
</property> <item>
</widget> <widget class="QCheckBox" name="filter_css_fonts">
</item> <property name="toolTip">
<item row="11" column="1" colspan="2"> <string>Removes the font-family CSS property</string>
<widget class="QCheckBox" name="opt_asciiize"> </property>
<property name="text"> <property name="text">
<string>&amp;Transliterate unicode characters to ASCII</string> <string>&amp;Fonts</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="3" colspan="2"> <item>
<widget class="QCheckBox" name="opt_expand_css"> <widget class="QCheckBox" name="filter_css_margins">
<property name="text"> <property name="toolTip">
<string>E&amp;xpand CSS</string> <string>Removes the margin CSS properties. Note that page margins are not affected by this setting.</string>
</property> </property>
</widget> <property name="text">
</item> <string>&amp;Margins</string>
<item row="12" column="3" colspan="2"> </property>
<widget class="QCheckBox" name="opt_linearize_tables"> </widget>
<property name="text"> </item>
<string>&amp;Linearize tables</string> <item>
</property> <widget class="QCheckBox" name="filter_css_padding">
<property name="toolTip">
<string>Removes the padding CSS properties</string>
</property>
<property name="text">
<string>&amp;Padding</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="filter_css_floats">
<property name="toolTip">
<string>Convert floating images/text into static images/text</string>
</property>
<property name="text">
<string>F&amp;loats</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="filter_css_colors">
<property name="toolTip">
<string>Removes foreground and background colors</string>
</property>
<property name="text">
<string>&amp;Colors</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>Other CSS Propert&amp;ies:</string>
</property>
<property name="buddy">
<cstring>filter_css_others</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="filter_css_others">
<property name="toolTip">
<string>Comma separated list of CSS properties to remove. For example: display, color, font-family</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -442,6 +490,11 @@
<extends>QWidget</extends> <extends>QWidget</extends>
<header>calibre/gui2/font_family_chooser.h</header> <header>calibre/gui2/font_family_chooser.h</header>
</customwidget> </customwidget>
<customwidget>
<class>TextEdit</class>
<extends>QPlainTextEdit</extends>
<header>calibre/gui2/tweak_book/editor/text.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../../../../resources/images.qrc"/> <include location="../../../../resources/images.qrc"/>
@ -455,12 +508,12 @@
<slot>setDisabled(bool)</slot> <slot>setDisabled(bool)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>154</x> <x>156</x>
<y>16</y> <y>45</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>385</x> <x>577</x>
<y>40</y> <y>83</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
@ -471,12 +524,12 @@
<slot>setDisabled(bool)</slot> <slot>setDisabled(bool)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>80</x> <x>82</x>
<y>20</y> <y>49</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>285</x> <x>478</x>
<y>72</y> <y>120</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
@ -487,12 +540,12 @@
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>20</x> <x>243</x>
<y>20</y> <y>42</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>20</x> <x>410</x>
<y>20</y> <y>47</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
@ -503,12 +556,12 @@
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>20</x> <x>160</x>
<y>20</y> <y>49</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>20</x> <x>544</x>
<y>20</y> <y>48</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>