mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Reduced spacing in navigation bar and bookmarks toolbar.
- So also KDE users can be happy once again :-)
This commit is contained in:
parent
af2add1a19
commit
a85d975093
@ -171,8 +171,7 @@
|
||||
#bookmarksbar QToolButton
|
||||
{
|
||||
border-image: url(images/transp.png);
|
||||
border-width: 1px;
|
||||
padding-right: -5px;
|
||||
border-width: 0px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
|
@ -209,8 +209,7 @@
|
||||
#bookmarksbar QToolButton
|
||||
{
|
||||
border-image: url(images/transp.png);
|
||||
border-width: 1px;
|
||||
padding-right: -5px;
|
||||
border-width: 0px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
|
@ -161,8 +161,7 @@
|
||||
#bookmarksbar QToolButton
|
||||
{
|
||||
border-image: url(images/transp.png);
|
||||
border-width: 1px;
|
||||
padding-right: -5px;
|
||||
border-width: 0px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
|
@ -165,8 +165,7 @@
|
||||
#bookmarksbar QToolButton
|
||||
{
|
||||
border-image: url(images/transp.png);
|
||||
border-width: 1px;
|
||||
padding-right: -5px;
|
||||
border-width: 0px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
|
@ -175,8 +175,7 @@
|
||||
#bookmarksbar QToolButton
|
||||
{
|
||||
border-image: url(images/transp.png);
|
||||
border-width: 1px;
|
||||
padding-right: -5px;
|
||||
border-width: 0px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
|
@ -57,8 +57,10 @@ AdBlockNetwork::AdBlockNetwork(QObject* parent)
|
||||
|
||||
QNetworkReply* AdBlockNetwork::block(const QNetworkRequest &request)
|
||||
{
|
||||
QUrl url = request.url();
|
||||
if (url.scheme() == "data" || url.scheme() == "qrc" || url.scheme() == "file" || url.scheme() == "qupzilla") {
|
||||
const QString &urlString = request.url().toEncoded();
|
||||
const QString &urlScheme = request.url().scheme();
|
||||
|
||||
if (urlScheme == "data" || urlScheme == "qrc" || urlScheme == "file" || urlScheme == "qupzilla") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -67,7 +69,6 @@ QNetworkReply* AdBlockNetwork::block(const QNetworkRequest &request)
|
||||
return 0;
|
||||
}
|
||||
|
||||
QString urlString = url.toEncoded();
|
||||
const AdBlockRule* blockedRule = 0;
|
||||
AdBlockSubscription* subscription = manager->subscription();
|
||||
|
||||
|
@ -44,7 +44,7 @@ BookmarksToolbar::BookmarksToolbar(QupZilla* mainClass, QWidget* parent)
|
||||
{
|
||||
setObjectName("bookmarksbar");
|
||||
m_layout = new QHBoxLayout();
|
||||
m_layout->setContentsMargins(9, 3, 9, 3);
|
||||
m_layout->setMargin(3);
|
||||
m_layout->setSpacing(0);
|
||||
setLayout(m_layout);
|
||||
|
||||
@ -339,7 +339,7 @@ void BookmarksToolbar::subfolderAdded(const QString &name)
|
||||
{
|
||||
ToolButton* b = new ToolButton(this);
|
||||
b->setPopupMode(QToolButton::InstantPopup);
|
||||
b->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
b->setToolButtonStyle(m_toolButtonStyle);
|
||||
b->setIcon(style()->standardIcon(QStyle::SP_DirIcon));
|
||||
b->setText(name);
|
||||
connect(b, SIGNAL(middleMouseClicked()), this, SLOT(loadFolderBookmarksInTabs()));
|
||||
@ -404,7 +404,7 @@ void BookmarksToolbar::addBookmark(const BookmarksModel::Bookmark &bookmark)
|
||||
button->setText(title);
|
||||
button->setData(v);
|
||||
button->setIcon(IconProvider::iconFromImage(bookmark.image));
|
||||
button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
button->setToolButtonStyle(m_toolButtonStyle);
|
||||
button->setToolTip(bookmark.url.toEncoded());
|
||||
button->setAutoRaise(true);
|
||||
button->setWhatsThis(bookmark.title);
|
||||
@ -504,7 +504,7 @@ void BookmarksToolbar::refreshBookmarks()
|
||||
button->setText(title);
|
||||
button->setData(v);
|
||||
button->setIcon(IconProvider::iconFromImage(bookmark.image));
|
||||
button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
button->setToolButtonStyle(m_toolButtonStyle);
|
||||
button->setToolTip(bookmark.url.toEncoded());
|
||||
button->setWhatsThis(bookmark.title);
|
||||
button->setAutoRaise(true);
|
||||
@ -521,7 +521,7 @@ void BookmarksToolbar::refreshBookmarks()
|
||||
while (query.next()) {
|
||||
ToolButton* b = new ToolButton(this);
|
||||
b->setPopupMode(QToolButton::InstantPopup);
|
||||
b->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
b->setToolButtonStyle(m_toolButtonStyle);
|
||||
b->setIcon(style()->standardIcon(QStyle::SP_DirIcon));
|
||||
b->setText(query.value(0).toString());
|
||||
connect(b, SIGNAL(middleMouseClicked()), this, SLOT(loadFolderBookmarksInTabs()));
|
||||
@ -535,7 +535,7 @@ void BookmarksToolbar::refreshBookmarks()
|
||||
|
||||
m_mostVis = new ToolButton(this);
|
||||
m_mostVis->setPopupMode(QToolButton::InstantPopup);
|
||||
m_mostVis->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
m_mostVis->setToolButtonStyle(m_toolButtonStyle);
|
||||
m_mostVis->setIcon(style()->standardIcon(QStyle::SP_DirIcon));
|
||||
m_mostVis->setText(tr("Most visited"));
|
||||
m_mostVis->setToolTip(tr("Sites you visited the most"));
|
||||
@ -593,9 +593,9 @@ void BookmarksToolbar::dragEnterEvent(QDragEnterEvent* e)
|
||||
|
||||
void BookmarksToolbar::showOnlyIconsChanged()
|
||||
{
|
||||
Qt::ToolButtonStyle iconStyle = Qt::ToolButtonTextBesideIcon;
|
||||
m_toolButtonStyle = Qt::ToolButtonTextBesideIcon;
|
||||
if (m_bookmarksModel->isShowingOnlyIconsInToolbar()) {
|
||||
iconStyle = Qt::ToolButtonIconOnly;
|
||||
m_toolButtonStyle = Qt::ToolButtonIconOnly;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_layout->count(); ++i) {
|
||||
@ -604,7 +604,7 @@ void BookmarksToolbar::showOnlyIconsChanged()
|
||||
continue;
|
||||
}
|
||||
|
||||
button->setToolButtonStyle(iconStyle);
|
||||
button->setToolButtonStyle(m_toolButtonStyle);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,8 @@ private:
|
||||
Menu* m_menuMostVisited;
|
||||
ToolButton* m_mostVis;
|
||||
QHBoxLayout* m_layout;
|
||||
|
||||
Qt::ToolButtonStyle m_toolButtonStyle;
|
||||
};
|
||||
|
||||
#endif // BOOKMARKSTOOLBAR_H
|
||||
|
@ -54,7 +54,8 @@ NavigationBar::NavigationBar(QupZilla* mainClass, QWidget* parent)
|
||||
{
|
||||
setObjectName("navigationbar");
|
||||
m_layout = new QHBoxLayout(this);
|
||||
m_layout->setContentsMargins(9, 3, 9, 3);
|
||||
m_layout->setMargin(3);
|
||||
m_layout->setSpacing(3);
|
||||
setLayout(m_layout);
|
||||
|
||||
m_buttonBack = new ToolButton(this);
|
||||
|
@ -323,7 +323,7 @@ QNetworkReply* NetworkManager::createRequest(QNetworkAccessManager::Operation op
|
||||
QNetworkReply* reply = 0;
|
||||
|
||||
if (m_doNotTrack) {
|
||||
req.setRawHeader("DNT", "1");
|
||||
req.setRawHeader("DNT", QByteArray("1"));
|
||||
}
|
||||
|
||||
if (!m_sendReferer) {
|
||||
|
Loading…
Reference in New Issue
Block a user