aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Main.qml3
-rw-r--r--apps/com.pelagicore.map/helpers/StandAlone.qml2
-rw-r--r--imports/shared/utils/PrimaryWindow.qml6
-rw-r--r--imports/shared/utils/Style.qml10
-rw-r--r--imports/system/models/application/ApplicationModel.qml22
-rw-r--r--sysui/display/Display.qml2
-rw-r--r--tests/qmltests/tst_WidgetDrawer.qml4
-rw-r--r--tests/qmltests/tst_WidgetGrid.qml4
8 files changed, 0 insertions, 53 deletions
diff --git a/Main.qml b/Main.qml
index 996067ac..fc5af1e1 100644
--- a/Main.qml
+++ b/Main.qml
@@ -244,9 +244,6 @@ Window {
window: root
}
- Binding { target: Style; property: "cellWidth"; value: display.width / 24 }
- Binding { target: Style; property: "cellHeight"; value: display.height / 24 }
-
function orientationFromString(str) {
str = str.trim().toLowerCase().replace('-','').replace('_','').replace('orientation','')
diff --git a/apps/com.pelagicore.map/helpers/StandAlone.qml b/apps/com.pelagicore.map/helpers/StandAlone.qml
index 49ea969e..833f3300 100644
--- a/apps/com.pelagicore.map/helpers/StandAlone.qml
+++ b/apps/com.pelagicore.map/helpers/StandAlone.qml
@@ -45,8 +45,6 @@ Window {
color: root.contentItem.NeptuneStyle.theme === NeptuneStyle.Dark ? "black" : "white"
- Binding { target: Style; property: "cellWidth"; value: root.width / 24 }
- Binding { target: Style; property: "cellHeight"; value: root.height / 24 }
Binding { target: Style; property: "assetPath"; value: Qt.resolvedUrl("/opt/neptune3/imports/assets/") }
Shortcut {
diff --git a/imports/shared/utils/PrimaryWindow.qml b/imports/shared/utils/PrimaryWindow.qml
index efcc337a..ed759454 100644
--- a/imports/shared/utils/PrimaryWindow.qml
+++ b/imports/shared/utils/PrimaryWindow.qml
@@ -105,12 +105,6 @@ ApplicationManagerWindow {
onWindowPropertyChanged: {
switch (name) {
- case "cellWidth":
- Style.cellWidth = value;
- break;
- case "cellHeight":
- Style.cellHeight = value;
- break;
case "exposedRectBottomMargin":
d.exposedRectBottomMargin = value;
break;
diff --git a/imports/shared/utils/Style.qml b/imports/shared/utils/Style.qml
index b43da475..e87dbcbd 100644
--- a/imports/shared/utils/Style.qml
+++ b/imports/shared/utils/Style.qml
@@ -47,8 +47,6 @@ QtObject {
readonly property int centerConsoleHeight: 1920
readonly property real centerConsoleAspectRatio: centerConsoleWidth / centerConsoleHeight
- property int cellWidth
- property int cellHeight
property real fontWeight: Font.Light
//StatusBar config
@@ -91,12 +89,4 @@ QtObject {
function icon(name) {
return drawableUrl + '/' + name + '.png';
}
-
- function hspan(value) {
- return Math.round(cellWidth * value)
- }
-
- function vspan(value) {
- return Math.round(cellHeight * value)
- }
}
diff --git a/imports/system/models/application/ApplicationModel.qml b/imports/system/models/application/ApplicationModel.qml
index 7125d91e..d2aebb5b 100644
--- a/imports/system/models/application/ApplicationModel.qml
+++ b/imports/system/models/application/ApplicationModel.qml
@@ -45,11 +45,6 @@ ListModel {
// The instrument cluster application.
readonly property var instrumentClusterAppInfo: d.instrumentClusterAppInfo
- // Used to calculate Style.hspan() and Style.vspan() in client apps
- // Theses values change at runtime as the system ui gets resized and rotated in the display
- property real cellWidth
- property real cellHeight
-
// The locale code (eg: "en_US") that is passed down to applications
property string localeCode
@@ -242,9 +237,6 @@ ListModel {
var isRegularApp = !!appInfo;
- AM.WindowManager.setWindowProperty(window, "cellWidth", root.cellWidth);
- AM.WindowManager.setWindowProperty(window, "cellHeight", root.cellHeight);
-
if (isRegularApp) {
var isSecondaryWindow = AM.WindowManager.windowProperty(window, "windowType") == "secondary";
@@ -289,18 +281,4 @@ ListModel {
}
}
}
-
- onCellWidthChanged: {
- for (var i = 0; i < AM.WindowManager.count; i++) {
- var window = AM.WindowManager.get(i).windowItem;
- AM.WindowManager.setWindowProperty(window, "cellWidth", root.cellWidth);
- }
- }
-
- onCellHeightChanged: {
- for (var i = 0; i < AM.WindowManager.count; i++) {
- var window = AM.WindowManager.get(i).windowItem;
- AM.WindowManager.setWindowProperty(window, "cellHeight", root.cellHeight);
- }
- }
}
diff --git a/sysui/display/Display.qml b/sysui/display/Display.qml
index 6c404fff..560ea418 100644
--- a/sysui/display/Display.qml
+++ b/sysui/display/Display.qml
@@ -78,8 +78,6 @@ Item {
property var applicationModel: ApplicationModel {
id: applicationModel
- cellWidth: Style.cellWidth
- cellHeight: Style.cellHeight
localeCode: Style.languageLocale
}
diff --git a/tests/qmltests/tst_WidgetDrawer.qml b/tests/qmltests/tst_WidgetDrawer.qml
index 6979377b..5ed26c2d 100644
--- a/tests/qmltests/tst_WidgetDrawer.qml
+++ b/tests/qmltests/tst_WidgetDrawer.qml
@@ -42,10 +42,6 @@ Item {
width: 600
height: 600
- // TODO: move this to a common base component
- Binding { target: Style; property: "cellWidth"; value: root.width / 24 }
- Binding { target: Style; property: "cellHeight"; value: root.height / 24 }
-
WidgetDrawer {
id: widgetDrawer
y: 200
diff --git a/tests/qmltests/tst_WidgetGrid.qml b/tests/qmltests/tst_WidgetGrid.qml
index 7dafa3c3..7decbf10 100644
--- a/tests/qmltests/tst_WidgetGrid.qml
+++ b/tests/qmltests/tst_WidgetGrid.qml
@@ -42,10 +42,6 @@ Item {
width: 600
height: 600
- // TODO: move this to a common base component
- Binding { target: Style; property: "cellWidth"; value: root.width / 24 }
- Binding { target: Style; property: "cellHeight"; value: root.height / 24 }
-
FakeAppInfo {
id: redApp
property Item window: Rectangle { color: "red" }