Skip to content

Commit

Permalink
Merge pull request #273 from HelloVolla/dev
Browse files Browse the repository at this point in the history
Fixes for tablet and phone distinction
  • Loading branch information
wurzer authored Dec 10, 2024
2 parents 2083238 + d958597 commit ee7feaf
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
4 changes: 3 additions & 1 deletion AppGrid.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ LauncherPage {
"org.fossify.musicplayer": "/icons/music@4x.png",
"com.volla.messages": "/icons/volla-messages@4x.png",
"com.contactoffice.mailfence": "/icons/email@4x.png",
"com.emclient.mailclient": "/icons/email@4x.png",
"com.emclient.mailclient": "/icons/email@4x.png",
"net.thunderbird.android": "/icons/email@4x.png",
"be.engie.smart": "/icons/engie@4x.png",
"be.bmid.itsme": "/icons/itsme@4x.png",
"com.facebook.lite": "/icons/facebook-lite@4x.png",
Expand Down Expand Up @@ -122,6 +123,7 @@ LauncherPage {
"com.google.android.gm" : qsTr("Mail"),
"eu.faircode.email" : qsTr("Mail"),
"com.emclient.mailclient" : qsTr("Mail"),
"net.thunderbird.android" : qsTr("Mail"),
"com.fsck.k9": qsTr("Mail"),
"at.bitfire.davdroid": qsTr("Sync"),
"hideme.android.vpn.noPlayStore": qsTr("VPN"),
Expand Down
4 changes: 2 additions & 2 deletions AppGroup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Item {
property double desaturation: 1.0
property int groupIndex: 0
property int selectedGroupIndex: 1
property int columnCount: Screen.desktopAvailableWidth < 363 ? 4 : Screen.desktopAvailableWidth > 800 ? 8 : 5
property int columnCount: Screen.desktopAvailableWidth < 446 ? 4 : Screen.desktopAvailableWidth > 800 ? 8 : 5

property bool unreadMessages: false
property bool newCalls: false
Expand All @@ -39,7 +39,7 @@ Item {

Component.onCompleted: {
console.debug("AppGroup | Screen width: " + Screen.desktopAvailableWidth)
columnCount = Screen.desktopAvailableWidth < 363 ? 4 : Screen.desktopAvailableWidth > 800 ? 8 : 5
columnCount = Screen.desktopAvailableWidth < 446 ? 4 : Screen.desktopAvailableWidth > 800 ? 8 : 5
}

onWidthChanged: {
Expand Down
8 changes: 4 additions & 4 deletions LauncherPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Page {
anchors.fill: parent
color: "transparent"
}
anchors.topMargin: Screen.desktopAvailableWidth > 362 ? 22 : 0
anchors.bottomMargin: Screen.desktopAvailableWidth > 362 ? 22 : 0
anchors.leftMargin: Screen.desktopAvailableWidth > 362 ? 100 : 0
anchors.rightMargin: Screen.desktopAvailableWidth > 362 ? 100 : 0
anchors.topMargin: Screen.desktopAvailableWidth > 520 ? 22 : 0
anchors.bottomMargin: Screen.desktopAvailableWidth > 520 ? 22 : 0
anchors.leftMargin: Screen.desktopAvailableWidth > 520 ? 100 : 0
anchors.rightMargin: Screen.desktopAvailableWidth > 520 ? 100 : 0
}
7 changes: 3 additions & 4 deletions Springboard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1224,12 +1224,11 @@ LauncherPage {

MouseArea {
id: shortcutMenu
width: mainView.isTablet ? springBoard.menuWidth
: springBoard.width
width: Screen.desktopAvailableWidth > 445 ? springBoard.menuWidth : springBoard.width
height: dotShortcut ? mainView.innerSpacing * 4 : mainView.innerSpacing * 3
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: -mainView.outerSpacing
anchors.rightMargin: 0 - mainView.outerSpacing

preventStealing: true
enabled: !textInputArea.activeFocus && !defaultSuggestions
Expand Down Expand Up @@ -1307,7 +1306,7 @@ LauncherPage {

function createShortcuts(shortcuts) {
var leftDistance = mainView.innerSpacing * 4
var componentWidth = Screen.width > 360 ? Screen.width * 0.6 - leftDistance : Screen.width - leftDistance
var componentWidth = Screen.width > 363 ? Screen.width * 0.6 - leftDistance : Screen.width - leftDistance
console.log("Springboard | Width " + componentWidth)
for (var i = 0; i < shortcuts.length; i++) {
if (shortcuts[i]["activated"]) {
Expand Down
2 changes: 1 addition & 1 deletion android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<manifest package="com.volla.launcher" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="3.0" android:versionCode="400" android:installLocation="auto">
<manifest package="com.volla.launcher" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="3.0.1" android:versionCode="401" android:installLocation="auto">
<uses-sdk android:minSdkVersion="28" android:targetSdkVersion="29"/>

<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Expand Down
8 changes: 4 additions & 4 deletions main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ ApplicationWindow {
}
}

property real outerSpacing: Screen.desktopAvailableWidth > 362 ? 100 : 0
property real innerSpacing : Screen.desktopAvailableWidth > 362 ? 22 : 22 // 22.0
property real componentSpacing: Screen.desktopAvailableWidth > 362 ? 32 : 22
property real outerSpacing: Screen.desktopAvailableWidth > 520 ? 100 : 0
property real innerSpacing : Screen.desktopAvailableWidth > 520 ? 22 : 22 // 22.0
property real componentSpacing: Screen.desktopAvailableWidth > 520 ? 32 : 22
property real headerFontSize: 36.0
property real largeFontSize: 20.0
property real mediumFontSize: 18.0
Expand Down Expand Up @@ -227,7 +227,7 @@ ApplicationWindow {
property var vibrationDuration: 50
property bool useVibration: settings.useHapticMenus
property bool useColetedIdons: settings.useColoredIcons
property bool isTablet: Screen.desktopAvailableWidth > 362
property bool isTablet: Screen.desktopAvailableWidth > 520
property int maxTitleLength: 120

property string galleryApp: "org.fossify.gallery"
Expand Down

0 comments on commit ee7feaf

Please # to comment.