mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-13 10:32:11 +01:00
TabsOnTop: Fixed picking correct color for drawing line at the bottom of
navigation container.
This commit is contained in:
parent
b4b1ce03d6
commit
7fae03959d
|
@ -1580,6 +1580,9 @@ void QupZilla::triggerTabsOnTop(bool enable)
|
||||||
m_mainLayout->insertWidget(0, m_navigationContainer);
|
m_mainLayout->insertWidget(0, m_navigationContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Settings settings;
|
||||||
|
settings.setValue("Browser-Tabs-Settings/TabsOnTop", enable);
|
||||||
|
|
||||||
qzSettings->tabsOnTop = enable;
|
qzSettings->tabsOnTop = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,12 +17,13 @@
|
||||||
* ============================================================ */
|
* ============================================================ */
|
||||||
#include "navigationcontainer.h"
|
#include "navigationcontainer.h"
|
||||||
#include "qzsettings.h"
|
#include "qzsettings.h"
|
||||||
|
#include "qupzilla.h"
|
||||||
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QStyleOptionFrameV3>
|
|
||||||
|
|
||||||
NavigationContainer::NavigationContainer(QWidget* parent)
|
NavigationContainer::NavigationContainer(QupZilla* parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
|
, p_QupZilla(parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,11 +34,9 @@ void NavigationContainer::paintEvent(QPaintEvent* event)
|
||||||
if (qzSettings->tabsOnTop) {
|
if (qzSettings->tabsOnTop) {
|
||||||
// Draw line at the bottom of navigation bar if tabs are on top
|
// Draw line at the bottom of navigation bar if tabs are on top
|
||||||
// To visually distinguish navigation bar from the page
|
// To visually distinguish navigation bar from the page
|
||||||
QStyleOptionFrameV3 option;
|
|
||||||
option.initFrom(this);
|
|
||||||
|
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
QRect lineRect(0, height() - 1, width(), 1);
|
QRect lineRect(0, height() - 1, width(), 1);
|
||||||
p.fillRect(lineRect, option.palette.window().color().darker(150));
|
QColor c = p_QupZilla->palette().window().color().darker(125);
|
||||||
|
p.fillRect(lineRect, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,14 +22,18 @@
|
||||||
|
|
||||||
#include "qzsettings.h"
|
#include "qzsettings.h"
|
||||||
|
|
||||||
|
class QupZilla;
|
||||||
|
|
||||||
class QT_QUPZILLA_EXPORT NavigationContainer : public QWidget
|
class QT_QUPZILLA_EXPORT NavigationContainer : public QWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit NavigationContainer(QWidget* parent = 0);
|
explicit NavigationContainer(QupZilla* parent = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void paintEvent(QPaintEvent* event);
|
void paintEvent(QPaintEvent* event);
|
||||||
|
|
||||||
|
QupZilla* p_QupZilla;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NAVIGATIONCONTAINER_H
|
#endif // NAVIGATIONCONTAINER_H
|
||||||
|
|
|
@ -65,10 +65,6 @@ void QzSettings::saveSettings()
|
||||||
settings.setValue("AutomaticallyOpenProtocols", autoOpenProtocols);
|
settings.setValue("AutomaticallyOpenProtocols", autoOpenProtocols);
|
||||||
settings.setValue("BlockOpeningProtocols", blockedProtocols);
|
settings.setValue("BlockOpeningProtocols", blockedProtocols);
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
settings.beginGroup("Browser-Tabs-Settings");
|
|
||||||
settings.setValue("TabsOnTop", tabsOnTop);
|
|
||||||
settings.endGroup();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user