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