// Set the default label text.
findTextLabelPointer->setText(QLatin1String(" ") + i18nc("Default find results.", "0/0") + QLatin1String(" "));
+ // Create the spacer widgets.
+ QWidget *blockedRequestsInitialSpacerWidgetPointer = new QWidget();
+ QWidget *blockedRequestsFinalSpacerWidgetPointer = new QWidget();
+ QWidget *findTextSpacerWidgetPointer = new QWidget();
+
+ // Set the widths for the spacer widgets.
+ blockedRequestsInitialSpacerWidgetPointer->setFixedSize(3, 0);
+ blockedRequestsFinalSpacerWidgetPointer->setFixedSize(2, 0);
+ findTextSpacerWidgetPointer->setFixedSize(2, 0);
+
// Insert the widgets into the toolbars.
urlToolBarPointer->insertWidget(blockedRequestsActionPointer, urlLineEditPointer);
+ urlToolBarPointer->insertWidget(blockedRequestsActionPointer, blockedRequestsInitialSpacerWidgetPointer);
+ urlToolBarPointer->insertWidget(javaScriptActionPointer, blockedRequestsFinalSpacerWidgetPointer);
findTextLineEditActionPointer = urlToolBarPointer->insertWidget(findNextActionPointer, findTextLineEditPointer);
findTextLabelActionPointer = urlToolBarPointer->insertWidget(findNextActionPointer, findTextLabelPointer);
+ findTextSpacerActionPointer = urlToolBarPointer->insertWidget(findTextLineEditActionPointer, findTextSpacerWidgetPointer);
// Initially hide the find text actions.
hideFindTextActions();
void BrowserWindow::hideFindTextActions() const
{
// Hide the find text actions.
+ findTextSpacerActionPointer->setVisible(false);
findTextLineEditActionPointer->setVisible(false);
findTextLabelActionPointer->setVisible(false);
findNextActionPointer->setVisible(false);
void BrowserWindow::showFindTextActions() const
{
// Show the find text actions.
+ findTextSpacerActionPointer->setVisible(true);
findTextLineEditActionPointer->setVisible(true);
findTextLabelActionPointer->setVisible(true);
findNextActionPointer->setVisible(true);
/* SPDX-License-Identifier: GPL-3.0-or-later
- * SPDX-FileCopyrightText: 2022-2024 Soren Stoutner <soren@stoutner.com>
+ * SPDX-FileCopyrightText: 2022-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
*
QLabel *findTextLabelPointer;
QAction *findTextLineEditActionPointer;
KLineEdit *findTextLineEditPointer;
+ QAction *findTextSpacerActionPointer;
KToggleFullScreenAction *fullScreenActionPointer;
QAction *hideFindTextActionPointer;
QAction *javaScriptActionPointer;