AddressBar: Expand suggestion popup to the window

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
remotes/origin/kf6
Juraj Oravec 3 years ago
parent d50eb6e822
commit d455ccd193
No known key found for this signature in database
GPG Key ID: 13660A3F1D9F093B
  1. 5
      src/lib/navigation/completer/locationcompleter.cpp
  2. 1
      src/lib/other/qzsettings.cpp
  3. 1
      src/lib/other/qzsettings.h
  4. 2
      src/lib/preferences/preferences.cpp
  5. 7
      src/lib/preferences/preferences.ui

@ -400,6 +400,11 @@ void LocationCompleter::showPopup()
QRect popupRect(m_locationBar->mapToGlobal(m_locationBar->pos()), m_locationBar->size());
popupRect.setY(popupRect.bottom());
if (qzSettings->completionPopupExpandToWindow) {
popupRect.setX(m_window->mapToGlobal(QPoint(0,0)).x());
popupRect.setWidth(m_window->size().width());
}
s_view->setGeometry(popupRect);
s_view->setFocusProxy(m_locationBar);
s_view->setCurrentIndex(QModelIndex());

@ -35,6 +35,7 @@ void QzSettings::loadSettings()
alwaysShowGoIcon = settings.value("alwaysShowGoIcon", false).toBool();
useInlineCompletion = settings.value("useInlineCompletion", true).toBool();
showZoomLabel = settings.value("showZoomLabel", true).toBool();
completionPopupExpandToWindow = settings.value("CompletionPopupExpandToWindow", false).toBool();
settings.endGroup();
settings.beginGroup("SearchEngines");

@ -40,6 +40,7 @@ public:
bool alwaysShowGoIcon;
bool useInlineCompletion;
bool showZoomLabel;
bool completionPopupExpandToWindow;
// SearchEngines
bool searchOnEngineChange;

@ -252,6 +252,7 @@ Preferences::Preferences(BrowserWindow* window)
ui->showZoomLabel->setChecked(settings.value("showZoomLabel", true).toBool());
ui->selectAllOnFocus->setChecked(settings.value("SelectAllTextOnDoubleClick", true).toBool());
ui->selectAllOnClick->setChecked(settings.value("SelectAllTextOnClick", false).toBool());
ui->completionPopupExpandToWindow->setChecked(settings.value("CompletionPopupExpandToWindow", false).toBool());
bool showPBinAB = settings.value("ShowLoadingProgress", false).toBool();
ui->showLoadingInAddressBar->setChecked(showPBinAB);
ui->adressProgressSettings->setEnabled(showPBinAB);
@ -1032,6 +1033,7 @@ void Preferences::saveSettings()
settings.setValue("showSwitchTab", ui->completionShowSwitchTab->isChecked());
settings.setValue("SelectAllTextOnDoubleClick", ui->selectAllOnFocus->isChecked());
settings.setValue("SelectAllTextOnClick", ui->selectAllOnClick->isChecked());
settings.setValue("CompletionPopupExpandToWindow", ui->completionPopupExpandToWindow->isChecked());
settings.setValue("ShowLoadingProgress", ui->showLoadingInAddressBar->isChecked());
settings.setValue("ProgressStyle", ui->progressStyleSelector->currentIndex());
settings.setValue("UseCustomProgressColor", ui->checkBoxCustomProgressColor->isChecked());

@ -860,6 +860,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="completionPopupExpandToWindow">
<property name="text">
<string>Expand suggestion popup to window width</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_16">
<property name="orientation">

Loading…
Cancel
Save