New sticker picker: layout optimizations
This commit is contained in:
parent
3262835f1d
commit
98307c59e4
1 changed files with 8 additions and 5 deletions
|
@ -78,6 +78,7 @@ Item {
|
||||||
color: Theme.overlayBackgroundColor
|
color: Theme.overlayBackgroundColor
|
||||||
opacity: 0.7
|
opacity: 0.7
|
||||||
}
|
}
|
||||||
|
|
||||||
SilicaListView {
|
SilicaListView {
|
||||||
id: stickerPickerListView
|
id: stickerPickerListView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -86,8 +87,10 @@ Item {
|
||||||
model: stickerPickerOverlayItem.installedStickerSets
|
model: stickerPickerOverlayItem.installedStickerSets
|
||||||
|
|
||||||
header: Column {
|
header: Column {
|
||||||
|
spacing: Theme.paddingSmall
|
||||||
width: stickerPickerListView.width
|
width: stickerPickerListView.width
|
||||||
height: childrenRect.height
|
height: recentStickersGridView.count > 0 ? ( Theme.fontSizeLarge + Theme.itemSizeExtraLarge + 4 * Theme.paddingSmall ) : 0
|
||||||
|
topPadding: Theme.paddingSmall
|
||||||
Label {
|
Label {
|
||||||
font.pixelSize: Theme.fontSizeLarge
|
font.pixelSize: Theme.fontSizeLarge
|
||||||
font.bold: true
|
font.bold: true
|
||||||
|
@ -100,7 +103,7 @@ Item {
|
||||||
SilicaGridView {
|
SilicaGridView {
|
||||||
id: recentStickersGridView
|
id: recentStickersGridView
|
||||||
width: stickerPickerListView.width
|
width: stickerPickerListView.width
|
||||||
height: Theme.itemSizeExtraLarge
|
height: Theme.itemSizeExtraLarge + Theme.paddingSmall
|
||||||
cellWidth: Theme.itemSizeExtraLarge;
|
cellWidth: Theme.itemSizeExtraLarge;
|
||||||
cellHeight: Theme.itemSizeExtraLarge;
|
cellHeight: Theme.itemSizeExtraLarge;
|
||||||
visible: count > 0
|
visible: count > 0
|
||||||
|
@ -125,7 +128,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spacing: Theme.paddingMedium
|
spacing: Theme.paddingSmall
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
@ -201,7 +204,7 @@ Item {
|
||||||
id: stickerSetLoader
|
id: stickerSetLoader
|
||||||
width: parent.width
|
width: parent.width
|
||||||
active: stickerSetColumn.isExpanded || height > 0
|
active: stickerSetColumn.isExpanded || height > 0
|
||||||
height: stickerSetColumn.isExpanded ? Theme.itemSizeExtraLarge : 0
|
height: stickerSetColumn.isExpanded ? Theme.itemSizeExtraLarge + Theme.paddingSmall : 0
|
||||||
opacity: stickerSetColumn.isExpanded ? 1.0 : 0.0
|
opacity: stickerSetColumn.isExpanded ? 1.0 : 0.0
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
|
@ -223,7 +226,7 @@ Item {
|
||||||
id: installedStickerSetGridView
|
id: installedStickerSetGridView
|
||||||
width: stickerSetLoader.width
|
width: stickerSetLoader.width
|
||||||
height: stickerSetLoader.height
|
height: stickerSetLoader.height
|
||||||
y: (height - Theme.itemSizeExtraLarge)/2
|
|
||||||
orientation: Qt.Horizontal
|
orientation: Qt.Horizontal
|
||||||
visible: count > 0
|
visible: count > 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue