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

Ability to remove sweb search bar, as per #440

This commit is contained in:
Mladen Pejaković 2012-07-19 19:56:58 +02:00
parent e41853842a
commit 6797f19b86
3 changed files with 28 additions and 17 deletions

View File

@ -566,6 +566,7 @@ void QupZilla::loadSettings()
settings.beginGroup("Browser-View-Settings");
bool showStatusBar = settings.value("showStatusBar", true).toBool();
bool showHomeIcon = settings.value("showHomeButton", true).toBool();
bool showWebSearchBar = settings.value("showWebSearchBar", true).toBool();
bool showBackForwardIcons = settings.value("showBackForwardButtons", true).toBool();
bool showBookmarksToolbar = settings.value("showBookmarksToolbar", true).toBool();
bool showNavigationToolbar = settings.value("showNavigationToolbar", true).toBool();
@ -591,6 +592,7 @@ void QupZilla::loadSettings()
m_navigationBar->buttonHome()->setVisible(showHomeIcon);
m_navigationBar->buttonBack()->setVisible(showBackForwardIcons);
m_navigationBar->buttonNext()->setVisible(showBackForwardIcons);
m_navigationBar->searchLine()->setVisible(showWebSearchBar);
m_navigationBar->buttonAddTab()->setVisible(showAddTab);
m_sideBarManager->showSideBar(activeSideBar, false);

View File

@ -152,6 +152,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
ui->showHome->setChecked(settings.value("showHomeButton", true).toBool());
ui->showBackForward->setChecked(settings.value("showBackForwardButtons", true).toBool());
ui->showAddTabButton->setChecked(settings.value("showAddTabButton", false).toBool());
ui->showWebSearchBar->setChecked(settings.value("showWebSearchBar", true).toBool());
ui->useTransparentBg->setChecked(settings.value("useTransparentBackground", false).toBool());
settings.endGroup();
#ifdef Q_WS_WIN
@ -762,6 +763,7 @@ void Preferences::saveSettings()
settings.setValue("showNavigationToolbar", ui->showNavigationToolbar->isChecked());
settings.setValue("showHomeButton", ui->showHome->isChecked());
settings.setValue("showBackForwardButtons", ui->showBackForward->isChecked());
settings.setValue("showWebSearchBar", ui->showWebSearchBar->isChecked());
settings.setValue("useTransparentBackground", ui->useTransparentBg->isChecked());
settings.setValue("showAddTabButton", ui->showAddTabButton->isChecked());
settings.endGroup();

View File

@ -495,6 +495,19 @@
</property>
</spacer>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_2">
<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="1">
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
@ -520,19 +533,6 @@
</item>
</layout>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_2">
<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="2" column="0" colspan="2">
<widget class="QLabel" name="label_8">
<property name="text">
@ -554,21 +554,21 @@
</property>
</widget>
</item>
<item row="5" column="1">
<item row="6" column="1">
<widget class="QCheckBox" name="showAddTabButton">
<property name="text">
<string>Show Add Tab button</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<item row="7" column="0" colspan="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>&lt;b&gt;Background&lt;b/&gt;</string>
</property>
</widget>
</item>
<item row="8" column="1">
<item row="9" column="1">
<spacer name="verticalSpacer_12">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -581,13 +581,20 @@
</property>
</spacer>
</item>
<item row="7" column="1">
<item row="8" column="1">
<widget class="QCheckBox" name="useTransparentBg">
<property name="text">
<string>Use transparent background</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="showWebSearchBar">
<property name="text">
<string>Show web search bar</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>