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

Use light color for text in popup widgets even with Ambiance theme

- popups when clicking on site icon, rss icon, bookmark (star) icon
This commit is contained in:
nowrep 2011-12-27 17:49:51 +01:00
parent 695dee07ab
commit 168816ac65
6 changed files with 21 additions and 0 deletions

View File

@ -34,6 +34,13 @@ BookmarksWidget::BookmarksWidget(int bookmarkId, QWidget* parent)
m_bookmarksModel = mApp->bookmarksModel();
loadBookmark();
// Use light color for QLabels even with Ubuntu Ambiance theme
QPalette pal = palette();
pal.setColor(QPalette::WindowText, QToolTip::palette().color(QPalette::ToolTipText));
ui->label_2->setPalette(pal);
ui->label_3->setPalette(pal);
ui->label_4->setPalette(pal);
}
void BookmarksWidget::loadBookmark()

View File

@ -28,6 +28,7 @@
#include <QDebug>
#include <QSqlQuery>
#include <QSqlError>
#include <QToolTip>
namespace Ui
{

View File

@ -32,6 +32,11 @@ RSSWidget::RSSWidget(WebView* view, QWidget* parent)
QWebFrame* frame = m_view->page()->mainFrame();
QWebElementCollection links = frame->findAllElements("link[type=\"application/rss+xml\"]");
// Use light color for QLabels even with Ubuntu Ambiance theme
QPalette pal = palette();
pal.setColor(QPalette::WindowText, QToolTip::palette().color(QPalette::ToolTipText));
ui->label_2->setPalette(pal);
for (int i = 0; i < links.count(); i++) {
QWebElement element = links.at(i);
QString title = element.attribute("title");
@ -49,6 +54,7 @@ RSSWidget::RSSWidget(WebView* view, QWidget* parent)
button->setWhatsThis(href);
button->setToolTip(title);
QLabel* label = new QLabel(this);
label->setPalette(pal);
label->setText(title);
ui->gridLayout->addWidget(label, i, 0);
ui->gridLayout->addWidget(button, i, 1);

View File

@ -23,6 +23,7 @@
#include <QPushButton>
#include <QDebug>
#include <QWebFrame>
#include <QToolTip>
namespace Ui
{

View File

@ -71,6 +71,11 @@ SiteInfoWidget::SiteInfoWidget(QupZilla* mainClass, QWidget* parent)
}
}
connect(ui->pushButton, SIGNAL(clicked()), p_QupZilla, SLOT(showPageInfo()));
QPalette pal = palette();
pal.setColor(QPalette::WindowText, QToolTip::palette().color(QPalette::ToolTipText));
ui->historyLabel->setPalette(pal);
ui->secureLabel->setPalette(pal);
}
void SiteInfoWidget::showAt(QWidget* _parent)

View File

@ -20,6 +20,7 @@
#include <QWidget>
#include <QMenu>
#include <QToolTip>
namespace Ui
{