remove View config windows deprecated code

pull/18/head
Michail Vourlakos 5 years ago
parent ed226761f9
commit ba87b3b32b

@ -79,8 +79,6 @@ void CanvasConfigView::initParentView(Latte::View *view)
{
SubConfigView::initParentView(view);
viewconnections << connect(m_latteView->positioner(), &ViewPart::Positioner::canvasGeometryChanged, this, &CanvasConfigView::syncGeometry);
updateEnabledBorders();
syncGeometry();

@ -334,52 +334,9 @@ void PrimaryConfigView::syncGeometry()
setMinimumSize(size);
resize(size);
updateViewMask();
emit m_latteView->configWindowGeometryChanged();
}
void PrimaryConfigView::updateViewMask()
{
bool environmentState = (KWindowSystem::isPlatformX11() && KWindowSystem::compositingActive());
if (!environmentState) {
return;
}
int x, y, thickness, length;
QRegion area;
thickness = m_latteView->effects()->editShadow();
if (m_latteView->formFactor() == Plasma::Types::Vertical) {
length = m_geometryWhenVisible.height();
} else {
length = m_geometryWhenVisible.width();
}
if (m_latteView->formFactor() == Plasma::Types::Horizontal) {
x = m_geometryWhenVisible.x() - m_latteView->x();
} else {
y = m_geometryWhenVisible.y() - m_latteView->y();
}
if (m_latteView->location() == Plasma::Types::BottomEdge) {
y = m_latteView->height() - m_latteView->editThickness() - m_latteView->effects()->editShadow();
} else if (m_latteView->location() == Plasma::Types::TopEdge) {
y = m_latteView->editThickness();
} else if (m_latteView->location() == Plasma::Types::LeftEdge) {
x = m_latteView->editThickness();
} else if (m_latteView->location() == Plasma::Types::RightEdge) {
x = m_latteView->width() - m_latteView->editThickness() - m_latteView->effects()->editShadow();
}
if (m_latteView->formFactor() == Plasma::Types::Horizontal) {
area = QRect(x, y, length, thickness);
} else {
area = QRect(x, y, thickness, length);
}
}
void PrimaryConfigView::showEvent(QShowEvent *ev)
{
QQuickWindow::showEvent(ev);
@ -402,7 +359,6 @@ void PrimaryConfigView::showEvent(QShowEvent *ev)
QTimer::singleShot(400, this, &PrimaryConfigView::syncGeometry);
updateShowInlineProperties();
updateViewMask();
showCanvasWindow();

@ -137,8 +137,6 @@ private slots:
void setShowInlineProperties(bool show);
void updateViewMask();
void loadConfig();
void saveConfig();

@ -176,8 +176,6 @@ void SecondaryConfigView::syncGeometry()
setMinimumSize(size);
resize(size);
updateViewMask();
//! after placement request to activate the main config window in order to avoid
//! rare cases of closing settings window from secondaryConfigView->focusOutEvent
if (m_parent && KWindowSystem::isPlatformX11()) {
@ -185,48 +183,6 @@ void SecondaryConfigView::syncGeometry()
}
}
void SecondaryConfigView::updateViewMask()
{
bool environmentState = (KWindowSystem::isPlatformX11() && KWindowSystem::compositingActive());
if (!environmentState) {
return;
}
int x, y, thickness, length;
QRegion area;
thickness = m_latteView->effects()->editShadow();
if (m_latteView->formFactor() == Plasma::Types::Vertical) {
length = m_geometryWhenVisible.height();
} else {
length = m_geometryWhenVisible.width();
}
if (m_latteView->formFactor() == Plasma::Types::Horizontal) {
x = m_geometryWhenVisible.x() - m_latteView->x();
} else {
y = m_geometryWhenVisible.y() - m_latteView->y();
}
if (m_latteView->location() == Plasma::Types::BottomEdge) {
y = m_latteView->height() - m_latteView->editThickness() - m_latteView->effects()->editShadow();
} else if (m_latteView->location() == Plasma::Types::TopEdge) {
y = m_latteView->editThickness();
} else if (m_latteView->location() == Plasma::Types::LeftEdge) {
x = m_latteView->editThickness();
} else if (m_latteView->location() == Plasma::Types::RightEdge) {
x = m_latteView->width() - m_latteView->editThickness() - m_latteView->effects()->editShadow();
}
if (m_latteView->formFactor() == Plasma::Types::Horizontal) {
area = QRect(x, y, length, thickness);
} else {
area = QRect(x, y, thickness, length);
}
}
void SecondaryConfigView::showEvent(QShowEvent *ev)
{
QQuickWindow::showEvent(ev);
@ -244,7 +200,6 @@ void SecondaryConfigView::showEvent(QShowEvent *ev)
m_screenSyncTimer.start();
QTimer::singleShot(400, this, &SecondaryConfigView::syncGeometry);
updateViewMask();
emit showSignal();
}

@ -88,9 +88,6 @@ protected:
void initParentView(Latte::View *view) override;
void updateEnabledBorders() override;
private slots:
void updateViewMask();
private:
QRect m_geometryWhenVisible;

@ -84,12 +84,6 @@ SubConfigView::SubConfigView(Latte::View *view, const QString &title, const bool
syncGeometry();
syncSlideEffect();
});
m_thicknessSyncTimer.setSingleShot(true);
m_thicknessSyncTimer.setInterval(200);
connections << connect(&m_thicknessSyncTimer, &QTimer::timeout, this, [this]() {
syncGeometry();
});
}
SubConfigView::~SubConfigView()
@ -169,10 +163,7 @@ void SubConfigView::initParentView(Latte::View *view)
m_latteView = view;
viewconnections << connect(m_latteView->visibility(), &VisibilityManager::modeChanged, this, &SubConfigView::syncGeometry);
viewconnections << connect(m_latteView, &Latte::View::editThicknessChanged, [&]() {
m_thicknessSyncTimer.start();
});
viewconnections << connect(m_latteView->positioner(), &ViewPart::Positioner::canvasGeometryChanged, this, &SubConfigView::syncGeometry);
//! Assign app interfaces in be accessible through containment graphic item
QQuickItem *containmentGraphicItem = qobject_cast<QQuickItem *>(m_latteView->containment()->property("_plasma_graphicObject").value<QObject *>());

@ -106,8 +106,6 @@ private:
private:
QString m_validTitle;
QTimer m_thicknessSyncTimer;
Latte::WindowSystem::WindowId m_waylandWindowId;
};

Loading…
Cancel
Save