mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
Merge pull request #668 from cillian64/logo
Update rpi logo and its alignment/positioning
This commit is contained in:
commit
1b44ab73e7
2 changed files with 27 additions and 8 deletions
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 23 KiB |
33
src/main.qml
33
src/main.qml
|
@ -69,24 +69,43 @@ ApplicationWindow {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
implicitHeight: window.height/3
|
id: logoContainer
|
||||||
|
implicitHeight: window.height/4
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: image
|
id: image
|
||||||
//Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "icons/logo_sxs_imager.png"
|
source: "icons/logo_sxs_imager.png"
|
||||||
width: window.width
|
|
||||||
|
// Specify the maximum size of the image
|
||||||
|
width: window.width * 0.45
|
||||||
height: window.height / 3
|
height: window.height / 3
|
||||||
|
|
||||||
|
// Within the image's specified size rectangle, resize the
|
||||||
|
// image to fit within the rectangle while keeping its aspect
|
||||||
|
// ratio the same. Preserving the aspect ratio implies some
|
||||||
|
// extra padding between the Image's extend and the actual
|
||||||
|
// image content: align left so all this padding is on the
|
||||||
|
// right.
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
horizontalAlignment: Image.AlignLeft
|
||||||
|
|
||||||
|
// Keep the left side of the image 40 pixels from the left
|
||||||
|
// edge
|
||||||
|
anchors.left: logoContainer.left
|
||||||
|
anchors.leftMargin: 40
|
||||||
|
|
||||||
|
// Equal padding above and below the image
|
||||||
|
anchors.top: logoContainer.top
|
||||||
|
anchors.bottom: logoContainer.bottom
|
||||||
|
anchors.topMargin: window.height / 25
|
||||||
|
anchors.bottomMargin: window.height / 25
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "#c31c4a"
|
color: "#c31c4a"
|
||||||
implicitWidth: window.width
|
implicitWidth: window.width
|
||||||
implicitHeight: (window.height/3) * 2
|
implicitHeight: window.height * (1 - 1/4)
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
id: gridLayout
|
id: gridLayout
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue