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 FlightGear.Launcher 1.0
|
||||||
import "."
|
import "."
|
||||||
|
|
||||||
Rectangle {
|
Item {
|
||||||
color: Style.themeColor
|
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
Item {
|
Rectangle {
|
||||||
id: imageClipFrame
|
id: content
|
||||||
clip: true
|
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 {
|
Item {
|
||||||
anchors {
|
id: imageClipFrame
|
||||||
left: parent.left
|
clip: true
|
||||||
right: parent.right
|
|
||||||
top: imageClipFrame.bottom
|
|
||||||
|
|
||||||
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 {
|
anchors.centerIn: parent
|
||||||
width: parent.width
|
|
||||||
font.pixelSize: Style.baseFontPixelSize * 1.5
|
|
||||||
color: "white"
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
|
|
||||||
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. " +
|
width: height * aspectRatio
|
||||||
"Everything in this software is the work of volunteers; we hope " +
|
height: scale * sourceSize.height
|
||||||
"you enjoy it. If you find problems, or would like to contribute, " +
|
|
||||||
"please <a %1>visit our user forum</a>.").arg(forumLink)
|
|
||||||
|
|
||||||
onLinkActivated: {
|
property var urlsList: _launcher.defaultSplashUrls()
|
||||||
Qt.openUrlExternally(link)
|
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>. " +
|
Column {
|
||||||
"This means you are are free to use the software, customise it, or make fixes to it, so long as " +
|
id: textColumn
|
||||||
"you share your changes with the community.").arg(gplLink)
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
top: imageClipFrame.bottom
|
||||||
|
|
||||||
onLinkActivated: {
|
margins: Style.strutSize
|
||||||
Qt.openUrlExternally(link)
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
spacing: Style.strutSize
|
||||||
width: parent.width
|
|
||||||
font.pixelSize: Style.baseFontPixelSize * 1.5
|
|
||||||
color: "white"
|
|
||||||
|
|
||||||
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, " +
|
readonly property string forumLink: "href=\"http://forum.flightgear.org\"";
|
||||||
"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 {
|
text: qsTr("Welcome to FlightGear, the open-source flight simulator. " +
|
||||||
width: parent.width
|
"Everything in this software is the work of volunteers; we hope " +
|
||||||
height: childrenRect.height
|
"you enjoy it. If you find problems, or would like to contribute, " +
|
||||||
|
"please <a %1>visit our user forum</a>.").arg(forumLink)
|
||||||
|
|
||||||
Button {
|
onLinkActivated: {
|
||||||
invertColor: true
|
Qt.openUrlExternally(link)
|
||||||
text: qsTrId("Okay");
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
OverlayShared.globalOverlay.dismissOverlay();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} // 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