1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

ZoomLabel - Show only when configured to show

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2023-07-16 15:34:13 +02:00
parent d455ccd193
commit 695f3ba802
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B
3 changed files with 7 additions and 1 deletions

View File

@ -373,7 +373,7 @@ void LocationBar::setGoIconVisible(bool state)
}
else {
m_bookmarkIcon->show();
m_zoomlabel->show();
m_zoomlabel->requestShow();
if (!qzSettings->alwaysShowGoIcon) {
m_goIcon->hide();

View File

@ -49,6 +49,11 @@ void ZoomLabel::setWebView(WebView* view)
valueChanged(m_view->zoomLevel());
}
void ZoomLabel::requestShow()
{
valueChanged(m_view->zoomLevel());
}
void ZoomLabel::valueChanged(int value)
{
if ((m_view) && (value != qzSettings->defaultZoomLevel) && (qzSettings->showZoomLabel)) {

View File

@ -32,6 +32,7 @@ public:
explicit ZoomLabel(LocationBar* parent);
void setWebView(WebView* view);
void requestShow();
protected:
void paintEvent(QPaintEvent* e) override;