Skip to content

Commit

Permalink
Fixed layout bug in QML
Browse files Browse the repository at this point in the history
  • Loading branch information
kbumsik committed Jun 25, 2018
1 parent a40ea8e commit 5fabf6a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 28 deletions.
2 changes: 2 additions & 0 deletions package/appimage/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VirtScreen-x86_64.AppImage
virtscreen.AppDir
13 changes: 7 additions & 6 deletions virtscreen/assets/AppWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ApplicationWindow {

ToolButton {
id: menuButton
anchors.right: parent.right
Layout.alignment: Qt.AlignRight
text: qsTr("")
contentItem: Text {
text: parent.text
Expand Down Expand Up @@ -154,13 +154,13 @@ ApplicationWindow {
ColumnLayout {
anchors.fill: parent
Text {
anchors.horizontalCenter: parent.horizontalCenter
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
font { weight: Font.Bold; pixelSize: 20 }
text: "VirtScreen" + " v" + settings.version
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
font { pixelSize: 13 }
text: "Make your iPad/tablet/computer<br/>as a secondary monitor.<br/>"
Expand All @@ -177,15 +177,15 @@ ApplicationWindow {
}
Text {
font { pixelSize: 14 }
anchors.horizontalCenter: parent.horizontalCenter
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
lineHeight: 0.7
text: "<br/>Copyright © 2018 Bumsik Kim <a href='https://kbumsik.io/'>Homepage</a><br/>"
onLinkActivated: Qt.openUrlExternally(link)
}
Text {
font { pixelSize: 11 }
anchors.horizontalCenter: parent.horizontalCenter
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: "This program comes with absolutely no warranty.<br/>" +
"See the <a href='https://github.com/kbumsik/VirtScreen/blob/master/LICENSE'>" +
Expand Down Expand Up @@ -240,7 +240,8 @@ ApplicationWindow {
ColumnLayout {
anchors.fill: parent
ScrollView {
anchors.fill: parent
Layout.fillHeight: true
Layout.fillWidth: true
TextArea {
// readOnly: true
selectByMouse: true
Expand Down
40 changes: 18 additions & 22 deletions virtscreen/assets/VncPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ ColumnLayout {
}
}
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
Label { text: "Password"; Layout.fillWidth: true }
Button {
text: "Delete"
Expand Down Expand Up @@ -90,28 +88,26 @@ ColumnLayout {
GroupBox {
title: "Available IP addresses"
Layout.fillWidth: true
Layout.fillHeight: true
implicitHeight: 145
ColumnLayout {
ListView {
id: ipListView
anchors.fill: parent
ListView {
id: ipListView
anchors.fill: parent
clip: true
ScrollBar.vertical: ScrollBar {
parent: ipListView.parent
anchors.top: ipListView.top
anchors.right: ipListView.right
anchors.bottom: ipListView.bottom
policy: ScrollBar.AlwaysOn
}
model: network.ipAddresses
delegate: TextEdit {
text: modelData
readOnly: true
selectByMouse: true
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 14
}
clip: true
ScrollBar.vertical: ScrollBar {
parent: ipListView.parent
anchors.top: ipListView.top
anchors.right: ipListView.right
anchors.bottom: ipListView.bottom
policy: ScrollBar.AlwaysOn
}
model: network.ipAddresses
delegate: TextEdit {
text: modelData
readOnly: true
selectByMouse: true
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 14
}
}
}
Expand Down

0 comments on commit 5fabf6a

Please sign in to comment.