shift-shell/components/mobileshell/qml/components/Constants.qml
Devin Lin e7877a6d7a navigationpanel: Remove feature that moves it to the right when the screen height is small
This feature continuously causes issues, and I don't really have time to keep looking at it again and again.

https://invent.kde.org/plasma/plasma-mobile/-/issues/321
2024-03-26 20:53:56 -04:00

25 lines
1.3 KiB
QML

// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
// NOTE: This is a singleton in the mobileshell library, so we need to be careful to
// make this load as fast as possible (since it may be loaded in other processes ex. lockscreen).
pragma Singleton
QtObject {
readonly property real topPanelHeight: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing
readonly property real navigationPanelThickness: ShellSettings.Settings.navigationPanelEnabled ? Kirigami.Units.gridUnit * 2 : 0
function navigationPanelOnSide(screenWidth: real, screenHeight: real): bool {
// TODO: we have this disabled for now, we might consider just removing this feature entirely due to it causing several issues:
// (the feature being the navigation panel being moved to the right when the screen height is small)
// => the keyboard dimensions are incorrect
// => shell seems to crash randomly (attempted hotfixes with just delay timers, but not great and also doesn't work now)
return false; // screenWidth > screenHeight && screenHeight < 500;
}
}