mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-09 17:18:11 +03:00
refactor:rename managedLayout to layout/viewLayout
This commit is contained in:
parent
d307ac626b
commit
29157f4636
@ -735,7 +735,7 @@ void GenericLayout::addView(Plasma::Containment *containment, bool forceOnPrimar
|
||||
|
||||
latteView->init();
|
||||
latteView->setContainment(containment);
|
||||
latteView->setManagedLayout(this);
|
||||
latteView->setLayout(this);
|
||||
|
||||
//! force this special dock case to become primary
|
||||
//! even though it isnt
|
||||
@ -847,7 +847,7 @@ void GenericLayout::assignToLayout(Latte::View *latteView, QList<Plasma::Contain
|
||||
connect(containment, &Plasma::Containment::appletCreated, this, &GenericLayout::appletCreated);
|
||||
}
|
||||
|
||||
latteView->setManagedLayout(this);
|
||||
latteView->setLayout(this);
|
||||
|
||||
emit viewsCountChanged();
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ void GlobalShortcuts::activateEntry(int index, Qt::Key modifier)
|
||||
}
|
||||
|
||||
for (const auto view : sortedViews) {
|
||||
if (view->managedLayout()->preferredForShortcutsTouched() && !view->isPreferredForShortcuts()) {
|
||||
if (view->layout()->preferredForShortcutsTouched() && !view->isPreferredForShortcuts()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -628,7 +628,7 @@ void GlobalShortcuts::showViews()
|
||||
Latte::View *viewWithMeta{nullptr};
|
||||
|
||||
for(const auto view : sortedViews) {
|
||||
if (!viewWithTasks && (!view->managedLayout()->preferredForShortcutsTouched() || view->isPreferredForShortcuts()) && isCapableToShowShortcutBadges(view)) {
|
||||
if (!viewWithTasks && (!view->layout()->preferredForShortcutsTouched() || view->isPreferredForShortcuts()) && isCapableToShowShortcutBadges(view)) {
|
||||
viewWithTasks = view;
|
||||
break;
|
||||
}
|
||||
|
@ -168,8 +168,8 @@ bool Positioner::setCurrentScreen(const QString id)
|
||||
}
|
||||
|
||||
if (nextScreen) {
|
||||
if (m_view->managedLayout()) {
|
||||
auto freeEdges = m_view->managedLayout()->freeEdges(nextScreen);
|
||||
if (m_view->layout()) {
|
||||
auto freeEdges = m_view->layout()->freeEdges(nextScreen);
|
||||
|
||||
if (!freeEdges.contains(m_view->location())) {
|
||||
return false;
|
||||
@ -261,7 +261,7 @@ void Positioner::reconsiderScreen()
|
||||
QList<Types::Location> edges{Types::BottomEdge, Types::LeftEdge,
|
||||
Types::TopEdge, Types::RightEdge};
|
||||
|
||||
edges = m_view->managedLayout() ? m_view->managedLayout()->availableEdgesForView(qGuiApp->primaryScreen(), m_view) : edges;
|
||||
edges = m_view->layout() ? m_view->layout()->availableEdgesForView(qGuiApp->primaryScreen(), m_view) : edges;
|
||||
|
||||
//change to primary screen only if the specific edge is free
|
||||
qDebug() << "updating the primary screen for dock...";
|
||||
@ -339,7 +339,7 @@ void Positioner::syncGeometry()
|
||||
QRect availableScreenRect{m_view->screen()->geometry()};
|
||||
|
||||
if (m_view->formFactor() == Plasma::Types::Vertical) {
|
||||
QString layoutName = m_view->managedLayout() ? m_view->managedLayout()->name() : QString();
|
||||
QString layoutName = m_view->layout() ? m_view->layout()->name() : QString();
|
||||
auto latteCorona = qobject_cast<Latte::Corona *>(m_view->corona());
|
||||
int fixedScreen = m_view->onPrimary() ? latteCorona->screenPool()->primaryScreenId() : m_view->containment()->screen();
|
||||
|
||||
@ -562,10 +562,10 @@ void Positioner::initSignalingForLocationChangeSliding()
|
||||
emit showDockAfterLocationChangeFinished();
|
||||
m_view->showSettingsWindow();
|
||||
|
||||
if (m_view->managedLayout()) {
|
||||
if (m_view->layout()) {
|
||||
//! This is needed in case the edge is occupied and the occupying
|
||||
//! view must be deleted
|
||||
m_view->managedLayout()->syncLatteViewsToScreens();
|
||||
m_view->layout()->syncLatteViewsToScreens();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -582,10 +582,10 @@ void Positioner::initSignalingForLocationChangeSliding()
|
||||
emit showDockAfterScreenChangeFinished();
|
||||
m_view->showSettingsWindow();
|
||||
|
||||
if (m_view->managedLayout()) {
|
||||
if (m_view->layout()) {
|
||||
//! This is needed in case the edge is occupied and the occupying
|
||||
//! view must be deleted
|
||||
m_view->managedLayout()->syncLatteViewsToScreens();
|
||||
m_view->layout()->syncLatteViewsToScreens();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -594,8 +594,8 @@ void Positioner::initSignalingForLocationChangeSliding()
|
||||
//! signals to handle the sliding-in/out during moving to another layout
|
||||
connect(this, &Positioner::hideDockDuringMovingToLayoutStarted, this, &Positioner::onHideWindowsForSlidingOut);
|
||||
|
||||
connect(m_view, &View::managedLayoutChanged, this, [&]() {
|
||||
if (!m_moveToLayout.isEmpty() && m_view->managedLayout()) {
|
||||
connect(m_view, &View::layoutChanged, this, [&]() {
|
||||
if (!m_moveToLayout.isEmpty() && m_view->layout()) {
|
||||
m_moveToLayout = "";
|
||||
QTimer::singleShot(100, [this]() {
|
||||
m_view->effects()->setAnimationsBlocked(false);
|
||||
|
@ -85,16 +85,16 @@ ScreenEdgeGhostWindow::ScreenEdgeGhostWindow(Latte::View *view) :
|
||||
connect(this, &QWindow::visibleChanged, this, [&]() {
|
||||
//! IMPORTANT!!! ::: This fixes a bug when closing an Activity all views from all Activities are
|
||||
//! disappearing! With this they reappear!!!
|
||||
if (m_latteView && m_latteView->managedLayout()) {
|
||||
if (m_latteView && m_latteView->layout()) {
|
||||
if (!isVisible()) {
|
||||
QTimer::singleShot(100, [this]() {
|
||||
if (!m_inDelete && m_latteView && m_latteView->managedLayout() && !isVisible()) {
|
||||
if (!m_inDelete && m_latteView && m_latteView->layout() && !isVisible()) {
|
||||
setVisible(true);
|
||||
}
|
||||
});
|
||||
|
||||
QTimer::singleShot(1500, [this]() {
|
||||
if (!m_inDelete && m_latteView && m_latteView->managedLayout() && !isVisible()) {
|
||||
if (!m_inDelete && m_latteView && m_latteView->layout() && !isVisible()) {
|
||||
setVisible(true);
|
||||
}
|
||||
});
|
||||
|
@ -114,8 +114,8 @@ PrimaryConfigView::PrimaryConfigView(Plasma::Containment *containment, Latte::Vi
|
||||
connections << connect(m_corona, &Latte::Corona::raiseViewsTemporaryChanged, this, &PrimaryConfigView::raiseDocksTemporaryChanged);
|
||||
}
|
||||
|
||||
if (m_latteView->managedLayout()) {
|
||||
emit m_latteView->managedLayout()->configViewCreated(this);
|
||||
if (m_latteView->layout()) {
|
||||
emit m_latteView->layout()->configViewCreated(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ void PrimaryConfigView::requestActivate()
|
||||
|
||||
void PrimaryConfigView::syncGeometry()
|
||||
{
|
||||
if (!m_latteView || !m_latteView->managedLayout() || !m_latteView->containment() || !rootObject()) {
|
||||
if (!m_latteView || !m_latteView->layout() || !m_latteView->containment() || !rootObject()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -391,10 +391,10 @@ void PrimaryConfigView::hideEvent(QHideEvent *ev)
|
||||
//! mode changed to AlwaysVisible OR WindowsGoBelow FROM Dodge mode
|
||||
if (m_originalByPassWM) {
|
||||
//! if original by pass is active
|
||||
m_latteView->managedLayout()->recreateView(m_latteView->containment());
|
||||
m_latteView->layout()->recreateView(m_latteView->containment());
|
||||
}
|
||||
} else if (m_latteView->byPassWM() != m_originalByPassWM) {
|
||||
m_latteView->managedLayout()->recreateView(m_latteView->containment());
|
||||
m_latteView->layout()->recreateView(m_latteView->containment());
|
||||
}
|
||||
|
||||
deleteLater();
|
||||
@ -595,8 +595,8 @@ void PrimaryConfigView::updateLaunchersForGroup(int groupInt)
|
||||
|
||||
//! when the layout/global launchers list is empty then the current dock launchers are used for them
|
||||
//! as a start point
|
||||
if (m_corona && m_latteView->managedLayout()) {
|
||||
if ((group == Types::LayoutLaunchers && m_latteView->managedLayout()->launchers().isEmpty())
|
||||
if (m_corona && m_latteView->layout()) {
|
||||
if ((group == Types::LayoutLaunchers && m_latteView->layout()->launchers().isEmpty())
|
||||
|| (group == Types::GlobalLaunchers && m_corona->universalSettings()->launchers().isEmpty())) {
|
||||
|
||||
Plasma::Containment *c = m_latteView->containment();
|
||||
@ -633,7 +633,7 @@ void PrimaryConfigView::updateLaunchersForGroup(int groupInt)
|
||||
|
||||
if (method.invoke(item, Q_RETURN_ARG(QVariant, launchers))) {
|
||||
if (group == Types::LayoutLaunchers) {
|
||||
m_latteView->managedLayout()->setLaunchers(launchers.toStringList());
|
||||
m_latteView->layout()->setLaunchers(launchers.toStringList());
|
||||
} else if (group == Types::GlobalLaunchers) {
|
||||
m_corona->universalSettings()->setLaunchers(launchers.toStringList());
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ void SecondaryConfigView::requestActivate()
|
||||
|
||||
void SecondaryConfigView::syncGeometry()
|
||||
{
|
||||
if (!m_latteView || !m_latteView->managedLayout() || !m_latteView->containment() || !m_parent || !rootObject()) {
|
||||
if (!m_latteView || !m_latteView->layout() || !m_latteView->containment() || !m_parent || !rootObject()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -148,10 +148,10 @@ View::~View()
|
||||
{
|
||||
m_inDelete = true;
|
||||
|
||||
//! clear managedLayout connections
|
||||
//! clear Layout connections
|
||||
m_visibleHackTimer1.stop();
|
||||
m_visibleHackTimer2.stop();
|
||||
for (auto &c : connectionsManagedLayout) {
|
||||
for (auto &c : connectionsLayout) {
|
||||
disconnect(c);
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ bool View::inDelete() const
|
||||
void View::disconnectSensitiveSignals()
|
||||
{
|
||||
disconnect(m_corona, &Latte::Corona::availableScreenRectChangedFrom, this, &View::availableScreenRectChangedFrom);
|
||||
setManagedLayout(nullptr);
|
||||
setLayout(nullptr);
|
||||
|
||||
if (m_windowsTracker) {
|
||||
m_windowsTracker->setEnabled(false);
|
||||
@ -327,12 +327,12 @@ void View::reconsiderScreen()
|
||||
|
||||
void View::copyView()
|
||||
{
|
||||
m_managedLayout->copyView(containment());
|
||||
m_layout->copyView(containment());
|
||||
}
|
||||
|
||||
void View::removeView()
|
||||
{
|
||||
if (m_managedLayout && m_managedLayout->viewsCount() > 1) {
|
||||
if (m_layout && m_layout->viewsCount() > 1) {
|
||||
QAction *removeAct = this->containment()->actions()->action(QStringLiteral("remove"));
|
||||
|
||||
if (removeAct) {
|
||||
@ -611,8 +611,8 @@ void View::setIsPreferredForShortcuts(bool preferred)
|
||||
|
||||
emit isPreferredForShortcutsChanged();
|
||||
|
||||
if (m_isPreferredForShortcuts && m_managedLayout) {
|
||||
emit m_managedLayout->preferredViewForShortcutsChanged(this);
|
||||
if (m_isPreferredForShortcuts && m_layout) {
|
||||
emit m_layout->preferredViewForShortcutsChanged(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -763,8 +763,8 @@ void View::setFontPixelSize(int size)
|
||||
|
||||
void View::applyActivitiesToWindows()
|
||||
{
|
||||
if (m_visibility && m_managedLayout) {
|
||||
QStringList activities = m_managedLayout->appliedActivities();
|
||||
if (m_visibility && m_layout) {
|
||||
QStringList activities = m_layout->appliedActivities();
|
||||
m_windowsTracker->setWindowOnActivities(*this, activities);
|
||||
|
||||
if (m_configView) {
|
||||
@ -783,59 +783,59 @@ void View::applyActivitiesToWindows()
|
||||
}
|
||||
}
|
||||
|
||||
Layout::GenericLayout *View::managedLayout() const
|
||||
Layout::GenericLayout *View::layout() const
|
||||
{
|
||||
return m_managedLayout;
|
||||
return m_layout;
|
||||
}
|
||||
|
||||
void View::setManagedLayout(Layout::GenericLayout *layout)
|
||||
void View::setLayout(Layout::GenericLayout *layout)
|
||||
{
|
||||
if (m_managedLayout == layout) {
|
||||
if (m_layout == layout) {
|
||||
return;
|
||||
}
|
||||
|
||||
// clear mode
|
||||
for (auto &c : connectionsManagedLayout) {
|
||||
for (auto &c : connectionsLayout) {
|
||||
disconnect(c);
|
||||
}
|
||||
|
||||
m_managedLayout = layout;
|
||||
m_layout = layout;
|
||||
|
||||
if (m_managedLayout) {
|
||||
if (m_layout) {
|
||||
//! Sometimes the activity isnt completely ready, by adding a delay
|
||||
//! we try to catch up
|
||||
QTimer::singleShot(100, [this]() {
|
||||
if (m_managedLayout && m_visibility) {
|
||||
qDebug() << "DOCK VIEW FROM LAYOUT ::: " << m_managedLayout->name() << " - activities: " << m_managedLayout->appliedActivities();
|
||||
if (m_layout && m_visibility) {
|
||||
qDebug() << "DOCK VIEW FROM LAYOUT ::: " << m_layout->name() << " - activities: " << m_layout->appliedActivities();
|
||||
applyActivitiesToWindows();
|
||||
emit activitiesChanged();
|
||||
}
|
||||
});
|
||||
|
||||
connectionsManagedLayout[0] = connect(m_managedLayout, &Layout::GenericLayout::preferredViewForShortcutsChanged, this, &View::preferredViewForShortcutsChangedSlot);
|
||||
connectionsManagedLayout[1] = connect(m_managedLayout, &Layout::GenericLayout::configViewCreated, this, &View::configViewCreated);
|
||||
connectionsLayout[0] = connect(m_layout, &Layout::GenericLayout::preferredViewForShortcutsChanged, this, &View::preferredViewForShortcutsChangedSlot);
|
||||
connectionsLayout[1] = connect(m_layout, &Layout::GenericLayout::configViewCreated, this, &View::configViewCreated);
|
||||
|
||||
Latte::Corona *latteCorona = qobject_cast<Latte::Corona *>(this->corona());
|
||||
|
||||
if (latteCorona->layoutManager()->memoryUsage() == Types::MultipleLayouts) {
|
||||
connectionsManagedLayout[2] = connect(latteCorona->activitiesConsumer(), &KActivities::Consumer::runningActivitiesChanged, this, [&]() {
|
||||
if (m_managedLayout && m_visibility) {
|
||||
qDebug() << "DOCK VIEW FROM LAYOUT (runningActivitiesChanged) ::: " << m_managedLayout->name()
|
||||
<< " - activities: " << m_managedLayout->appliedActivities();
|
||||
connectionsLayout[2] = connect(latteCorona->activitiesConsumer(), &KActivities::Consumer::runningActivitiesChanged, this, [&]() {
|
||||
if (m_layout && m_visibility) {
|
||||
qDebug() << "DOCK VIEW FROM LAYOUT (runningActivitiesChanged) ::: " << m_layout->name()
|
||||
<< " - activities: " << m_layout->appliedActivities();
|
||||
applyActivitiesToWindows();
|
||||
emit activitiesChanged();
|
||||
}
|
||||
});
|
||||
|
||||
connectionsManagedLayout[3] = connect(m_managedLayout, &Layout::GenericLayout::activitiesChanged, this, [&]() {
|
||||
if (m_managedLayout) {
|
||||
connectionsLayout[3] = connect(m_layout, &Layout::GenericLayout::activitiesChanged, this, [&]() {
|
||||
if (m_layout) {
|
||||
applyActivitiesToWindows();
|
||||
emit activitiesChanged();
|
||||
}
|
||||
});
|
||||
|
||||
connectionsManagedLayout[4] = connect(latteCorona->layoutManager(), &LayoutManager::layoutsChanged, this, [&]() {
|
||||
if (m_managedLayout) {
|
||||
connectionsLayout[4] = connect(latteCorona->layoutManager(), &LayoutManager::layoutsChanged, this, [&]() {
|
||||
if (m_layout) {
|
||||
applyActivitiesToWindows();
|
||||
emit activitiesChanged();
|
||||
}
|
||||
@ -850,23 +850,23 @@ void View::setManagedLayout(Layout::GenericLayout *layout)
|
||||
m_visibleHackTimer1.setSingleShot(true);
|
||||
m_visibleHackTimer2.setSingleShot(true);
|
||||
|
||||
connectionsManagedLayout[5] = connect(this, &QWindow::visibleChanged, this, [&]() {
|
||||
if (m_managedLayout && !inDelete() & !isVisible()) {
|
||||
connectionsLayout[5] = connect(this, &QWindow::visibleChanged, this, [&]() {
|
||||
if (m_layout && !inDelete() & !isVisible()) {
|
||||
m_visibleHackTimer1.start();
|
||||
m_visibleHackTimer2.start();
|
||||
}
|
||||
});
|
||||
|
||||
connectionsManagedLayout[6] = connect(&m_visibleHackTimer1, &QTimer::timeout, this, [&]() {
|
||||
if (m_managedLayout && !inDelete() & !isVisible()) {
|
||||
connectionsLayout[6] = connect(&m_visibleHackTimer1, &QTimer::timeout, this, [&]() {
|
||||
if (m_layout && !inDelete() & !isVisible()) {
|
||||
setVisible(true);
|
||||
applyActivitiesToWindows();
|
||||
emit activitiesChanged();
|
||||
}
|
||||
});
|
||||
|
||||
connectionsManagedLayout[7] = connect(&m_visibleHackTimer2, &QTimer::timeout, this, [&]() {
|
||||
if (m_managedLayout && !inDelete() && !isVisible()) {
|
||||
connectionsLayout[7] = connect(&m_visibleHackTimer2, &QTimer::timeout, this, [&]() {
|
||||
if (m_layout && !inDelete() && !isVisible()) {
|
||||
setVisible(true);
|
||||
applyActivitiesToWindows();
|
||||
emit activitiesChanged();
|
||||
@ -876,17 +876,17 @@ void View::setManagedLayout(Layout::GenericLayout *layout)
|
||||
//! END OF KWIN HACK
|
||||
}
|
||||
|
||||
emit managedLayoutChanged();
|
||||
emit layoutChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void View::moveToLayout(QString layoutName)
|
||||
{
|
||||
if (!m_managedLayout) {
|
||||
if (!m_layout) {
|
||||
return;
|
||||
}
|
||||
|
||||
QList<Plasma::Containment *> containments = m_managedLayout->unassignFromLayout(this);
|
||||
QList<Plasma::Containment *> containments = m_layout->unassignFromLayout(this);
|
||||
|
||||
Latte::Corona *latteCorona = qobject_cast<Latte::Corona *>(this->corona());
|
||||
|
||||
@ -1186,8 +1186,8 @@ void View::restoreGrabItemBehavior()
|
||||
}
|
||||
|
||||
bool View::isHighestPriorityView() {
|
||||
if (m_managedLayout) {
|
||||
return this == m_managedLayout->highestPriorityView();
|
||||
if (m_layout) {
|
||||
return this == m_layout->highestPriorityView();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -98,7 +98,7 @@ class View : public PlasmaQuick::ContainmentView
|
||||
|
||||
Q_PROPERTY(float maxLength READ maxLength WRITE setMaxLength NOTIFY maxLengthChanged)
|
||||
|
||||
Q_PROPERTY(Latte::Layout::GenericLayout *managedLayout READ managedLayout WRITE setManagedLayout NOTIFY managedLayoutChanged)
|
||||
Q_PROPERTY(Latte::Layout::GenericLayout *layout READ layout WRITE setLayout NOTIFY layoutChanged)
|
||||
Q_PROPERTY(Latte::ViewPart::Effects *effects READ effects NOTIFY effectsChanged)
|
||||
Q_PROPERTY(Latte::ViewPart::Indicator *indicator READ indicator NOTIFY indicatorChanged)
|
||||
Q_PROPERTY(Latte::ViewPart::Positioner *positioner READ positioner NOTIFY positionerChanged)
|
||||
@ -185,8 +185,8 @@ public:
|
||||
ViewPart::VisibilityManager *visibility() const;
|
||||
ViewPart::WindowsTracker *windowsTracker() const;
|
||||
|
||||
Layout::GenericLayout *managedLayout() const;
|
||||
void setManagedLayout(Layout::GenericLayout *layout);
|
||||
Layout::GenericLayout *layout() const;
|
||||
void setLayout(Layout::GenericLayout *layout);
|
||||
|
||||
KWayland::Client::PlasmaShellSurface *surface();
|
||||
|
||||
@ -247,8 +247,8 @@ signals:
|
||||
void indicatorChanged();
|
||||
void isPreferredForShortcutsChanged();
|
||||
void latteTasksArePresentChanged();
|
||||
void layoutChanged();
|
||||
void localGeometryChanged();
|
||||
void managedLayoutChanged();
|
||||
void maxLengthChanged();
|
||||
void maxThicknessChanged();
|
||||
void normalThicknessChanged();
|
||||
@ -312,7 +312,7 @@ private:
|
||||
QTimer m_visibleHackTimer1;
|
||||
QTimer m_visibleHackTimer2;
|
||||
|
||||
Layout::GenericLayout *m_managedLayout{nullptr};
|
||||
Layout::GenericLayout *m_layout{nullptr};
|
||||
QPointer<PlasmaQuick::ConfigView> m_configView;
|
||||
|
||||
QPointer<ViewPart::ContextMenu> m_contextMenu;
|
||||
@ -322,8 +322,8 @@ private:
|
||||
QPointer<ViewPart::VisibilityManager> m_visibility;
|
||||
QPointer<ViewPart::WindowsTracker> m_windowsTracker;
|
||||
|
||||
//! Connections to release and bound for the managed layout
|
||||
std::array<QMetaObject::Connection, 8> connectionsManagedLayout;
|
||||
//! Connections to release and bound for the assigned layout
|
||||
std::array<QMetaObject::Connection, 8> connectionsLayout;
|
||||
|
||||
QPointer<Latte::Corona> m_corona;
|
||||
|
||||
|
@ -243,8 +243,8 @@ void VisibilityManager::setMode(Latte::Types::Visibility mode)
|
||||
void VisibilityManager::updateStrutsBasedOnLayoutsAndActivities()
|
||||
{
|
||||
bool multipleLayoutsAndCurrent = (m_corona->layoutManager()->memoryUsage() == Types::MultipleLayouts
|
||||
&& m_latteView->managedLayout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
||||
&& m_latteView->managedLayout()->isCurrent());
|
||||
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
||||
&& m_latteView->layout()->isCurrent());
|
||||
|
||||
if (m_corona->layoutManager()->memoryUsage() == Types::SingleLayout || multipleLayoutsAndCurrent) {
|
||||
QRect computedStruts = acceptableStruts();
|
||||
@ -399,8 +399,8 @@ void VisibilityManager::updateGhostWindowState()
|
||||
if (supportsKWinEdges()) {
|
||||
bool inCurrentLayout = (m_corona->layoutManager()->memoryUsage() == Types::SingleLayout ||
|
||||
(m_corona->layoutManager()->memoryUsage() == Types::MultipleLayouts
|
||||
&& m_latteView->managedLayout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
||||
&& m_latteView->managedLayout()->name() == m_corona->layoutManager()->currentLayoutName()));
|
||||
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
||||
&& m_latteView->layout()->name() == m_corona->layoutManager()->currentLayoutName()));
|
||||
|
||||
if (inCurrentLayout) {
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isHidden);
|
||||
@ -720,8 +720,8 @@ void VisibilityManager::createEdgeGhostWindow()
|
||||
this, [&]() {
|
||||
bool inCurrentLayout = (m_corona->layoutManager()->memoryUsage() == Types::SingleLayout ||
|
||||
(m_corona->layoutManager()->memoryUsage() == Types::MultipleLayouts
|
||||
&& m_latteView->managedLayout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
||||
&& m_latteView->managedLayout()->name() == m_corona->layoutManager()->currentLayoutName()));
|
||||
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
||||
&& m_latteView->layout()->name() == m_corona->layoutManager()->currentLayoutName()));
|
||||
|
||||
if (m_edgeGhostWindow) {
|
||||
if (inCurrentLayout) {
|
||||
|
@ -278,9 +278,9 @@ Item{
|
||||
visible: false
|
||||
|
||||
fillMode: Image.Tile
|
||||
source: hasBackground ? latteView.managedLayout.background : "../icons/"+editModeVisual.layoutColor+"print.jpg"
|
||||
source: hasBackground ? latteView.layout.background : "../icons/"+editModeVisual.layoutColor+"print.jpg"
|
||||
|
||||
readonly property bool hasBackground: (latteView && latteView.managedLayout && latteView.managedLayout.background.startsWith("/")) ?
|
||||
readonly property bool hasBackground: (latteView && latteView.layout && latteView.layout.background.startsWith("/")) ?
|
||||
true : false
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ Item{
|
||||
Connections{
|
||||
target: universalLayoutManager
|
||||
onCurrentLayoutIsSwitching: {
|
||||
if (Latte.WindowSystem.compositingActive && latteView && latteView.managedLayout && latteView.managedLayout.name === layoutName) {
|
||||
if (Latte.WindowSystem.compositingActive && latteView && latteView.layout && latteView.layout.name === layoutName) {
|
||||
manager.inTempHiding = true;
|
||||
manager.inForceHiding = true;
|
||||
root.clearZoom();
|
||||
|
@ -58,7 +58,7 @@ Loader{
|
||||
}
|
||||
|
||||
readonly property bool editModeTextColorIsBright: ColorizerTools.colorBrightness(editModeTextColor) > 127.5
|
||||
readonly property color editModeTextColor: latteView && latteView.managedLayout ? latteView.managedLayout.textColor : "white"
|
||||
readonly property color editModeTextColor: latteView && latteView.layout ? latteView.layout.textColor : "white"
|
||||
|
||||
readonly property bool mustBeShown: (applyTheme && applyTheme !== theme) || (root.inConfigureAppletsMode && (root.themeColors === Latte.Types.SmartThemeColors))
|
||||
|
||||
@ -117,12 +117,12 @@ Loader{
|
||||
|
||||
readonly property color backgroundColor:applyTheme.backgroundColor
|
||||
readonly property color textColor: {
|
||||
if (latteView && latteView.managedLayout
|
||||
if (latteView && latteView.layout
|
||||
&& root.inConfigureAppletsMode
|
||||
&& Latte.WindowSystem.compositingActive
|
||||
&& root.panelTransparency<40
|
||||
&& (root.themeColors === Latte.Types.SmartThemeColors)) {
|
||||
return latteView.managedLayout.textColor;
|
||||
return latteView.layout.textColor;
|
||||
}
|
||||
|
||||
return applyTheme.textColor;
|
||||
@ -177,7 +177,7 @@ Loader{
|
||||
}
|
||||
|
||||
sourceComponent: Latte.BackgroundTracker {
|
||||
activity: managedLayout ? managedLayout.lastUsedActivity : ""
|
||||
activity: viewLayout ? viewLayout.lastUsedActivity : ""
|
||||
location: plasmoid.location
|
||||
screenName: latteView && latteView.positioner ? latteView.positioner.currentScreenName : ""
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ MouseArea {
|
||||
configureButton.visible = !currentApplet.isInternalViewSplitter && (currentApplet.applet.pluginName !== root.plasmoidName)
|
||||
&& currentApplet.applet.action("configure") && currentApplet.applet.action("configure").enabled;
|
||||
closeButton.visible = !currentApplet.isInternalViewSplitter && currentApplet.applet.action("remove") && currentApplet.applet.action("remove").enabled
|
||||
&& !(currentApplet.applet.pluginName===root.plasmoidName && latteView && latteView.managedLayout.viewsWithTasks()===1 && latteView.tasksPresent());
|
||||
&& !(currentApplet.applet.pluginName===root.plasmoidName && latteView && latteView.layout.viewsWithTasks()===1 && latteView.tasksPresent());
|
||||
lockButton.visible = !currentApplet.isInternalViewSplitter
|
||||
&& (currentApplet.applet.pluginName !== root.plasmoidName)
|
||||
&& !currentApplet.isSeparator
|
||||
|
@ -55,7 +55,7 @@ Item{
|
||||
if (imageTiler.opacity <= 0.4) {
|
||||
return colorizerManager.applyColor;
|
||||
} else {
|
||||
return latteView && latteView.managedLayout ? latteView.managedLayout.textColor : "#D7E3FF";
|
||||
return latteView && latteView.layout ? latteView.layout.textColor : "#D7E3FF";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ Item{
|
||||
|
||||
property rect efGeometry
|
||||
|
||||
property string layoutColor: latteView && latteView.managedLayout ? latteView.managedLayout.color : "blue"
|
||||
property string layoutColor: latteView && latteView.layout ? latteView.layout.color : "blue"
|
||||
|
||||
readonly property real appliedOpacity: imageTiler.opacity
|
||||
readonly property real maxOpacity: root.inConfigureAppletsMode ? 1 : plasmoid.configuration.editBackgroundOpacity
|
||||
@ -127,9 +127,9 @@ Item{
|
||||
opacity: 0
|
||||
|
||||
fillMode: Image.Tile
|
||||
source: hasBackground ? latteView.managedLayout.background : "../../icons/"+editVisual.layoutColor+"print.jpg"
|
||||
source: hasBackground ? latteView.layout.background : "../../icons/"+editVisual.layoutColor+"print.jpg"
|
||||
|
||||
readonly property bool hasBackground: (latteView && latteView.managedLayout && latteView.managedLayout.background.startsWith("/")) ?
|
||||
readonly property bool hasBackground: (latteView && latteView.layout && latteView.layout.background.startsWith("/")) ?
|
||||
true : false
|
||||
|
||||
Connections {
|
||||
|
@ -145,7 +145,7 @@ DragDrop.DropArea {
|
||||
&& item.pluginName !== "org.kde.activeWindowControl");
|
||||
})
|
||||
|
||||
readonly property bool hasUserSpecifiedBackground: (latteView && latteView.managedLayout && latteView.managedLayout.background.startsWith("/")) ?
|
||||
readonly property bool hasUserSpecifiedBackground: (latteView && latteView.layout && latteView.layout.background.startsWith("/")) ?
|
||||
true : false
|
||||
|
||||
readonly property bool inConfigureAppletsMode: root.editMode && (plasmoid.configuration.inConfigureAppletsMode || !Latte.WindowSystem.compositingActive)
|
||||
@ -394,7 +394,7 @@ DragDrop.DropArea {
|
||||
property QtObject themeExtended: null
|
||||
property QtObject universalSettings: null
|
||||
property QtObject universalLayoutManager: null
|
||||
property QtObject managedLayout: latteView && latteView.managedLayout ? latteView.managedLayout : null
|
||||
property QtObject viewLayout: latteView && latteView.layout ? latteView.layout : null
|
||||
|
||||
// TO BE DELETED, if not needed: property int counter:0;
|
||||
|
||||
@ -1769,7 +1769,7 @@ DragDrop.DropArea {
|
||||
sourceComponent: Image{
|
||||
anchors.fill: parent
|
||||
fillMode: Image.Tile
|
||||
source: root.hasUserSpecifiedBackground ? latteView.managedLayout.background : "../icons/wheatprint.jpg"
|
||||
source: root.hasUserSpecifiedBackground ? latteView.layout.background : "../icons/wheatprint.jpg"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -731,7 +731,7 @@ PlasmaComponents.ContextMenu {
|
||||
var launcher = get(atm.LauncherUrl);
|
||||
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.removeLauncher(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.removeLauncher(root.viewLayoutName,
|
||||
latteView.launchersGroup, launcher);
|
||||
} else {
|
||||
root.launcherForRemoval = launcher;
|
||||
@ -742,7 +742,7 @@ PlasmaComponents.ContextMenu {
|
||||
} else {
|
||||
var launcher = get(atm.LauncherUrl);
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.addLauncher(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.addLauncher(root.viewLayoutName,
|
||||
latteView.launchersGroup, launcher);
|
||||
} else {
|
||||
tasksModel.requestAddLauncher(launcher);
|
||||
@ -791,7 +791,7 @@ PlasmaComponents.ContextMenu {
|
||||
function() {
|
||||
if (result.checked) {
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.addLauncherToActivity(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.addLauncherToActivity(root.viewLayoutName,
|
||||
latteView.launchersGroup, url, id);
|
||||
} else {
|
||||
if (id !== tasksModel.activity && (activities[0] === "00000000-0000-0000-0000-000000000000")) {
|
||||
@ -803,7 +803,7 @@ PlasmaComponents.ContextMenu {
|
||||
}
|
||||
} else {
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.removeLauncherFromActivity(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.removeLauncherFromActivity(root.viewLayoutName,
|
||||
latteView.launchersGroup, url, id);
|
||||
} else {
|
||||
if (id === tasksModel.activity) {
|
||||
@ -862,7 +862,7 @@ PlasmaComponents.ContextMenu {
|
||||
var launcher = get(atm.LauncherUrlWithoutIcon);
|
||||
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.removeLauncher(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.removeLauncher(root.viewLayoutName,
|
||||
latteView.launchersGroup, launcher);
|
||||
} else {
|
||||
root.launcherForRemoval = launcher
|
||||
@ -906,7 +906,7 @@ PlasmaComponents.ContextMenu {
|
||||
var launcher = get(atm.LauncherUrlWithoutIcon);
|
||||
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.removeLauncher(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.removeLauncher(root.viewLayoutName,
|
||||
latteView.launchersGroup, launcher);
|
||||
} else {
|
||||
root.launcherForRemoval = launcher;
|
||||
|
@ -537,7 +537,7 @@ Item {
|
||||
|
||||
tasksModel.move(from, to);
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.moveTask(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.moveTask(root.viewLayoutName,
|
||||
plasmoid.id, latteView.launchersGroup, from, to);
|
||||
}
|
||||
delayedLaynchersSyncTimer.start();
|
||||
|
@ -246,13 +246,15 @@ Item {
|
||||
property alias tasksCount: tasksModel.count
|
||||
property alias hoveredIndex: icList.hoveredIndex
|
||||
|
||||
readonly property bool viewLayoutIsCurrent: latteView && currentLayout && latteView.universalLayoutManager
|
||||
&& currentLayout.name === latteView.universalLayoutManager.currentLayoutName
|
||||
readonly property rect screenGeometry: latteView ? latteView.screenGeometry : plasmoid.screenGeometry
|
||||
property QtObject currentLayout : latteView && latteView.managedLayout ? latteView.managedLayout : null
|
||||
|
||||
readonly property bool viewLayoutIsCurrent: latteView && viewLayout && latteView.universalLayoutManager
|
||||
&& viewLayout.name === latteView.universalLayoutManager.currentLayoutName
|
||||
readonly property string viewLayoutName: viewLayout ? viewLayout.name : ""
|
||||
readonly property QtObject viewLayout : latteView && latteView.viewLayout ? latteView.viewLayout : null
|
||||
|
||||
property var badgesForActivate: latteView ? latteView.badgesForActivate : []
|
||||
property var managedLayoutName: currentLayout ? currentLayout.name : ""
|
||||
|
||||
|
||||
property Item latteView: null
|
||||
readonly property Item indicators: latteView ? latteView.indicatorsManager : indicatorsStandaloneLoader.item
|
||||
@ -448,14 +450,14 @@ Item {
|
||||
var launch = [];
|
||||
var launchersList = [];
|
||||
|
||||
if (currentLayout) {
|
||||
if (viewLayout) {
|
||||
if (latteView && latteView.universalLayoutManager
|
||||
&& latteView.managedLayout && latteView.universalSettings
|
||||
&& latteView.viewLayout && latteView.universalSettings
|
||||
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers
|
||||
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) {
|
||||
|
||||
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) {
|
||||
launchersList = latteView.managedLayout.launchers;
|
||||
launchersList = latteView.viewLayout.launchers;
|
||||
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) {
|
||||
launchersList = latteView.universalSettings.launchers;
|
||||
}
|
||||
@ -714,8 +716,8 @@ Item {
|
||||
|
||||
property bool loadLaunchersFirstTime: false;
|
||||
|
||||
onCurrentLayoutChanged: {
|
||||
if (currentLayout && !loadLaunchersFirstTime) {
|
||||
onViewLayoutChanged: {
|
||||
if (viewLayout && !loadLaunchersFirstTime) {
|
||||
tasksModel.updateLaunchersList();
|
||||
loadLaunchersFirstTime = true;
|
||||
}
|
||||
@ -746,7 +748,7 @@ Item {
|
||||
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers
|
||||
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) {
|
||||
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) {
|
||||
tasksModel.launcherList = latteView.managedLayout.launchers;
|
||||
tasksModel.launcherList = latteView.viewLayout.launchers;
|
||||
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) {
|
||||
tasksModel.launcherList = latteView.universalSettings.launchers;
|
||||
}
|
||||
@ -771,21 +773,21 @@ Item {
|
||||
}
|
||||
|
||||
onLauncherListChanged: {
|
||||
if (currentLayout) {
|
||||
if (viewLayout) {
|
||||
if (latteView && latteView.universalLayoutManager
|
||||
&& latteView.managedLayout && latteView.universalSettings
|
||||
&& latteView.viewLayout && latteView.universalSettings
|
||||
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers
|
||||
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) {
|
||||
|
||||
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) {
|
||||
latteView.managedLayout.launchers = launcherList;
|
||||
latteView.viewLayout.launchers = launcherList;
|
||||
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) {
|
||||
latteView.universalSettings.launchers = launcherList;
|
||||
}
|
||||
|
||||
if (inDraggingPhase) {
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.validateLaunchersOrder(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.validateLaunchersOrder(root.viewLayoutName,
|
||||
plasmoid.id,
|
||||
latteView.launchersGroup,
|
||||
currentLauncherList());
|
||||
@ -823,12 +825,12 @@ Item {
|
||||
//var loadedLaunchers = ActivitiesTools.restoreLaunchers();
|
||||
ActivitiesTools.importLaunchersToNewArchitecture();
|
||||
|
||||
if (currentLayout && latteView.universalSettings
|
||||
if (viewLayout && latteView.universalSettings
|
||||
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers
|
||||
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) {
|
||||
|
||||
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) {
|
||||
launcherList = latteView.managedLayout.launchers;
|
||||
launcherList = latteView.viewLayout.launchers;
|
||||
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) {
|
||||
launcherList = latteView.universalSettings.launchers;
|
||||
}
|
||||
@ -1222,7 +1224,7 @@ Item {
|
||||
onUrlsDropped: {
|
||||
//! inform synced docks for new dropped launchers
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers && onlyLaunchersInList(urls)) {
|
||||
latteView.universalLayoutManager.launchersSignals.urlsDropped(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.urlsDropped(root.viewLayoutName,
|
||||
latteView.launchersGroup, urls);
|
||||
return;
|
||||
}
|
||||
@ -1638,7 +1640,7 @@ Item {
|
||||
parabolicManager.addLauncherToBeMoved(separatorName, Math.max(0,pos));
|
||||
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.addLauncher(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.addLauncher(root.viewLayoutName,
|
||||
latteView.launchersGroup, separatorName);
|
||||
} else {
|
||||
tasksModel.requestAddLauncher(separatorName);
|
||||
@ -1863,7 +1865,7 @@ Item {
|
||||
|
||||
if (separatorName !== "") {
|
||||
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.removeLauncher(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.removeLauncher(root.viewLayoutName,
|
||||
latteView.launchersGroup, separatorName);
|
||||
} else {
|
||||
root.launcherForRemoval = separatorName;
|
||||
|
@ -162,7 +162,7 @@ Item {
|
||||
tasksModel.move(pos, insertAt);
|
||||
//! disable syncing for moving launchers action in favor of validatorOrder launchersSignal
|
||||
/* if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
|
||||
latteView.universalLayoutManager.launchersSignals.moveTask(root.managedLayoutName,
|
||||
latteView.universalLayoutManager.launchersSignals.moveTask(root.viewLayoutName,
|
||||
plasmoid.id,
|
||||
latteView.launchersGroup, pos, insertAt);
|
||||
}*/
|
||||
|
@ -519,17 +519,17 @@ FocusScope {
|
||||
spacing: units.largeSpacing
|
||||
|
||||
Connections{
|
||||
target: latteView.managedLayout
|
||||
target: latteView.layout
|
||||
onViewsCountChanged: actionButtons.updateEnabled();
|
||||
}
|
||||
|
||||
function updateEnabled() {
|
||||
var screenFreeEdges = latteView.managedLayout.qmlFreeEdges(latteView.positioner.currentScreenId);
|
||||
var screenFreeEdges = latteView.layout.qmlFreeEdges(latteView.positioner.currentScreenId);
|
||||
actionsComboBtn.buttonEnabled = screenFreeEdges.length > 0;
|
||||
if (actionsModel.count > 0) {
|
||||
actionsModel.get(0).enabled = actionsComboBtn.buttonEnabled;
|
||||
}
|
||||
removeView.enabled = latteView.managedLayout.viewsCount>1 /*&& !(latteView.managedLayout.viewsWithTasks()===1 && latteView.tasksPresent())*/
|
||||
removeView.enabled = latteView.layout.viewsCount>1 /*&& !(latteView.layout.viewsWithTasks()===1 && latteView.tasksPresent())*/
|
||||
}
|
||||
|
||||
LatteComponents.ComboBoxButton {
|
||||
@ -595,7 +595,7 @@ FocusScope {
|
||||
Connections{
|
||||
target: actionsComboBtn.button
|
||||
|
||||
onClicked: latteView.managedLayout.addNewView();
|
||||
onClicked: latteView.layout.addNewView();
|
||||
}
|
||||
|
||||
Connections{
|
||||
@ -615,7 +615,7 @@ FocusScope {
|
||||
var tempSharedLayouts = layoutManager.sharedLayoutsNames();
|
||||
|
||||
if (tempSharedLayouts.length > 0) {
|
||||
var curIndex = tempSharedLayouts.indexOf(latteView.managedLayout.name);
|
||||
var curIndex = tempSharedLayouts.indexOf(latteView.layout.name);
|
||||
if (curIndex >=0) {
|
||||
tempSharedLayouts.splice(curIndex,1);
|
||||
}
|
||||
@ -631,7 +631,7 @@ FocusScope {
|
||||
|
||||
|
||||
if (tempCentralLayouts.length > 0) {
|
||||
var curIndex = tempCentralLayouts.indexOf(latteView.managedLayout.name);
|
||||
var curIndex = tempCentralLayouts.indexOf(latteView.layout.name);
|
||||
if (curIndex >=0) {
|
||||
tempCentralLayouts.splice(curIndex,1);
|
||||
}
|
||||
@ -668,7 +668,7 @@ FocusScope {
|
||||
|
||||
text: i18n("Remove")
|
||||
iconSource: "delete"
|
||||
opacity: latteView.managedLayout.viewsCount > 1 ? 1 : 0
|
||||
opacity: latteView.layout.viewsCount > 1 ? 1 : 0
|
||||
tooltip: i18n("Remove current dock")
|
||||
|
||||
onClicked: latteView.removeView()
|
||||
|
@ -191,7 +191,7 @@ PlasmaComponents.Page {
|
||||
}
|
||||
|
||||
Connections{
|
||||
target: latteView.managedLayout
|
||||
target: latteView.layout
|
||||
onViewsCountChanged: locationLayout.lockReservedEdges();
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ PlasmaComponents.Page {
|
||||
}
|
||||
|
||||
function lockReservedEdges() {
|
||||
var edges = latteView.managedLayout.qmlFreeEdges(latteView.positioner.currentScreenId);
|
||||
var edges = latteView.layout.qmlFreeEdges(latteView.positioner.currentScreenId);
|
||||
|
||||
bottomEdgeBtn.edgeIsFree = (edges.indexOf(bottomEdgeBtn.edge)>=0);
|
||||
topEdgeBtn.edgeIsFree = (edges.indexOf(topEdgeBtn.edge)>=0);
|
||||
@ -645,13 +645,13 @@ PlasmaComponents.Page {
|
||||
Layout.maximumWidth: dialog.optionsWidth
|
||||
// Layout.maximumHeight: mouseWheelChk.height
|
||||
text: i18n("🅰 Activate based on position through global shortcuts")
|
||||
checked: latteView.isPreferredForShortcuts || (!latteView.managedLayout.preferredForShortcutsTouched && latteView.isHighestPriorityView())
|
||||
checked: latteView.isPreferredForShortcuts || (!latteView.layout.preferredForShortcutsTouched && latteView.isHighestPriorityView())
|
||||
tooltip: i18n("This view is used for based on position global shortcuts. Take note that only one view can have that option enabled for each layout")
|
||||
|
||||
onClicked: {
|
||||
latteView.isPreferredForShortcuts = checked
|
||||
if (!latteView.managedLayout.preferredForShortcutsTouched) {
|
||||
latteView.managedLayout.preferredForShortcutsTouched = true
|
||||
if (!latteView.layout.preferredForShortcutsTouched) {
|
||||
latteView.layout.preferredForShortcutsTouched = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ PlasmaComponents.Page {
|
||||
checked: !plasmoid.configuration.unifiedGlobalShortcuts
|
||||
tooltip: i18n("Based on position global shortcuts are enabled only for tasks and not for applets")
|
||||
visible: dialog.highLevel
|
||||
enabled: latteView.isPreferredForShortcuts || (!latteView.managedLayout.preferredForShortcutsTouched && latteView.isHighestPriorityView())
|
||||
enabled: latteView.isPreferredForShortcuts || (!latteView.layout.preferredForShortcutsTouched && latteView.isHighestPriorityView())
|
||||
|
||||
onClicked: {
|
||||
plasmoid.configuration.unifiedGlobalShortcuts = !checked
|
||||
|
Loading…
Reference in New Issue
Block a user