21 , appPalette(qApp->palette())
24 installEventFilter(
this);
25 QHBoxLayout *hboxLayout =
new QHBoxLayout(
this);
26 QString resourcePath =
":/qt-project.org/assistant/images/"_L1;
29 hboxLayout->setContentsMargins({});
30 hboxLayout->setSpacing(6);
31 resourcePath.append(
"win"_L1);
33 resourcePath.append(
"mac"_L1);
36 toolClose = setupToolButton({}, resourcePath +
"/closetab.png"_L1);
37 hboxLayout->addWidget(toolClose);
38 connect(toolClose, &QAbstractButton::clicked,
this, &QWidget::hide);
40 editFind =
new QLineEdit(
this);
41 hboxLayout->addWidget(editFind);
42 editFind->setMinimumSize(QSize(150, 0));
43 connect(editFind, &QLineEdit::textChanged,
this, &FindWidget::textChanged);
44 connect(editFind, &QLineEdit::returnPressed,
this, &FindWidget::findNext);
45 connect(editFind, &QLineEdit::textChanged,
this, &FindWidget::updateButtons);
47 toolPrevious = setupToolButton(tr(
"Previous"), resourcePath +
"/previous.png"_L1);
48 connect(toolPrevious, &QAbstractButton::clicked,
this, &FindWidget::findPrevious);
50 hboxLayout->addWidget(toolPrevious);
52 toolNext = setupToolButton(tr(
"Next"), resourcePath +
"/next.png"_L1);
53 hboxLayout->addWidget(toolNext);
54 connect(toolNext, &QAbstractButton::clicked,
this, &FindWidget::findNext);
56 checkCase =
new QCheckBox(tr(
"Case Sensitive"),
this);
57 hboxLayout->addWidget(checkCase);
59 labelWrapped =
new QLabel(
this);
60 labelWrapped->setScaledContents(
true);
61 labelWrapped->setTextFormat(Qt::RichText);
62 labelWrapped->setMinimumSize(QSize(0, 20));
63 labelWrapped->setMaximumSize(QSize(105, 20));
64 labelWrapped->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter);
65 labelWrapped->setText(tr(
"<img src=\":/qt-project.org/assistant/images/wrap.png\""
66 "> Search wrapped"));
67 hboxLayout->addWidget(labelWrapped);
69 QSpacerItem *spacerItem =
new QSpacerItem(20, 20, QSizePolicy::Expanding,
70 QSizePolicy::Minimum);
71 hboxLayout->addItem(spacerItem);
72 setMinimumWidth(minimumSizeHint().width());
140#if defined(BROWSER_QTWEBKIT)
142 if (!event->spontaneous()) {
143 QPalette p = appPalette;
144 p.setColor(QPalette::Inactive, QPalette::Highlight,
145 p.color(QPalette::Active, QPalette::Highlight));
146 p.setColor(QPalette::Inactive, QPalette::HighlightedText,
147 p.color(QPalette::Active, QPalette::HighlightedText));