Добавлена поддержка галереии в постах. #16

Open
sprainbrains wants to merge 77 commits from sprainbrains/harbour-fernschreiber:media_gallery into master
4 changed files with 7 additions and 7 deletions
Showing only changes of commit bba4a6468c - Show all commits

View file

@ -129,7 +129,7 @@ ListItem {
} }
function getContentWidthMultiplier() { function getContentWidthMultiplier() {
return Functions.isTablet(appWindow) ? 0.4 : 1.0 return Functions.isWidescreen(appWindow) ? 0.4 : 1.0
} }
onClicked: { onClicked: {
@ -369,10 +369,10 @@ ListItem {
id: messageTextRow id: messageTextRow
spacing: Theme.paddingSmall spacing: Theme.paddingSmall
width: precalculatedValues.entryWidth width: precalculatedValues.entryWidth
anchors.horizontalCenter: Functions.isTablet(appWindow) ? undefined : parent.horizontalCenter anchors.horizontalCenter: Functions.isWidescreen(appWindow) ? undefined : parent.horizontalCenter
anchors.left: Functions.isTablet(appWindow) ? parent.left : undefined anchors.left: Functions.isWidescreen(appWindow) ? parent.left : undefined
y: Theme.paddingSmall y: Theme.paddingSmall
anchors.leftMargin: Functions.isTablet(appWindow) ? Theme.paddingMedium : undefined anchors.leftMargin: Functions.isWidescreen(appWindow) ? Theme.paddingMedium : undefined
Loader { Loader {
id: profileThumbnailLoader id: profileThumbnailLoader

View file

@ -23,6 +23,6 @@ import "../../js/functions.js" as Functions
Grid { Grid {
width: parent.width - ( 2 * x ) width: parent.width - ( 2 * x )
columns: Functions.isTablet(appWindow) ? 2 : 1 columns: Functions.isWidescreen(appWindow) ? 2 : 1
readonly property real columnWidth: width/columns readonly property real columnWidth: width/columns
} }

View file

@ -541,6 +541,6 @@ function getMessagesNeededForwardPermissions(messages) {
return neededPermissions return neededPermissions
} }
function isTablet(appWindow) { function isWidescreen(appWindow) {
return (appWindow.deviceOrientation & Silica.Orientation.LandscapeMask) || Silica.Screen.sizeCategory === Silica.Screen.Large || Silica.Screen.sizeCategory === Silica.Screen.ExtraLarge return (appWindow.deviceOrientation & Silica.Orientation.LandscapeMask) || Silica.Screen.sizeCategory === Silica.Screen.Large || Silica.Screen.sizeCategory === Silica.Screen.ExtraLarge
} }

View file

@ -1193,7 +1193,7 @@ Page {
readonly property int profileThumbnailDimensions: showUserInfo ? Theme.itemSizeSmall : 0 readonly property int profileThumbnailDimensions: showUserInfo ? Theme.itemSizeSmall : 0
readonly property int pageMarginDouble: 2 * Theme.horizontalPageMargin readonly property int pageMarginDouble: 2 * Theme.horizontalPageMargin
readonly property int paddingMediumDouble: 2 * Theme.paddingMedium readonly property int paddingMediumDouble: 2 * Theme.paddingMedium
readonly property int entryWidth: Functions.isTablet(appWindow) ? chatView.width * 0.75 : chatView.width - pageMarginDouble readonly property int entryWidth: Functions.isWidescreen(appWindow) ? chatView.width * 0.75 : chatView.width - pageMarginDouble
readonly property int textItemWidth: entryWidth - profileThumbnailDimensions - Theme.paddingSmall readonly property int textItemWidth: entryWidth - profileThumbnailDimensions - Theme.paddingSmall
readonly property int backgroundWidth: page.isChannel ? textItemWidth : textItemWidth - pageMarginDouble readonly property int backgroundWidth: page.isChannel ? textItemWidth : textItemWidth - pageMarginDouble
readonly property int backgroundRadius: textItemWidth/50 readonly property int backgroundRadius: textItemWidth/50