1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

HighDpi: Save site icons to database with 32x32px size

This commit is contained in:
David Rosca 2015-10-24 12:43:15 +02:00
parent 374af4277a
commit 35fd959315
9 changed files with 10 additions and 10 deletions

View File

@ -341,7 +341,7 @@ void LocationBar::showUrl(const QUrl &url)
void LocationBar::updateSiteIcon()
{
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)

View File

@ -382,8 +382,8 @@ QString NavigationBar::titleForUrl(QString title, const QUrl &url)
QIcon NavigationBar::iconForPage(const QUrl &url, const QIcon &sIcon)
{
QIcon icon;
icon.addPixmap(url.scheme() == QL1S("qupzilla") ? QIcon(QSL(":icons/qupzilla.png")).pixmap(16, 16) : IconProvider::iconForUrl(url).pixmap(16, 16));
icon.addPixmap(sIcon.pixmap(16, 16), QIcon::Active);
icon.addPixmap(url.scheme() == QL1S("qupzilla") ? QIcon(QSL(":icons/qupzilla.png")).pixmap(16) : IconProvider::iconForUrl(url).pixmap(16));
icon.addPixmap(sIcon.pixmap(16), QIcon::Active);
return icon;
}

View File

@ -142,7 +142,7 @@ void SiteIcon::mouseMoveEvent(QMouseEvent* e)
QMimeData* mime = new QMimeData;
mime->setUrls(QList<QUrl>() << url);
mime->setText(title);
mime->setImageData(icon().pixmap(16, 16).toImage());
mime->setImageData(icon().pixmap(16).toImage());
drag->setMimeData(mime);
drag->setPixmap(QzTools::createPixmapForSite(icon(), title, url.toString()));

View File

@ -86,7 +86,7 @@ QIcon EditSearchEngine::icon()
void EditSearchEngine::setIcon(const QIcon &icon)
{
ui->icon->setPixmap(icon.pixmap(16, 16));
ui->icon->setPixmap(icon.pixmap(16));
}
void EditSearchEngine::hideIconLabels()

View File

@ -32,7 +32,7 @@ class QUPZILLA_EXPORT PopupSiteIcon : public QWidget
public:
explicit PopupSiteIcon(QWidget* parent = 0) : QWidget(parent) { }
void setIcon(const QIcon &icon) {
m_icon = QIcon(icon.pixmap(16, 16));
m_icon = QIcon(icon.pixmap(16));
update();
}

View File

@ -69,7 +69,7 @@ TabBar::TabBar(BrowserWindow* window, TabWidget* tabWidget)
if (mApp->isPrivate()) {
QLabel* privateBrowsing = new QLabel(this);
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->setFixedWidth(30);
addCornerWidget(privateBrowsing, Qt::TopLeftCorner);

View File

@ -38,7 +38,7 @@ public:
}
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() {

View File

@ -22,7 +22,7 @@ DockTitleBarWidget::DockTitleBarWidget(const QString &title, QWidget* parent)
: QWidget(parent)
{
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);
connect(closeButton, SIGNAL(clicked()), parent, SLOT(close()));

View File

@ -49,7 +49,7 @@ void IconProvider::saveIcon(WebView* view)
BufferedIcon item;
item.first = view->url();
item.second = view->icon().pixmap(16, 16).toImage();
item.second = view->icon().pixmap(32).toImage();
if (item.second == IconProvider::emptyWebImage()) {
return;