mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
Update rpi logo and its alignment/positioning
- Update back to colour logo - Change logo alignment and positioning to make it generally left-aligned, have some nice padding above and below it, and to not occupy the full window width.
This commit is contained in:
parent
f28b9d0d77
commit
e3586e72b7
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
|
||||
|
||||
Rectangle {
|
||||
implicitHeight: window.height/3
|
||||
id: logoContainer
|
||||
implicitHeight: window.height/4
|
||||
|
||||
Image {
|
||||
id: image
|
||||
//Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
fillMode: Image.PreserveAspectFit
|
||||
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
|
||||
|
||||
// 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 {
|
||||
color: "#c31c4a"
|
||||
implicitWidth: window.width
|
||||
implicitHeight: (window.height/3) * 2
|
||||
implicitHeight: window.height * (1 - 1/4)
|
||||
|
||||
GridLayout {
|
||||
id: gridLayout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue