Skip to content

Commit

Permalink
[qml/components/ComicInfoPanel.qml] Improve layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Olf0 authored Apr 1, 2024
1 parent ee38bce commit a9d36cd
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions qml/components/ComicInfoPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DockedPanel {

width: isPortrait ? parent.width : 0.7 * parent.width
height: isPortrait ? 0.7 * parent.height : parent.height
contentHeight: height - Theme.paddingMedium
contentHeight: height
dock: isPortrait ? Dock.Bottom : Dock.Right

function showComicInfo() {
Expand Down Expand Up @@ -49,10 +49,12 @@ DockedPanel {
spacing: Theme.paddingMedium
anchors.centerIn: parent
width: parent.width - Theme.horizontalPageMargin
height: parent.height - Theme.verticalPageMargin

Grid {
id: infoGrid
columns: 2
spacing: Theme.paddingMedium
spacing: infoColumn.spacing

Label {
id: nameHeaderLabel
Expand Down Expand Up @@ -128,11 +130,13 @@ DockedPanel {
asynchronous: true

width: parent.width
height: comicInfoPanel.height - (nameHeaderLabel.height + authorsHeaderLabel.height
+ languageHeaderLabel.height + exampleImageHeaderLabel.height
+ 6 * Theme.paddingMedium)

anchors.horizontalCenter: parent.horizontalCenter
height: infoColumn.height - (infoGrid.height + infoColumn.spacing
+ exampleImageHeaderLabel.height + exampleImage.anchors.topMargin)
anchors {
top: exampleImageHeaderLabel.bottom
topMargin: Theme.paddingSmall
horizontalCenter: parent.horizontalCenter
}
}
}

Expand Down

0 comments on commit a9d36cd

Please sign in to comment.