1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

Preferences: Hide spellcheck combobox when no languages were found

Also add link to wiki for more info about spellcheck.
This commit is contained in:
David Rosca 2016-10-26 10:40:34 +02:00
parent 4d9137a1d9
commit bb67d4e101
2 changed files with 46 additions and 4 deletions

View File

@ -424,6 +424,12 @@ Preferences::Preferences(BrowserWindow* window)
}
}
}
if (ui->spellcheckLanguage->count() == 0) {
ui->spellcheckLanguage->hide();
} else {
ui->spellcheckNoLanguages->hide();
}
#else
delete ui->listWidget->item(11);
delete ui->stackedWidget->widget(11);

View File

@ -2282,7 +2282,7 @@
</widget>
<widget class="QWidget" name="spellcheckPage">
<layout class="QGridLayout" name="gridLayout_20">
<item row="2" column="3">
<item row="2" column="4">
<spacer name="horizontalSpacer_16">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -2311,7 +2311,7 @@
<item row="2" column="2">
<widget class="QComboBox" name="spellcheckLanguage"/>
</item>
<item row="3" column="1">
<item row="5" column="1">
<spacer name="verticalSpacer_17">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -2324,20 +2324,56 @@
</property>
</spacer>
</item>
<item row="0" column="0" colspan="4">
<item row="0" column="0" colspan="5">
<widget class="QLabel" name="label_10">
<property name="text">
<string>&lt;b&gt;Spell Check&lt;/b&gt;</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<item row="2" column="3">
<widget class="QLabel" name="spellcheckNoLanguages">
<property name="text">
<string>No languages found</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="4">
<widget class="QCheckBox" name="spellcheckEnabled">
<property name="text">
<string>Enable Spell Check</string>
</property>
</widget>
</item>
<item row="3" column="2">
<spacer name="verticalSpacer_18">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>80</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="1" colspan="4">
<widget class="QLabel" name="label_40">
<property name="text">
<string>For more informations about Spell Check, please see &lt;a href=&quot;https://github.com/QupZilla/qupzilla/wiki/Spell-Check&quot;&gt;wiki&lt;/a&gt;.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="otherPage">