diff options
-rw-r--r-- | src/plugins/texteditor/colorschemeedit.cpp | 34 | ||||
-rw-r--r-- | src/plugins/texteditor/colorschemeedit.h | 4 | ||||
-rw-r--r-- | src/plugins/texteditor/colorschemeedit.ui | 677 | ||||
-rw-r--r-- | src/plugins/texteditor/fontsettingspage.ui | 158 |
4 files changed, 618 insertions, 255 deletions
diff --git a/src/plugins/texteditor/colorschemeedit.cpp b/src/plugins/texteditor/colorschemeedit.cpp index b096c18e674..74855b95d39 100644 --- a/src/plugins/texteditor/colorschemeedit.cpp +++ b/src/plugins/texteditor/colorschemeedit.cpp @@ -34,6 +34,10 @@ using namespace TextEditor; using namespace TextEditor::Internal; +namespace { +const int layoutSpacing = 6; +} // namespace + static inline QString colorButtonStyleSheet(const QColor &bgColor) { if (bgColor.isValid()) { @@ -145,11 +149,10 @@ private: ColorSchemeEdit::ColorSchemeEdit(QWidget *parent) : QWidget(parent), - m_curItem(-1), m_ui(new Ui::ColorSchemeEdit), - m_formatsModel(new FormatsModel(this)), - m_readOnly(false) + m_formatsModel(new FormatsModel(this)) { + setContentsMargins(0, layoutSpacing, 0, 0); setPalette(Utils::Theme::initialPalette()); m_ui->setupUi(this); m_ui->itemList->setModel(m_formatsModel); @@ -219,18 +222,21 @@ void ColorSchemeEdit::setReadOnly(bool readOnly) m_ui->backgroundToolButton->setEnabled(enabled); m_ui->eraseBackgroundToolButton->setEnabled(enabled); m_ui->eraseForegroundToolButton->setEnabled(enabled); - m_ui->relativeForegroundLabel->setEnabled(enabled); + m_ui->relativeForegroundHeadline->setEnabled(enabled); m_ui->foregroundSaturationLabel->setEnabled(enabled); m_ui->foregroundLightnessLabel->setEnabled(enabled); m_ui->foregroundSaturationSpinBox->setEnabled(enabled); m_ui->foregroundLightnessSpinBox->setEnabled(enabled); - m_ui->relativeBackgroundLabel->setEnabled(enabled); + m_ui->relativeBackgroundHeadline->setEnabled(enabled); m_ui->backgroundSaturationLabel->setEnabled(enabled); m_ui->backgroundLightnessLabel->setEnabled(enabled); m_ui->backgroundSaturationSpinBox->setEnabled(enabled); m_ui->backgroundLightnessSpinBox->setEnabled(enabled); + m_ui->fontHeadline->setEnabled(enabled); m_ui->boldCheckBox->setEnabled(enabled); m_ui->italicCheckBox->setEnabled(enabled); + m_ui->underlineHeadline->setEnabled(enabled); + m_ui->underlineLabel->setEnabled(enabled); m_ui->underlineColorToolButton->setEnabled(enabled); m_ui->eraseUnderlineColorToolButton->setEnabled(enabled); m_ui->underlineComboBox->setEnabled(enabled); @@ -278,6 +284,7 @@ void ColorSchemeEdit::updateForegroundControls() m_ui->foregroundLabel->setVisible(isVisible); m_ui->foregroundToolButton->setVisible(isVisible); m_ui->eraseForegroundToolButton->setVisible(isVisible); + m_ui->foregroundSpacer->setVisible(isVisible); m_ui->foregroundToolButton->setStyleSheet(colorButtonStyleSheet(format.foreground())); m_ui->eraseForegroundToolButton->setEnabled(!m_readOnly @@ -295,6 +302,7 @@ void ColorSchemeEdit::updateBackgroundControls() m_ui->backgroundLabel->setVisible(isVisible); m_ui->backgroundToolButton->setVisible(isVisible); m_ui->eraseBackgroundToolButton->setVisible(isVisible); + m_ui->backgroundSpacer->setVisible(isVisible); m_ui->backgroundToolButton->setStyleSheet(colorButtonStyleSheet(format.background())); m_ui->eraseBackgroundToolButton->setEnabled(!m_readOnly @@ -312,11 +320,14 @@ void ColorSchemeEdit::updateRelativeForegroundControls() bool isVisible = formatDescription.showControl(FormatDescription::ShowRelativeForegroundControl); - m_ui->relativeForegroundLabel->setVisible(isVisible); + m_ui->relativeForegroundHeadline->setVisible(isVisible); m_ui->foregroundSaturationLabel->setVisible(isVisible); m_ui->foregroundLightnessLabel->setVisible(isVisible); m_ui->foregroundSaturationSpinBox->setVisible(isVisible); m_ui->foregroundLightnessSpinBox->setVisible(isVisible); + m_ui->relativeForegroundSpacer1->setVisible(isVisible); + m_ui->relativeForegroundSpacer2->setVisible(isVisible); + m_ui->relativeForegroundSpacer3->setVisible(isVisible); m_ui->foregroundSaturationSpinBox->setValue(format.relativeForegroundSaturation()); m_ui->foregroundLightnessSpinBox->setValue(format.relativeForegroundLightness()); @@ -332,11 +343,14 @@ void ColorSchemeEdit::updateRelativeBackgroundControls() bool isVisible = formatDescription.showControl(FormatDescription::ShowRelativeBackgroundControl); - m_ui->relativeBackgroundLabel->setVisible(isVisible); + m_ui->relativeBackgroundHeadline->setVisible(isVisible); m_ui->backgroundSaturationLabel->setVisible(isVisible); m_ui->backgroundLightnessLabel->setVisible(isVisible); m_ui->backgroundSaturationSpinBox->setVisible(isVisible); m_ui->backgroundLightnessSpinBox->setVisible(isVisible); + m_ui->relativeBackgroundSpacer1->setVisible(isVisible); + m_ui->relativeBackgroundSpacer2->setVisible(isVisible); + m_ui->relativeBackgroundSpacer3->setVisible(isVisible); m_ui->backgroundSaturationSpinBox->setValue(format.relativeBackgroundSaturation()); m_ui->backgroundLightnessSpinBox->setValue(format.relativeBackgroundLightness()); @@ -352,8 +366,11 @@ void ColorSchemeEdit::updateFontControls() bool isVisible= formatDescription.showControl(FormatDescription::ShowFontControls); + m_ui->fontHeadline->setVisible(isVisible); m_ui->boldCheckBox->setVisible(isVisible); m_ui->italicCheckBox->setVisible(isVisible); + m_ui->fontSpacer1->setVisible(isVisible); + m_ui->fontSpacer2->setVisible(isVisible); m_ui->boldCheckBox->setChecked(format.bold()); m_ui->italicCheckBox->setChecked(format.italic()); @@ -369,10 +386,13 @@ void ColorSchemeEdit::updateUnderlineControls() bool isVisible= formatDescription.showControl(FormatDescription::ShowUnderlineControl); + m_ui->underlineHeadline->setVisible(isVisible); m_ui->underlineLabel->setVisible(isVisible); m_ui->underlineColorToolButton->setVisible(isVisible); m_ui->eraseUnderlineColorToolButton->setVisible(isVisible); m_ui->underlineComboBox->setVisible(isVisible); + m_ui->underlineSpacer1->setVisible(isVisible); + m_ui->underlineSpacer2->setVisible(isVisible); m_ui->underlineColorToolButton->setStyleSheet(colorButtonStyleSheet(format.underlineColor())); m_ui->eraseUnderlineColorToolButton->setEnabled(!m_readOnly diff --git a/src/plugins/texteditor/colorschemeedit.h b/src/plugins/texteditor/colorschemeedit.h index 79ce8173537..e3875cffd90 100644 --- a/src/plugins/texteditor/colorschemeedit.h +++ b/src/plugins/texteditor/colorschemeedit.h @@ -87,10 +87,10 @@ private: private: FormatDescriptions m_descriptions; ColorScheme m_scheme; - int m_curItem; + int m_curItem = -1; Ui::ColorSchemeEdit *m_ui; FormatsModel *m_formatsModel; - bool m_readOnly; + bool m_readOnly = false; }; diff --git a/src/plugins/texteditor/colorschemeedit.ui b/src/plugins/texteditor/colorschemeedit.ui index aba1153d1c8..fa31aa590d2 100644 --- a/src/plugins/texteditor/colorschemeedit.ui +++ b/src/plugins/texteditor/colorschemeedit.ui @@ -6,20 +6,159 @@ <rect> <x>0</x> <y>0</y> - <width>435</width> - <height>261</height> + <width>462</width> + <height>389</height> </rect> </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="9" column="2"> - <widget class="QLabel" name="backgroundSaturationLabel"> + <layout class="QGridLayout" name="gridLayout" columnstretch="1,0,0,0"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <property name="verticalSpacing"> + <number>0</number> + </property> + <item row="5" column="1" colspan="3"> + <widget class="QLabel" name="relativeForegroundHeadline"> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> <property name="text"> - <string>Saturation</string> + <string>Relative Foreground</string> </property> </widget> </item> - <item row="7" column="3"> - <widget class="QDoubleSpinBox" name="foregroundLightnessSpinBox"> + <item row="0" column="1"> + <widget class="QLabel" name="foregroundLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Foreground:</string> + </property> + <property name="buddy"> + <cstring>foregroundToolButton</cstring> + </property> + </widget> + </item> + <item row="10" column="1" colspan="3"> + <widget class="QWidget" name="relativeForegroundSpacer3" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>18</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>18</height> + </size> + </property> + </widget> + </item> + <item row="9" column="1"> + <widget class="QLabel" name="foregroundLightnessLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Lightness:</string> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QToolButton" name="foregroundToolButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="26" column="1" colspan="3"> + <spacer name="spacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>200</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + <item row="3" column="3"> + <widget class="QToolButton" name="eraseBackgroundToolButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Erase background.</string> + </property> + <property name="text"> + <string>x</string> + </property> + <property name="arrowType"> + <enum>Qt::LeftArrow</enum> + </property> + </widget> + </item> + <item row="14" column="1" colspan="3"> + <widget class="QWidget" name="relativeBackgroundSpacer2" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>6</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>6</height> + </size> + </property> + </widget> + </item> + <item row="7" column="2" colspan="2"> + <widget class="QDoubleSpinBox" name="foregroundSaturationSpinBox"> <property name="minimum"> <double>-1.000000000000000</double> </property> @@ -31,120 +170,145 @@ </property> </widget> </item> - <item row="7" column="2"> - <widget class="QLabel" name="foregroundLightnessLabel"> + <item row="15" column="1"> + <widget class="QLabel" name="backgroundLightnessLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="text"> - <string>Lightness</string> + <string>Lightness:</string> </property> </widget> </item> - <item row="6" column="2"> - <widget class="QLabel" name="foregroundSaturationLabel"> + <item row="0" column="3"> + <widget class="QToolButton" name="eraseForegroundToolButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Erase foreground.</string> + </property> <property name="text"> - <string>Saturation</string> + <string>x</string> + </property> + <property name="arrowType"> + <enum>Qt::LeftArrow</enum> </property> </widget> </item> - <item row="0" column="2"> - <widget class="QLabel" name="foregroundLabel"> + <item row="13" column="1"> + <widget class="QLabel" name="backgroundSaturationLabel"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="text"> - <string>Foreground:</string> - </property> - <property name="buddy"> - <cstring>foregroundToolButton</cstring> + <string>Saturation:</string> </property> </widget> </item> - <item row="11" column="3"> + <item row="19" column="2" colspan="2"> <widget class="QCheckBox" name="italicCheckBox"> <property name="text"> <string>Italic</string> </property> </widget> </item> - <item row="0" column="3"> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <widget class="QToolButton" name="foregroundToolButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="eraseForegroundToolButton"> - <property name="toolTip"> - <string>Erase foreground.</string> - </property> - <property name="text"> - <string>x</string> - </property> - <property name="arrowType"> - <enum>Qt::LeftArrow</enum> - </property> - </widget> - </item> - </layout> - </item> - <item row="14" column="3"> - <spacer> - <property name="orientation"> - <enum>Qt::Vertical</enum> + <item row="9" column="2" colspan="2"> + <widget class="QDoubleSpinBox" name="foregroundLightnessSpinBox"> + <property name="minimum"> + <double>-1.000000000000000</double> </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>83</height> - </size> + <property name="maximum"> + <double>1.000000000000000</double> </property> - </spacer> - </item> - <item row="5" column="2" colspan="2"> - <widget class="QLabel" name="relativeForegroundLabel"> - <property name="text"> - <string>Relative Foreground</string> + <property name="singleStep"> + <double>0.050000000000000</double> </property> </widget> </item> - <item row="11" column="2"> - <widget class="QCheckBox" name="boldCheckBox"> - <property name="text"> - <string>Bold</string> + <item row="6" column="1" colspan="3"> + <widget class="QWidget" name="relativeForegroundSpacer1" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>6</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>6</height> + </size> </property> </widget> </item> <item row="13" column="2" colspan="2"> - <widget class="QComboBox" name="underlineComboBox"/> + <widget class="QDoubleSpinBox" name="backgroundSaturationSpinBox"> + <property name="minimum"> + <double>-1.000000000000000</double> + </property> + <property name="maximum"> + <double>1.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.050000000000000</double> + </property> + </widget> </item> - <item row="12" column="2"> - <widget class="QLabel" name="underlineLabel"> + <item row="3" column="1"> + <widget class="QLabel" name="backgroundLabel"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="text"> - <string>Underline:</string> + <string>Background:</string> </property> <property name="buddy"> <cstring>backgroundToolButton</cstring> </property> </widget> </item> - <item row="0" column="0" rowspan="15"> + <item row="4" column="1" colspan="3"> + <widget class="QWidget" name="backgroundSpacer" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>18</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>18</height> + </size> + </property> + </widget> + </item> + <item row="0" column="0" rowspan="27"> <widget class="QListView" name="itemList"> <property name="sizePolicy"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> @@ -160,123 +324,227 @@ </property> </widget> </item> - <item row="12" column="3"> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QToolButton" name="underlineColorToolButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="eraseUnderlineColorToolButton"> - <property name="toolTip"> - <string>Erase background.</string> - </property> - <property name="text"> - <string>x</string> - </property> - <property name="arrowType"> - <enum>Qt::LeftArrow</enum> - </property> - </widget> - </item> - </layout> - </item> - <item row="6" column="3"> - <widget class="QDoubleSpinBox" name="foregroundSaturationSpinBox"> - <property name="minimum"> - <double>-1.000000000000000</double> + <item row="17" column="1"> + <widget class="QLabel" name="fontHeadline"> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> </property> - <property name="maximum"> - <double>1.000000000000000</double> + <property name="text"> + <string>Font</string> </property> - <property name="singleStep"> - <double>0.050000000000000</double> + </widget> + </item> + <item row="7" column="1"> + <widget class="QLabel" name="foregroundSaturationLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Saturation:</string> </property> </widget> </item> - <item row="4" column="2"> - <widget class="QLabel" name="backgroundLabel"> + <item row="19" column="1"> + <widget class="QCheckBox" name="boldCheckBox"> + <property name="text"> + <string>Bold</string> + </property> + </widget> + </item> + <item row="18" column="1" colspan="3"> + <widget class="QWidget" name="fontSpacer1" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>6</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>6</height> + </size> + </property> + </widget> + </item> + <item row="12" column="1" colspan="3"> + <widget class="QWidget" name="relativeBackgroundSpacer1" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>6</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>6</height> + </size> + </property> + </widget> + </item> + <item row="16" column="1" colspan="3"> + <widget class="QWidget" name="relativeBackgroundSpacer3" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>18</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>18</height> + </size> + </property> + </widget> + </item> + <item row="24" column="1" colspan="3"> + <widget class="QWidget" name="underlineSpacer2" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>6</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>6</height> + </size> + </property> + </widget> + </item> + <item row="22" column="1" colspan="3"> + <widget class="QWidget" name="underlineSpacer1" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>6</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>6</height> + </size> + </property> + </widget> + </item> + <item row="23" column="2"> + <widget class="QToolButton" name="underlineColorToolButton"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="text"> - <string>Background:</string> + <string/> </property> - <property name="buddy"> - <cstring>backgroundToolButton</cstring> + </widget> + </item> + <item row="21" column="1"> + <widget class="QLabel" name="underlineHeadline"> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Underline</string> </property> </widget> </item> - <item row="4" column="3"> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QToolButton" name="backgroundToolButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="eraseBackgroundToolButton"> - <property name="toolTip"> - <string>Erase background.</string> - </property> - <property name="text"> - <string>x</string> - </property> - <property name="arrowType"> - <enum>Qt::LeftArrow</enum> - </property> - </widget> - </item> - </layout> - </item> - <item row="10" column="2"> - <widget class="QLabel" name="backgroundLightnessLabel"> + <item row="23" column="1"> + <widget class="QLabel" name="underlineLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="text"> - <string>Lightness</string> + <string>Color:</string> + </property> + <property name="buddy"> + <cstring>backgroundToolButton</cstring> </property> </widget> </item> - <item row="8" column="2" colspan="2"> - <widget class="QLabel" name="relativeBackgroundLabel"> + <item row="11" column="1" colspan="3"> + <widget class="QLabel" name="relativeBackgroundHeadline"> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> <property name="text"> <string>Relative Background</string> </property> </widget> </item> - <item row="9" column="3"> - <widget class="QDoubleSpinBox" name="backgroundSaturationSpinBox"> - <property name="minimum"> - <double>-1.000000000000000</double> + <item row="20" column="1" colspan="3"> + <widget class="QWidget" name="fontSpacer2" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="maximum"> - <double>1.000000000000000</double> + <property name="minimumSize"> + <size> + <width>0</width> + <height>18</height> + </size> </property> - <property name="singleStep"> - <double>0.050000000000000</double> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>18</height> + </size> </property> </widget> </item> - <item row="10" column="3"> + <item row="15" column="2" colspan="2"> <widget class="QDoubleSpinBox" name="backgroundLightnessSpinBox"> <property name="minimum"> <double>-1.000000000000000</double> @@ -289,6 +557,85 @@ </property> </widget> </item> + <item row="3" column="2"> + <widget class="QToolButton" name="backgroundToolButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="23" column="3"> + <widget class="QToolButton" name="eraseUnderlineColorToolButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Erase background.</string> + </property> + <property name="text"> + <string>x</string> + </property> + <property name="arrowType"> + <enum>Qt::LeftArrow</enum> + </property> + </widget> + </item> + <item row="25" column="1" colspan="3"> + <widget class="QComboBox" name="underlineComboBox"/> + </item> + <item row="8" column="1" colspan="3"> + <widget class="QWidget" name="relativeForegroundSpacer2" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>6</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>6</height> + </size> + </property> + </widget> + </item> + <item row="2" column="1" colspan="3"> + <widget class="QWidget" name="foregroundSpacer" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>6</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>6</height> + </size> + </property> + </widget> + </item> </layout> </widget> <tabstops> diff --git a/src/plugins/texteditor/fontsettingspage.ui b/src/plugins/texteditor/fontsettingspage.ui index 188c459d04a..c47c4eb9407 100644 --- a/src/plugins/texteditor/fontsettingspage.ui +++ b/src/plugins/texteditor/fontsettingspage.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>547</width> + <width>614</width> <height>306</height> </rect> </property> @@ -17,6 +17,39 @@ <string>Font</string> </property> <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="4"> + <widget class="QLabel" name="sizeLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Size:</string> + </property> + </widget> + </item> + <item row="0" column="7"> + <widget class="QLabel" name="zoomLabel"> + <property name="text"> + <string>Zoom:</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="familyLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Family:</string> + </property> + </widget> + </item> <item row="0" column="6"> <spacer> <property name="orientation"> @@ -33,6 +66,19 @@ </property> </spacer> </item> + <item row="0" column="9"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> <item row="1" column="0" colspan="3"> <widget class="QCheckBox" name="antialias"> <property name="text"> @@ -56,19 +102,6 @@ </property> </spacer> </item> - <item row="0" column="0"> - <widget class="QLabel" name="familyLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Family:</string> - </property> - </widget> - </item> <item row="0" column="8"> <widget class="QSpinBox" name="zoomSpinBox"> <property name="suffix"> @@ -88,25 +121,8 @@ </property> </widget> </item> - <item row="0" column="7"> - <widget class="QLabel" name="zoomLabel"> - <property name="text"> - <string>Zoom:</string> - </property> - </widget> - </item> - <item row="0" column="4"> - <widget class="QLabel" name="sizeLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Size:</string> - </property> - </widget> + <item row="0" column="1"> + <widget class="QFontComboBox" name="fontComboBox"/> </item> <item row="0" column="5"> <widget class="QComboBox" name="sizeComboBox"> @@ -118,22 +134,6 @@ </property> </widget> </item> - <item row="0" column="9"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="0" column="1"> - <widget class="QFontComboBox" name="fontComboBox"/> - </item> </layout> </widget> </item> @@ -142,39 +142,35 @@ <property name="title"> <string>Color Scheme</string> </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QComboBox" name="schemeComboBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>1</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="copyButton"> - <property name="text"> - <string>Copy...</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="deleteButton"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Delete</string> - </property> - </widget> - </item> - </layout> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <widget class="QComboBox" name="schemeComboBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>1</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QPushButton" name="copyButton"> + <property name="text"> + <string>Copy...</string> + </property> + </widget> </item> - <item> + <item row="0" column="2"> + <widget class="QPushButton" name="deleteButton"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Delete</string> + </property> + </widget> + </item> + <item row="1" column="0" colspan="3"> <widget class="TextEditor::Internal::ColorSchemeEdit" name="schemeEdit" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding"> |