mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed color of text in labels in SiteInfo/Bookmarks/RSS urlbar popup.
- using tooltip text color with gtk+ and besping styles
This commit is contained in:
parent
2d5b0c0bc0
commit
5cf6b1c565
@ -53,6 +53,14 @@ BookmarksWidget::BookmarksWidget(QupZilla* mainClass, WebView* view, QWidget* pa
|
||||
tr("Remove from Speed Dial"));
|
||||
|
||||
loadBookmark();
|
||||
|
||||
if (mApp->currentStyle() == "gtk+" || mApp->currentStyle() == "bespin") {
|
||||
// Use light color for QLabels with problematic styles
|
||||
QPalette pal = palette();
|
||||
pal.setColor(QPalette::WindowText, QToolTip::palette().color(QPalette::ToolTipText));
|
||||
ui->label->setPalette(pal);
|
||||
ui->label_2->setPalette(pal);
|
||||
}
|
||||
}
|
||||
|
||||
void BookmarksWidget::loadBookmark()
|
||||
|
@ -34,13 +34,6 @@ RSSWidget::RSSWidget(WebView* view, QWidget* parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
#ifndef KDE
|
||||
// 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);
|
||||
#endif
|
||||
|
||||
QWebFrame* frame = m_view->page()->mainFrame();
|
||||
QWebElementCollection links = frame->findAllElements("link[type=\"application/rss+xml\"]");
|
||||
|
||||
@ -61,14 +54,19 @@ RSSWidget::RSSWidget(WebView* view, QWidget* parent)
|
||||
button->setToolTip(title);
|
||||
button->setProperty("rss-url", url);
|
||||
QLabel* label = new QLabel(this);
|
||||
#ifndef KDE
|
||||
label->setPalette(pal);
|
||||
#endif
|
||||
label->setText(title);
|
||||
|
||||
ui->gridLayout->addWidget(label, i, 0);
|
||||
ui->gridLayout->addWidget(button, i, 1);
|
||||
connect(button, SIGNAL(clicked()), this, SLOT(addRss()));
|
||||
|
||||
if (mApp->currentStyle() == "gtk+" || mApp->currentStyle() == "bespin") {
|
||||
// Use light color for QLabels with problematic styles
|
||||
QPalette pal = palette();
|
||||
pal.setColor(QPalette::WindowText, QToolTip::palette().color(QPalette::ToolTipText));
|
||||
ui->label_2->setPalette(pal);
|
||||
label->setPalette(pal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "siteinfowidget.h"
|
||||
#include "ui_siteinfowidget.h"
|
||||
#include "qupzilla.h"
|
||||
#include "mainapplication.h"
|
||||
#include "webpage.h"
|
||||
#include "tabbedwebview.h"
|
||||
|
||||
@ -80,13 +81,13 @@ SiteInfoWidget::SiteInfoWidget(QupZilla* mainClass, QWidget* parent)
|
||||
}
|
||||
connect(ui->pushButton, SIGNAL(clicked()), p_QupZilla, SLOT(showPageInfo()));
|
||||
|
||||
#ifndef KDE
|
||||
// Use light color for QLabels even with Ubuntu Ambiance theme
|
||||
if (mApp->currentStyle() == "gtk+" || mApp->currentStyle() == "bespin") {
|
||||
// Use light color for QLabels with problematic styles
|
||||
QPalette pal = palette();
|
||||
pal.setColor(QPalette::WindowText, QToolTip::palette().color(QPalette::ToolTipText));
|
||||
pal.setColor(QPalette::WindowText, QToolTip::palette().color(QPalette::Inactive, QPalette::ToolTipText));
|
||||
ui->historyLabel->setPalette(pal);
|
||||
ui->secureLabel->setPalette(pal);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void SiteInfoWidget::showAt(QWidget* _parent)
|
||||
|
Loading…
Reference in New Issue
Block a user