mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
HighDpi: Save site icons to database with 32x32px size
This commit is contained in:
parent
374af4277a
commit
35fd959315
@ -341,7 +341,7 @@ void LocationBar::showUrl(const QUrl &url)
|
|||||||
void LocationBar::updateSiteIcon()
|
void LocationBar::updateSiteIcon()
|
||||||
{
|
{
|
||||||
const QIcon icon = m_webView ? m_webView->icon() : IconProvider::emptyWebIcon();
|
const QIcon icon = m_webView ? m_webView->icon() : IconProvider::emptyWebIcon();
|
||||||
m_siteIcon->setIcon(QIcon(icon.pixmap(16, 16)));
|
m_siteIcon->setIcon(QIcon(icon.pixmap(16)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocationBar::setPrivacyState(bool state)
|
void LocationBar::setPrivacyState(bool state)
|
||||||
|
@ -382,8 +382,8 @@ QString NavigationBar::titleForUrl(QString title, const QUrl &url)
|
|||||||
QIcon NavigationBar::iconForPage(const QUrl &url, const QIcon &sIcon)
|
QIcon NavigationBar::iconForPage(const QUrl &url, const QIcon &sIcon)
|
||||||
{
|
{
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
icon.addPixmap(url.scheme() == QL1S("qupzilla") ? QIcon(QSL(":icons/qupzilla.png")).pixmap(16, 16) : IconProvider::iconForUrl(url).pixmap(16, 16));
|
icon.addPixmap(url.scheme() == QL1S("qupzilla") ? QIcon(QSL(":icons/qupzilla.png")).pixmap(16) : IconProvider::iconForUrl(url).pixmap(16));
|
||||||
icon.addPixmap(sIcon.pixmap(16, 16), QIcon::Active);
|
icon.addPixmap(sIcon.pixmap(16), QIcon::Active);
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ void SiteIcon::mouseMoveEvent(QMouseEvent* e)
|
|||||||
QMimeData* mime = new QMimeData;
|
QMimeData* mime = new QMimeData;
|
||||||
mime->setUrls(QList<QUrl>() << url);
|
mime->setUrls(QList<QUrl>() << url);
|
||||||
mime->setText(title);
|
mime->setText(title);
|
||||||
mime->setImageData(icon().pixmap(16, 16).toImage());
|
mime->setImageData(icon().pixmap(16).toImage());
|
||||||
|
|
||||||
drag->setMimeData(mime);
|
drag->setMimeData(mime);
|
||||||
drag->setPixmap(QzTools::createPixmapForSite(icon(), title, url.toString()));
|
drag->setPixmap(QzTools::createPixmapForSite(icon(), title, url.toString()));
|
||||||
|
@ -86,7 +86,7 @@ QIcon EditSearchEngine::icon()
|
|||||||
|
|
||||||
void EditSearchEngine::setIcon(const QIcon &icon)
|
void EditSearchEngine::setIcon(const QIcon &icon)
|
||||||
{
|
{
|
||||||
ui->icon->setPixmap(icon.pixmap(16, 16));
|
ui->icon->setPixmap(icon.pixmap(16));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditSearchEngine::hideIconLabels()
|
void EditSearchEngine::hideIconLabels()
|
||||||
|
@ -32,7 +32,7 @@ class QUPZILLA_EXPORT PopupSiteIcon : public QWidget
|
|||||||
public:
|
public:
|
||||||
explicit PopupSiteIcon(QWidget* parent = 0) : QWidget(parent) { }
|
explicit PopupSiteIcon(QWidget* parent = 0) : QWidget(parent) { }
|
||||||
void setIcon(const QIcon &icon) {
|
void setIcon(const QIcon &icon) {
|
||||||
m_icon = QIcon(icon.pixmap(16, 16));
|
m_icon = QIcon(icon.pixmap(16));
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ TabBar::TabBar(BrowserWindow* window, TabWidget* tabWidget)
|
|||||||
if (mApp->isPrivate()) {
|
if (mApp->isPrivate()) {
|
||||||
QLabel* privateBrowsing = new QLabel(this);
|
QLabel* privateBrowsing = new QLabel(this);
|
||||||
privateBrowsing->setObjectName(QSL("private-browsing-icon"));
|
privateBrowsing->setObjectName(QSL("private-browsing-icon"));
|
||||||
privateBrowsing->setPixmap(IconProvider::privateBrowsingIcon().pixmap(16, 16));
|
privateBrowsing->setPixmap(IconProvider::privateBrowsingIcon().pixmap(16));
|
||||||
privateBrowsing->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
privateBrowsing->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||||
privateBrowsing->setFixedWidth(30);
|
privateBrowsing->setFixedWidth(30);
|
||||||
addCornerWidget(privateBrowsing, Qt::TopLeftCorner);
|
addCornerWidget(privateBrowsing, Qt::TopLeftCorner);
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const Item &a) {
|
bool operator==(const Item &a) {
|
||||||
return (a.text == text) && (a.icon.pixmap(16, 16).toImage() == icon.pixmap(16, 16).toImage());
|
return (a.text == text) && (a.icon.pixmap(16).toImage() == icon.pixmap(16).toImage());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isEmpty() {
|
bool isEmpty() {
|
||||||
|
@ -22,7 +22,7 @@ DockTitleBarWidget::DockTitleBarWidget(const QString &title, QWidget* parent)
|
|||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
closeButton->setIcon(QIcon(IconProvider::standardIcon(QStyle::SP_DialogCloseButton).pixmap(16, 16)));
|
closeButton->setIcon(QIcon(IconProvider::standardIcon(QStyle::SP_DialogCloseButton).pixmap(16)));
|
||||||
label->setText(title);
|
label->setText(title);
|
||||||
connect(closeButton, SIGNAL(clicked()), parent, SLOT(close()));
|
connect(closeButton, SIGNAL(clicked()), parent, SLOT(close()));
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ void IconProvider::saveIcon(WebView* view)
|
|||||||
|
|
||||||
BufferedIcon item;
|
BufferedIcon item;
|
||||||
item.first = view->url();
|
item.first = view->url();
|
||||||
item.second = view->icon().pixmap(16, 16).toImage();
|
item.second = view->icon().pixmap(32).toImage();
|
||||||
|
|
||||||
if (item.second == IconProvider::emptyWebImage()) {
|
if (item.second == IconProvider::emptyWebImage()) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user