Warning, /system/kde-nomodeset/src/qml/DisablePage.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0002 // SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org>
0003 
0004 import QtQuick 2.15
0005 import QtQuick.Layouts 1.15
0006 import QtQuick.Controls 2.15 as QQC2
0007 import org.kde.kirigami 2.12 as Kirigami
0008 
0009 Kirigami.ScrollablePage {
0010     title: appWindow.standardTitle
0011 
0012     RowLayout {
0013         width: parent.width
0014 
0015         Kirigami.Icon {
0016             implicitWidth: Kirigami.Units.iconSizes.enormous
0017             implicitHeight: implicitWidth
0018             source: "video-display"
0019         }
0020 
0021         ColumnLayout {
0022             Layout.fillWidth: true
0023 
0024             QQC2.Label {
0025                 Layout.fillWidth: true
0026                 wrapMode: Text.Wrap
0027                 textFormat: Text.RichText
0028                 text: appWindow.preambleText
0029             }
0030 
0031             QQC2.Label {
0032                 Layout.fillWidth: true
0033                 wrapMode: Text.Wrap
0034                 textFormat: Text.RichText
0035                 text: appWindow.fixItText
0036             }
0037 
0038             QQC2.Label {
0039                 Layout.fillWidth: true
0040                 wrapMode: Text.Wrap
0041                 text: i18nc("@label",
0042                     "If you are confident that you have resolved the graphics issues you can permanently enable the default graphics mode again.")
0043             }
0044         }
0045     }
0046 
0047     // TODO auto-nomodeset again?? ie. if things fail without nomodeset turn it back on again
0048     // .... when disabling nomodeset write a state file somewhere
0049     // .... in a marker.service write another file on boot before X is up
0050     // .... remove the state file and marker via plasma autostart or some other hook system that acts when X is up
0051     // .... in marker.service if the marker file already exists revert back to nomodeset and reboot
0052     //      (i.e. with a pre-existing marker the previous boot failed to bring up X suggesting whatever was broken still is)
0053 
0054     footer: QQC2.DialogButtonBox {
0055         QQC2.Button {
0056             action: Kirigami.Action {
0057                 text: i18nc("@action:button", "Enable Default Graphics Mode")
0058                 iconName: "dialog-scripts"
0059                 onTriggered: AuthHelper.disable()
0060             }
0061             QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
0062         }
0063         QQC2.Button {
0064             action: Kirigami.Action {
0065                 text: i18nc("@action:button", "Keep Safe Graphics Mode")
0066                 iconName: "dialog-cancel"
0067                 onTriggered: LifeTimeWrapper.quit()
0068             }
0069             QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.RejectRole
0070         }
0071     }
0072 }