aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel d'Andrada <daniel.dandrada@luxoft.com>2018-03-20 15:50:37 +0100
committerLukáš Tinkl <ltinkl@luxoft.com>2018-03-21 16:17:44 +0000
commitafe88e5f3a12a908ae2806e197112185aeb6b489 (patch)
treef0dbf97a337cf266915a0782520bdb9c6bdd208d
parent49f330a8d101dd44ee430c3107081e60099fa98b (diff)
[style] Remove unsupported window size configuration options
Our center console UI has a fixed 9/16 aspect ratio with a target resolution of 1080x1920, although any other resolution is supported (but through scaling assets) Change-Id: I0475b8eed3da6426a192854ab74c4865b48ec6ce Reviewed-by: Lukáš Tinkl <ltinkl@luxoft.com>
-rw-r--r--Main.qml4
-rw-r--r--README.md13
-rw-r--r--plugins/styles/neptune/neptunestyle.cpp19
-rw-r--r--plugins/styles/neptune/neptunestyle.h7
-rw-r--r--plugins/styles/neptune/qtquickcontrols2.conf4
-rw-r--r--styles/1080x1920Neptune.conf14
-rw-r--r--styles/1280x800Neptune.conf14
-rw-r--r--styles/768x1024Neptune.conf14
8 files changed, 2 insertions, 87 deletions
diff --git a/Main.qml b/Main.qml
index aa30a047..52743c62 100644
--- a/Main.qml
+++ b/Main.qml
@@ -335,7 +335,7 @@ Window {
// Don't use bindings for setting up the initial size. Otherwise the binding is revaluated
// on every language change, which results in resetting the window size to it's initial state
// and might overwrite the size given by the OS or the user using the WindowManager
- width = root.contentItem.NeptuneStyle.windowWidth
- height = root.contentItem.NeptuneStyle.windowHeight
+ width = Style.centerConsoleWidth
+ height = Style.centerConsoleHeight
}
}
diff --git a/README.md b/README.md
index 08ff8d91..7edf32eb 100644
--- a/README.md
+++ b/README.md
@@ -55,17 +55,4 @@ In case QtIVI is not installed, 'dummyimports' folder contains QML dummy impleme
$ QML2_IMPORT_PATH=/path/to/dummyimports neptune3-ui -r
-
-# Style Configuration
-
-Neptune 3 UI supports different style configurations which can be used to adapt the style to the needs of the Hardware the UI should be running on.
-The following resolutions are available:
-
-* 1080x1920 - default
-* 1280x800
-* 1080x1920
-* 768x1024
-
-To set the UI for wanted (other than default one) resolution, set the 'QT_QUICK_CONTROLS_CONF' to the location of QtQuickControls 2 configuration file. Configuration files are within 'styles' folder (https://doc.qt.io/qt-5/qtquickcontrols2-environment.html).
-
NOTE: You need to have Open Sans font installed (see assets folder within the modules)
diff --git a/plugins/styles/neptune/neptunestyle.cpp b/plugins/styles/neptune/neptunestyle.cpp
index 160c9fc2..4957eeec 100644
--- a/plugins/styles/neptune/neptunestyle.cpp
+++ b/plugins/styles/neptune/neptunestyle.cpp
@@ -106,7 +106,6 @@ public:
: font(QGuiApplication::font())
, fontFactor(1.0)
, theme(NeptuneStyle::Light)
- , windowSize(1080, 1920)
, scale(1.0)
{
compute();
@@ -115,7 +114,6 @@ public:
: font(data.font)
, fontFactor(data.fontFactor)
, theme(data.theme)
- , windowSize(data.windowSize)
, scale(data.scale)
{
compute();
@@ -134,7 +132,6 @@ public:
QFont font;
qreal fontFactor;
NeptuneStyle::Theme theme;
- QSize windowSize;
int fontSizeXXS;
int fontSizeXS;
int fontSizeS;
@@ -360,16 +357,6 @@ int NeptuneStyle::fontFactor() const
return m_data->fontFactor;
}
-qreal NeptuneStyle::windowWidth() const
-{
- return m_data->windowSize.width();
-}
-
-qreal NeptuneStyle::windowHeight() const
-{
- return m_data->windowSize.height();
-}
-
void NeptuneStyle::init()
{
static bool initialized = false;
@@ -393,12 +380,6 @@ void NeptuneStyle::init()
data = resolveSetting(settings, "FontFamily");
GlobalStyleData.font.setFamily(toString(data, GlobalStyleData.font.family()));
- data = resolveSetting(settings, "WindowWidth");
- GlobalStyleData.windowSize.setWidth(toInteger(data, GlobalStyleData.windowSize.width()));
-
- data = resolveSetting(settings, "WindowHeight");
- GlobalStyleData.windowSize.setHeight(toInteger(data, GlobalStyleData.windowSize.height()));
-
resolveGlobalThemeData(settings);
QGuiApplication::setFont(GlobalStyleData.font);
diff --git a/plugins/styles/neptune/neptunestyle.h b/plugins/styles/neptune/neptunestyle.h
index 75838a57..4609a91a 100644
--- a/plugins/styles/neptune/neptunestyle.h
+++ b/plugins/styles/neptune/neptunestyle.h
@@ -88,9 +88,6 @@ class NeptuneStyle : public QQuickStyleAttached
Q_PROPERTY(QString fontFamily READ fontFamily NOTIFY neptuneStyleChanged FINAL)
Q_PROPERTY(int fontFactor READ fontFactor NOTIFY neptuneStyleChanged FINAL)
- Q_PROPERTY(qreal windowWidth READ windowWidth NOTIFY neptuneStyleChanged FINAL)
- Q_PROPERTY(qreal windowHeight READ windowHeight NOTIFY neptuneStyleChanged FINAL)
-
Q_PROPERTY(QString backgroundImage READ backgroundImage NOTIFY neptuneStyleChanged)
/*
@@ -170,10 +167,6 @@ public:
QString fontFamily() const;
int fontFactor() const;
- qreal windowWidth() const;
-
- qreal windowHeight() const;
-
Theme theme() const;
void setTheme(Theme);
void inheritTheme(Theme theme);
diff --git a/plugins/styles/neptune/qtquickcontrols2.conf b/plugins/styles/neptune/qtquickcontrols2.conf
index 83b1f054..2ba00a39 100644
--- a/plugins/styles/neptune/qtquickcontrols2.conf
+++ b/plugins/styles/neptune/qtquickcontrols2.conf
@@ -8,7 +8,3 @@ Theme=Light
FontSize=28
FontFactor=1.0
FontFamily="Open Sans"
-WindowWidth=1080
-WindowHeight=1920
-Dark/BrightColor=#FEFEFE
-Light/BrightColor=#3E3E3E
diff --git a/styles/1080x1920Neptune.conf b/styles/1080x1920Neptune.conf
deleted file mode 100644
index b217e22c..00000000
--- a/styles/1080x1920Neptune.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-[Controls]
-Style=Material
-[Material]
-Theme=Light
-
-[Neptune]
-Theme=Light
-FontSize=28
-FontFactor=1.0
-FontFamily="Open Sans"
-WindowWidth=1080
-WindowHeight=1920
-Dark/BrightColor=#FEFEFE
-Light/BrightColor=#3E3E3E
diff --git a/styles/1280x800Neptune.conf b/styles/1280x800Neptune.conf
deleted file mode 100644
index b9ef0c16..00000000
--- a/styles/1280x800Neptune.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-[Controls]
-Style=Material
-[Material]
-Theme=Dark
-
-[Neptune]
-Theme=Dark
-FontSize=22
-FontFactor=1.0
-FontFamily="Open Sans"
-WindowWidth=1280
-WindowHeight=800
-Dark/BrightColor=#FEFEFE
-Light/BrightColor=#3E3E3E
diff --git a/styles/768x1024Neptune.conf b/styles/768x1024Neptune.conf
deleted file mode 100644
index bd949e6f..00000000
--- a/styles/768x1024Neptune.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-[Controls]
-Style=Material
-[Material]
-Theme=Dark
-
-[Neptune]
-Theme=Dark
-FontSize=20
-FontFactor=1.0
-FontFamily="Open Sans"
-WindowWidth=768
-WindowHeight=1024
-Dark/BrightColor=#FEFEFE
-Light/BrightColor=#3E3E3E