Renamed function
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
8f9bd9617f
commit
0008b22d8b
@ -927,7 +927,7 @@ void MainWindow::onCatToggled(bool state)
|
||||
|
||||
void MainWindow::setCatBackground(bool enabled)
|
||||
{
|
||||
view->setCatVisible(enabled);
|
||||
view->setPaintCat(enabled);
|
||||
view->viewport()->repaint();
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ InstanceView::InstanceView(QWidget *parent)
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
setAcceptDrops(true);
|
||||
setAutoScroll(true);
|
||||
setCatVisible(APPLICATION->settings()->get("TheCat").toBool());
|
||||
setPaintCat(APPLICATION->settings()->get("TheCat").toBool());
|
||||
}
|
||||
|
||||
InstanceView::~InstanceView()
|
||||
@ -500,10 +500,13 @@ void InstanceView::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
void InstanceView::setCatVisible(bool visible)
|
||||
void InstanceView::setPaintCat(bool visible)
|
||||
{
|
||||
m_catVisible = visible;
|
||||
m_catPixmap.load(QString(":/backgrounds/%1").arg(ThemeManager::getCatImage()));
|
||||
if (visible)
|
||||
m_catPixmap.load(QString(":/backgrounds/%1").arg(ThemeManager::getCatImage()));
|
||||
else
|
||||
m_catPixmap = QPixmap();
|
||||
}
|
||||
|
||||
void InstanceView::paintEvent(QPaintEvent* event)
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
virtual QRegion visualRegionForSelection(const QItemSelection &selection) const override;
|
||||
|
||||
int spacing() const { return m_spacing; };
|
||||
void setCatVisible(bool visible);
|
||||
void setPaintCat(bool visible);
|
||||
|
||||
public slots:
|
||||
virtual void updateGeometries() override;
|
||||
|
Loading…
Reference in New Issue
Block a user