Commit graph

24 commits

Author SHA1 Message Date
Dirk Hohndel
f678be0374 mobile/cleanup: make theme test page work in dark mode
Not really user visible, but still, that looked ridiculous.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-19 12:42:48 -08:00
Dirk Hohndel
4843ae4ede mobile/UI: add visualization of font size vs gridUnit
This seems harmless and obvious, but it shows that for the last however
many years our smaller/regular/larger font change was bogus and broken.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-19 12:35:29 -08:00
jan Iversen
35de9c49a4 mobile-widgets: switch to new subsurfaceTheme
Remove subsurfaceTheme from main.qml
Replace ThemeNew -> subsurfaceTheme
change registration ThemeNew -> subsurfaceTheme

Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03 17:30:35 -08:00
jan Iversen
8339384eeb mobile-widgets/qml: move fontMetrics to ThemeTest
fontMetrics is no longer used in production code, but still in the theme test
page.

Isolate fontMetrics in ThemeTest page.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30 07:52:57 +02:00
jan Iversen
a3e3a30b70 mobile-widgets: move basePointSize to themeinterface
Check defaultfont and calculate basepointsize in themeinterface instead
of in QML.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30 07:51:05 +02:00
Jan Mulder
9b199602c6 Mobile QML UI: bump Kirigami imports to 2.4
Primarily for reasens of keeping up with upstream. And hopefully
bugfixes and added functionality.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-01 05:29:46 -07:00
Jan Mulder
c2c751c164 mobile, QML: introduce basePointSize in subsurfaceTheme
By manipulation the used font pointSize property, we can dynamically
scale fonts and derived UI objects. At the same time, we have
some logic to determine the default font, its size, etc, for example
depending on screen properties. The scaling of the UI (and its font)
does not need to interfere with those defaults.

However, when we want to reset the pointSize, we alter the default, so
a backup of the default is needed. Ok, not al full backup, as the only
thing we like to manipulate is the pointSize, to which we want to be
able to return.

All this leads to this commit. A basePointSize property is added, that
is initialized from the default. Due to the binding logic of the QML
engine, it is not a classic initialization, but a binding between the
2 properties. We need to break that binding explicitly, so that
the original PointSize is always preserved.

In addition, a display of the new font property is added to the
developers theme test.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25 16:01:39 +02:00
Jan Mulder
a9c6b1472b mobile, QML: do not user a local font metric object
This theme test display created a new local FontMetrics object, that
does not per definition correspond with the "global" font metric
as defined in main.qml. The fix is simple. Display the font theme
data based on the one and only font metric from main.qml

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25 16:01:39 +02:00
Jan Mulder
65d80d3cd0 Mobile QML UI: fix background colors
For some reason, after the update of the main.qml to version 2.2,
all Kirigami Pages and scrollablePages show up plain white.

So now, set a proper background for these pages.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-02-17 21:05:33 +01:00
Jan Mulder
fea111cb3a QML UI: QtQuick.Layouts to 1.2
And again, no visual changes.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-19 12:20:43 -08:00
Jan Mulder
e9903d1835 QML UI: QtQuick.Controls to version 2.2
Tested fine without visual changes.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-19 12:20:43 -08:00
Jan Mulder
f3d978b8a5 QML UI: QtQuick to 2.6
Upgrade QtQuick to 2.6. Seeing a small artifact in the application
header, lets see what happens when upgrading more includes.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-19 12:20:43 -08:00
Jan Mulder
3b5375d553 QML UI: Kirigami to 2.2
When first tested this commit, especially the dive list was looking
terrible. However, after including newer SHA's from libkirigami, and
correcting lots of spacing/margin issue, a retest of this commit shows
no strange artifact any more, and the amount of warnings in the log
output is reduced significantly. So now, it appears save to
upgrade.

Notice that main.qml still uses Kirigami 2.0. and is not updated in
this commit. With version 2.2, there is a new way of theming, that
is not (yet) compatible with our current code. Blindly upgrading to
2.2 leads to a almost black dive list, wrong button colors, and
runtime errors in the log, due to the fact the direct setting from
QML Kirigami's Theme colors is not allowed any more.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-19 12:20:43 -08:00
Jan Mulder
d623eccdef mobile: silence deprecated messages in logging about Kirigami.Label
Commit 8f6827ab12 brought a new SHA for Kirigami, but that introduces
a very noisy logging of "Kirigami.Label is deprecated. Use
QtQuickControls2.Label instead".

So, thats what done here.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-17 15:32:27 +02:00
Dirk Hohndel
8525805f04 Add SPDX header to mobile widgets and QML files
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Dirk Hohndel
540b3548b9 QML UI: add 2cm x 2cm square to theme test page
This should make it easier to spot displays that are completely out of
whack in their scaling.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-13 18:21:50 -07:00
Marco Martin
751626eec5 QML UI: Fully port dive edit to Kirigami2
Completely adapt to the api changes of OverlaySheet in Kirigami2
in order to achieve the same look and behavior for the dive
edits that had with kirigami1

Port most components to QtQuickContrls2, except comboboxes
in the dive edit sheet that will need a new control type

Signed-off-by: Marco Martin <notmart@gmail.com>
2017-04-01 09:35:51 +02:00
Dirk Hohndel
14b4c94ded Revert "QML UI: build against latest Kirigami"
This reverts commit a842e44b68.
2017-01-21 14:42:10 -08:00
Dirk Hohndel
a842e44b68 QML UI: build against latest Kirigami
But of course this doesn't work, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27 01:47:01 -08:00
Dirk Hohndel
cf4a4dd98b QML UI: format numbers for Theme info
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-15 20:48:23 -07:00
Dirk Hohndel
1a78ecf570 QML-UI: don't translate the theme test strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04 15:10:21 -07:00
Robert C. Helling
502be2a0f1 Mark strings in qml files for translation
I did this semi-automatically: I used the script from
the previous patch and then did some manual corrections.

This marks only title: and text: tags, there might be others

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03 12:59:16 -07:00
Dirk Hohndel
6d1effe886 QML UI: more theme information
The fonts on my Nexus 6p are way too big (especially when compared
to the fonts of the same build on an iPhone 6plus that has very
similar screen size). Simply trying to get more data...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 16:50:43 -07:00
Dirk Hohndel
7be962bfc2 Move subsurface-core to core and qt-mobile to mobile-widgets
Having subsurface-core as a directory name really messes with
autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an
autocomplete conflict and also was inconsistent with the desktop-widget
name for the directory containing the "other" UI.

And while cleaning up the resulting change in the path name for include
files, I decided to clean up those even more to make them consistent
overall.

This could have been handled in more commits, but since this requires a
make clean before the build, it seemed more sensible to do it all in one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04 22:33:58 -07:00
Renamed from qt-mobile/qml/ThemeTest.qml (Browse further)