~ci-train-bot/unity8/unity8-ubuntu-zesty-2663

« back to all changes in this revision

Viewing changes to qml/ErrorApplication.qml

  • Committer: Nick Dedekind
  • Date: 2017-03-15 15:22:07 UTC
  • mfrom: (2868 unity8)
  • mto: This revision was merged to the branch mainline in revision 2892.
  • Revision ID: nick.dedekind@canonical.com-20170315152207-9ts6lyu1v2pruue2
merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* Copyright (C) 2017 Canonical, Ltd.
 
3
*
 
4
* This program is free software; you can redistribute it and/or modify
 
5
* it under the terms of the GNU General Public License as published by
 
6
* the Free Software Foundation; version 3.
 
7
*
 
8
* This program is distributed in the hope that it will be useful,
 
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
* GNU General Public License for more details.
 
12
*
 
13
* You should have received a copy of the GNU General Public License
 
14
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
*/
 
16
 
 
17
import QtQuick 2.4
 
18
import QtQuick.Window 2.2
 
19
import Ubuntu.Components 1.3
 
20
import Unity.Screens 0.1
 
21
 
 
22
Instantiator {
 
23
    id: root
 
24
    model: Screens
 
25
 
 
26
    ScreenWindow {
 
27
        id: window
 
28
        objectName: "screen"+index
 
29
        screen: model.screen
 
30
        visibility:  applicationArguments.hasFullscreen ? Window.FullScreen : Window.Windowed
 
31
        flags: applicationArguments.hasFrameless ? Qt.FramelessWindowHint : 0
 
32
 
 
33
        Binding {
 
34
            when: applicationArguments.hasGeometry
 
35
            target: window
 
36
            property: "width"
 
37
            value: applicationArguments.windowGeometry.width
 
38
        }
 
39
        Binding {
 
40
            when: applicationArguments.hasGeometry
 
41
            target: window
 
42
            property: "height"
 
43
            value: applicationArguments.windowGeometry.height
 
44
        }
 
45
 
 
46
        Loader {
 
47
            width: window.width
 
48
            height: window.height
 
49
 
 
50
            Rectangle {
 
51
                color: "white"
 
52
                Column {
 
53
                    spacing: units.gu(1)
 
54
 
 
55
                    Label {
 
56
                        text: "Unity encountered an unrecoverable error while loading:"
 
57
                        fontSize: "large"
 
58
                    }
 
59
 
 
60
                    Label {
 
61
                        text: errorString
 
62
                    }
 
63
                }
 
64
            }
 
65
        }
 
66
    }
 
67
}