diff --git a/qml/components/MessageListViewItem.qml b/qml/components/MessageListViewItem.qml index 5ff54d8c..81cf5729 100644 --- a/qml/components/MessageListViewItem.qml +++ b/qml/components/MessageListViewItem.qml @@ -129,7 +129,7 @@ ListItem { } function getContentWidthMultiplier() { - return Functions.isTablet(appWindow) ? 0.4 : 1.0 + return Functions.isWidescreen(appWindow) ? 0.4 : 1.0 } onClicked: { @@ -369,10 +369,10 @@ ListItem { id: messageTextRow spacing: Theme.paddingSmall width: precalculatedValues.entryWidth - anchors.horizontalCenter: Functions.isTablet(appWindow) ? undefined : parent.horizontalCenter - anchors.left: Functions.isTablet(appWindow) ? parent.left : undefined + anchors.horizontalCenter: Functions.isWidescreen(appWindow) ? undefined : parent.horizontalCenter + anchors.left: Functions.isWidescreen(appWindow) ? parent.left : undefined y: Theme.paddingSmall - anchors.leftMargin: Functions.isTablet(appWindow) ? Theme.paddingMedium : undefined + anchors.leftMargin: Functions.isWidescreen(appWindow) ? Theme.paddingMedium : undefined Loader { id: profileThumbnailLoader diff --git a/qml/components/settingsPage/ResponsiveGrid.qml b/qml/components/settingsPage/ResponsiveGrid.qml index 8caf663f..a5bc5923 100644 --- a/qml/components/settingsPage/ResponsiveGrid.qml +++ b/qml/components/settingsPage/ResponsiveGrid.qml @@ -23,6 +23,6 @@ import "../../js/functions.js" as Functions Grid { width: parent.width - ( 2 * x ) - columns: Functions.isTablet(appWindow) ? 2 : 1 + columns: Functions.isWidescreen(appWindow) ? 2 : 1 readonly property real columnWidth: width/columns } diff --git a/qml/js/functions.js b/qml/js/functions.js index e1c26347..5199d829 100644 --- a/qml/js/functions.js +++ b/qml/js/functions.js @@ -541,6 +541,6 @@ function getMessagesNeededForwardPermissions(messages) { 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 } diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml index 41ad7848..d6dbe802 100644 --- a/qml/pages/ChatPage.qml +++ b/qml/pages/ChatPage.qml @@ -1193,7 +1193,7 @@ Page { readonly property int profileThumbnailDimensions: showUserInfo ? Theme.itemSizeSmall : 0 readonly property int pageMarginDouble: 2 * Theme.horizontalPageMargin 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 backgroundWidth: page.isChannel ? textItemWidth : textItemWidth - pageMarginDouble readonly property int backgroundRadius: textItemWidth/50