Fix scrolling of Launcxher FirstRun
Johnathan R pointed out that for wider windows, the button was invisible, fix this will a scrollbar.
This commit is contained in:
parent
f8222da1da
commit
1ef6578ad4
1 changed files with 129 additions and 105 deletions
|
@ -3,138 +3,162 @@ import FlightGear 1.0
|
|||
import FlightGear.Launcher 1.0
|
||||
import "."
|
||||
|
||||
Rectangle {
|
||||
color: Style.themeColor
|
||||
Item {
|
||||
id: root
|
||||
|
||||
Item {
|
||||
id: imageClipFrame
|
||||
clip: true
|
||||
Rectangle {
|
||||
id: content
|
||||
color: Style.themeColor
|
||||
anchors.fill: parent
|
||||
|
||||
height: root.height * 0.5
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
}
|
||||
|
||||
PreviewImage {
|
||||
id: preview
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
// over-zoom the preview to fill the entire space available
|
||||
readonly property double scale: Math.max(root.width / sourceSize.width,
|
||||
imageClipFrame.height / sourceSize.height)
|
||||
|
||||
width: height * aspectRatio
|
||||
height: scale * sourceSize.height
|
||||
|
||||
property var urlsList: _launcher.defaultSplashUrls()
|
||||
imageUrl: urlsList[0]
|
||||
}
|
||||
|
||||
Text {
|
||||
id: logoText
|
||||
width: parent.width - Style.strutSize
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
topMargin: Style.strutSize
|
||||
}
|
||||
|
||||
font.pointSize: Style.strutSize * 3
|
||||
font.italic: true
|
||||
font.bold: true
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
fontSizeMode: Text.Fit
|
||||
text: "FlightGear " + _launcher.versionString
|
||||
color: "white"
|
||||
style: Text.Outline
|
||||
styleColor: "black"
|
||||
}
|
||||
}
|
||||
|
||||
Flickable {
|
||||
id: flick
|
||||
|
||||
contentHeight: textColumn.childrenRect.height + imageClipFrame.height + (Style.strutSize * 2)
|
||||
flickableDirection: Flickable.VerticalFlick
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
|
||||
Column {
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: imageClipFrame.bottom
|
||||
Item {
|
||||
id: imageClipFrame
|
||||
clip: true
|
||||
|
||||
margins: Style.strutSize
|
||||
}
|
||||
height: root.height * 0.5
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
}
|
||||
|
||||
spacing: Style.strutSize
|
||||
PreviewImage {
|
||||
id: preview
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
font.pixelSize: Style.baseFontPixelSize * 1.5
|
||||
color: "white"
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.centerIn: parent
|
||||
|
||||
readonly property string forumLink: "href=\"http://forum.flightgear.org\"";
|
||||
// over-zoom the preview to fill the entire space available
|
||||
readonly property double scale: Math.max(root.width / sourceSize.width,
|
||||
imageClipFrame.height / sourceSize.height)
|
||||
|
||||
text: qsTr("Welcome to FlightGear, the open-source flight simulator. " +
|
||||
"Everything in this software is the work of volunteers; we hope " +
|
||||
"you enjoy it. If you find problems, or would like to contribute, " +
|
||||
"please <a %1>visit our user forum</a>.").arg(forumLink)
|
||||
width: height * aspectRatio
|
||||
height: scale * sourceSize.height
|
||||
|
||||
onLinkActivated: {
|
||||
Qt.openUrlExternally(link)
|
||||
property var urlsList: _launcher.defaultSplashUrls()
|
||||
imageUrl: urlsList[0]
|
||||
}
|
||||
|
||||
Text {
|
||||
id: logoText
|
||||
width: parent.width - Style.strutSize
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
topMargin: Style.strutSize
|
||||
}
|
||||
|
||||
font.pointSize: Style.strutSize * 3
|
||||
font.italic: true
|
||||
font.bold: true
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
fontSizeMode: Text.Fit
|
||||
text: "FlightGear " + _launcher.versionString
|
||||
color: "white"
|
||||
style: Text.Outline
|
||||
styleColor: "black"
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
font.pixelSize: Style.baseFontPixelSize * 1.5
|
||||
color: "white"
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
readonly property string gplLink: "href=\"https://www.gnu.org/licenses/gpl-3.0.html\"";
|
||||
|
||||
text: qsTr("FlightGear is Free software, licensed under the <a %1>GNU General Public License</a>. " +
|
||||
"This means you are are free to use the software, customise it, or make fixes to it, so long as " +
|
||||
"you share your changes with the community.").arg(gplLink)
|
||||
Column {
|
||||
id: textColumn
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: imageClipFrame.bottom
|
||||
|
||||
onLinkActivated: {
|
||||
Qt.openUrlExternally(link)
|
||||
margins: Style.strutSize
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
font.pixelSize: Style.baseFontPixelSize * 1.5
|
||||
color: "white"
|
||||
spacing: Style.strutSize
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
Text {
|
||||
width: parent.width
|
||||
font.pixelSize: Style.baseFontPixelSize * 1.5
|
||||
color: "white"
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
text: qsTr("FlightGear can automatically report crashes and errors to the development team, " +
|
||||
"which helps to improve the software for everyone. This reporting is anonymous but " +
|
||||
"contains information such as the aircraft in use, your operating system and graphics driver. " +
|
||||
"You can enable or disable this reporting in the 'Settings' page."
|
||||
)
|
||||
}
|
||||
readonly property string forumLink: "href=\"http://forum.flightgear.org\"";
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
text: qsTr("Welcome to FlightGear, the open-source flight simulator. " +
|
||||
"Everything in this software is the work of volunteers; we hope " +
|
||||
"you enjoy it. If you find problems, or would like to contribute, " +
|
||||
"please <a %1>visit our user forum</a>.").arg(forumLink)
|
||||
|
||||
Button {
|
||||
invertColor: true
|
||||
text: qsTrId("Okay");
|
||||
anchors.right: parent.right
|
||||
|
||||
onClicked: {
|
||||
OverlayShared.globalOverlay.dismissOverlay();
|
||||
onLinkActivated: {
|
||||
Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
}
|
||||
} // of column
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
font.pixelSize: Style.baseFontPixelSize * 1.5
|
||||
color: "white"
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
readonly property string gplLink: "href=\"https://www.gnu.org/licenses/gpl-3.0.html\"";
|
||||
|
||||
text: qsTr("FlightGear is Free software, licensed under the <a %1>GNU General Public License</a>. " +
|
||||
"This means you are are free to use the software, customise it, or make fixes to it, so long as " +
|
||||
"you share your changes with the community.").arg(gplLink)
|
||||
|
||||
onLinkActivated: {
|
||||
Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
font.pixelSize: Style.baseFontPixelSize * 1.5
|
||||
color: "white"
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
text: qsTr("FlightGear can automatically report crashes and errors to the development team, " +
|
||||
"which helps to improve the software for everyone. This reporting is anonymous but " +
|
||||
"contains information such as the aircraft in use, your operating system and graphics driver. " +
|
||||
"You can enable or disable this reporting in the 'Settings' page."
|
||||
)
|
||||
}
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
Button {
|
||||
invertColor: true
|
||||
text: qsTrId("Okay");
|
||||
anchors.right: parent.right
|
||||
|
||||
onClicked: {
|
||||
OverlayShared.globalOverlay.dismissOverlay();
|
||||
}
|
||||
}
|
||||
}
|
||||
} // of column
|
||||
|
||||
} // of Flickable
|
||||
|
||||
|
||||
Scrollbar {
|
||||
id: scrollbar
|
||||
anchors.right: parent.right
|
||||
height: flick.height
|
||||
flickable: flick
|
||||
visible: flick.contentHeight > flick.height
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} // of Item
|
||||
|
|
Loading…
Add table
Reference in a new issue