Commit graph

7 commits

Author SHA1 Message Date
Sebastian Kügler
74586d7922 Add some compatibility extensions to theme and unit
- This allows us to use these new things without changing much in our
  own code, things now work again.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06 14:04:36 -08:00
Sebastian Kügler
cbb8866b08 Add qmldir file
This will be needed at some point, so better put it in the right place
already, so we don't forget enabling the singleton usage once we've
fleshed out how that could work exactly.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06 14:04:32 -08:00
Sebastian Kügler
5fb054a17c some changes from the upstream wip-branch
- remove the singleton usage, this will need a bit more magic in the
  background. Not a huge problem since we're only using one instance
  anyway, and the object itself is rather light
- hardcode gridUnit for now. I'd like to use TextMetrics or FontMetrics
  there directly, but I'm not sure we can depend on Qt 5.4 and QtQuick
  2.5.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06 14:04:21 -08:00
Sebastian Kügler
c8227e200d more complete implementation of Plasma's Units
This is a currently work-in-progress attempt at making a minimal set of
Plasma components available.

The code needs a bunch of adjustments yet, which I'm making in tune with
upstream. The idea is to create a standardized sub-set of Plasma's QML
API for applications, which brings only minimal new dependencies (for
now: none).

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06 13:50:01 -08:00
Sebastian Kügler
ac6b267d40 QML-UI: gridUnit is now dpi-corrected
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-09 12:51:54 -07:00
Sebastian Kügler
77fa4e37c8 QML-UI: add more properties to Units and Theme
- colors for accentuation (background and text)
- text color to paint on highlights
- units.spacing (derived from gridUnit, so it's dpi-corrected)
- port main.qml, especially the application header to this theming and
  sizing

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-09 12:51:42 -07:00
Sebastian Kügler
431b5e07fe QML-UI: basics for theming and hi-dpi support
- Theme: For theming, we're just defining some colors centrally for now
- Units: This object provides dpi-corrected sizing in the form of
  gridUnit. The idea is to base gridUnit on the rendered font size, so
  the ui scales with text size. As this interpolates font size and dpi,
  the sizing is rather responsive.

These are the basics, now we can kill lots of hardcoded pixel values.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-09 12:51:36 -07:00