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>
Different approach here:
- profile gets a bit higher, this was requested on the mailinglist, and
seems to behave much better with the painted profile, we'd otherwise
get it magically clipped on the right hand side.
- Make the scaling dpi aware, this fixes scaling for me on the Nexus7, I
haven't been able to test it properly on other devices, so this needs
some more testing. The result is visually quite close to what we can
do, although I'm still getting a somewhat larger margin on the right.
To get at the devicePixelRatio without too much custom code, I've
added a property to the QMLProfile to retrieve it from the theme engine.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- paint() can become a hot path, especially when we think about
repainting the item on size changes. In general, it's a really good
idea to keep this function as fast as possible, as we want to be able to
repaint the item when needed. Also, ProfileWidget is pretty heavy to
set up, so rather spend a bit of memory there.
- Rename profile to m_profileWidget, it already was member var.
- Sizing ... I have to admit I don't understand the rendering of the
ProfileWidget. I'd like it to do the following things:
- render at native resolution, we don't want to resize it
- react to item changes - we want to reset the size and
re-render the widget into the item in those cases
- perhaps be able to use a couple more of the profilewidget's
features
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a C++ class to render the dive profile. The rendered image is then
passed on to QML.
Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>