Files
jami-client-qt/src/app/commoncomponents/BaseView.qml
Andreas Traczyk 35482fa92f misc: implement frameless window
Several major changes to the layout have been made.
- The chat search bar is moved into the message search layout.
- The Searchbar component is stripped of unused features.
- Some remaining logic that was used to switch main loader components is removed.
- ViewCoordinator.getView gets a "force create" parameter and we no longer preload low-cost views.

NOTE: the option to use a frameless window is available within general settings

Gitlab: #1524 (Frameless Window)
Change-Id: Iec6bdf162cb0335d3ae3d9bd09dd9783991a4a57
2024-01-26 18:14:55 -05:00

48 lines
1.4 KiB
QML

/*
* Copyright (C) 2024 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import QtQuick
Rectangle {
id: viewNode
// True if this view is managed by the view coordinator.
// False if this view is managed by its parent view, and will
// only be destroyed when its parent is destroyed.
property bool managed: true
// A list of view names that this view inhibits the presentation of.
property var inhibits: []
function dismiss() {
viewCoordinator.dismiss(objectName);
}
signal presented
signal dismissed
Component.onCompleted: {
console.debug("Created", objectName);
if (managed)
presented();
}
Component.onDestruction: {
console.debug("Destroyed", objectName);
if (managed)
dismissed();
}
}