Commit Graph

45 Commits

Author SHA1 Message Date
Montel Laurent
7f0c023d3f Use nullptr + add explicit 2017-12-13 07:36:22 +01:00
Friedrich W. H. Kossebau
8749591922 API dox: fix doxygen notation with some post-position comments 2017-05-26 19:54:11 +02:00
Albert Astals Cid
5c46e32993 Q_ENUMS -> Q_ENUM and Q_FLAGS -> Q_FLAG
REVIEW: 129826
2017-01-14 01:06:28 +01:00
Marco Martin
1cf145861b add Positive, Neutral, Negative text colors
add named colors for positive (usually green)
neutral(usually yellow) negative(usually red)
foreground objects, such as text or parts of
svg icons/themes

REVIEW:127696
Change-Id: I646306339f1684cdc062da3d3af1489af6092372
2016-04-20 18:25:50 +02:00
Marco Martin
553a9bfe53 bind highlightedText color in Plasma::Theme
we have a color in the Plasma theme "highlight" that is basically
an accent color used around.. but one of the uses is to use it as
a background, such as highlighted text. in that case we don't know
what color would be safe for contrasting on top of it for things
like the highlighted text color (plasma style used the background
color for that, which is incorrect)

REVIEW:127637
2016-04-13 12:28:53 +02:00
Marco Martin
6c54fb596d Don't expose color properties in c++ api
the color properties are remotely useful only when used from QML
and risk to explode in number in the future,
it's not a good thing for a public c++ api.

Also, they will become kinda deprecated as in largely replaced by
the ColorRole api. Too late to remove those properties completely,
but still last days to move them at least out of c++ api.
(and in qml they could be removed in the future in a 2.1 version
of the import while still being present in 2.0 if needed)

This moves the color properties is a theme subclass available only from QML

REVIEW:118972
2014-06-27 15:06:52 +02:00
Marco Martin
17741fbfae prune ColorRole enum
all the former combinations are now obtained with
ColorRole + ColorGroup
2014-06-19 18:18:50 +02:00
Marco Martin
8eb1bc10f5 Introduce the ColorScope class
it's an import in core, and advertises itself as an "attached property"
with this we can:
say that all its chidren are of a certain context, like "button" or
"complementary"

then anywhere there will be available an attached property, as ColorScope,
so like:

PlasmaCore.ColorScope {
 group: PlasmaCore.Theme.Complementary

 PlasmaComponents.Label {
   text: "foo"
   color: ColorScope.textColor
 }
}
2014-06-19 17:40:14 +02:00
Marco Martin
b755bd1e32 ColorGroup is part of Theme 2014-06-18 19:22:02 +02:00
Marco Martin
c54d3d5538 colors are not flags 2014-06-18 19:09:18 +02:00
Marco Martin
4ad2cc5196 new color group of "complementary" colors
for areas intended to have independent background and text color than
all the rest, like the Logout dialog

if Colors:Complementary is not present in the theme, it falls back to
normal colors
2014-06-18 19:02:08 +02:00
Marco Martin
3fdf999ba0 bit more complex bookeeping
since it is now possible to have different svg/framesvg with
different themes, s_sharedFrames must be indexed by theme first
what it's really the identifying thing is ThemePrivate, so it's indexed by that
this fixes a crash that occurs the second thime the theme gets changed

BUG:335472
2014-05-28 20:27:58 +02:00
Marco Martin
924818a0ca don't link agains KConfigWidgets
not needed anymore
2014-05-19 16:58:37 +02:00
Aleix Pol
e6f1fec0c7 Install all plasma files in a prefix/share/plasma directory
At the moment, we could say that plasma is co-installable by chance,
it's only working because KF5 dropped the apps relative directory.
This change introduces a PLASMA_RELATIVE_DATA_INSTALL_DIR that will
be available to know where in share the components are and
PLASMA_DATA_INSTALL_DIR to know where data has to be installed to.

Reviewed by David Edmundson

CCMAIL: plasma-devel@kde.org
2014-04-27 17:14:22 +02:00
Kevin Ottens
72ba7b4146 Apply the astyle-kdelibs script 2014-04-26 01:48:37 +02:00
Aurélien Gâteau
43e2b0f670 Unbreak build of code using plasma-framework
plasma_export.h is now installed in include/plasma/, not in include/.
Code using plasma-framework does not have include/plasma in its include
directory list, so plasma-framework headers must refer to others using
</plasma/foo.h>, not "foo.h".

CCMAIL: aleixpol@kde.org
2014-03-18 12:01:36 +01:00
Aleix Pol
2ef12f1ee8 More headers tweaking
Don't install the camel-case headers twice
Look for the plasma_export.h in the current directory instead of jumping
around in the project.
2014-03-17 16:48:49 +01:00
Sebastian Kügler
5dd4b51151 Plasma::Theme gets API for KWS' background contrast effect
From its api docs:

This method allows Plasma to enable and disable the background
contrast effect for a given theme, improving readability. The
value is read from the "enabled" key in the "ContrastEffect"
group in the Theme's metadata file.
The configuration in the metadata.desktop file of the theme
could look like this (for a lighter background):

[ContrastEffect]
enabled=true
contrast=0.45
intensity=0.45
saturation=1.7
2014-02-06 00:56:50 +01:00
Sebastian Kügler
b3a5d65580 Complete apidocs for Plasma::Theme 2014-01-27 19:41:39 +01:00
Sebastian Kügler
a70dd8c299 theme.defaultIconSize moves to units.iconSizes.default 2014-01-23 01:47:42 +01:00
Sebastian Kügler
4da01ebce0 spacing hints move from theme to units 2014-01-23 01:26:19 +01:00
Sebastian Kügler
d4902e2df2 Remove icon sizes from Plasma::Theme
They've moved into Units
2014-01-23 00:43:21 +01:00
Sebastian Kügler
e72b297e48 Use defaultFontChanged notifier for spacing
This makes the spacing update when the font changes. This will be handy
for a more dynamic DPI switching in the future.
2014-01-21 23:44:05 +01:00
Sebastian Kügler
374d230932 wallpaperForSize moves to Plasma::Theme 2014-01-13 02:11:37 +01:00
Sebastian Kügler
ea2a4db7ab Move spacing, stylesheet and mSize into Plasma::Theme 2014-01-13 01:31:46 +01:00
Sebastian Kügler
a9b1f2c619 Most of iconSize moves to Plasma::Theme
The QQmlPropertyMap isn't moved with this commit, this needs a bit more
changing, so we do a separate one for that, once the more trivial stuff
is moved out.
2014-01-12 20:10:19 +01:00
Sebastian Kügler
25dcdd39a4 Color properties move into Plasma::Theme
They're now convenience API in Plasma:Theme, PlasmaCore.Theme is
becoming smaller and smaller. Another nail in its coffin.
2014-01-12 19:49:56 +01:00
Sebastian Kügler
13242c8a5f Move smallestFont and defaultFont properties into Plasma::Theme 2014-01-12 19:33:56 +01:00
Sebastian Kügler
eba1a79b57 themeName, useGlobalSettings and wallpaperPath move into Plasma::Theme 2014-01-12 19:17:37 +01:00
Marco Martin
3bfbc31381 remove some not used includes 2013-03-13 11:32:00 +01:00
Marco Martin
aa3652ec86 make svg stylesheet private
there isn't anymore the "SVG" magic parameter in Theme:: styleSheet()
2013-03-12 21:45:14 +01:00
Marco Martin
fd97160327 remove the singleton usage from everywhere 2013-03-12 16:29:04 +01:00
Marco Martin
3edbe10c8c make ThmemePrivate a QObject
and remove every reference of ThemePrivate::q, this is needed for
sharing the same ThemePrivate between Thme einstances (there would be more then one q)
2013-03-11 20:20:50 +01:00
Marco Martin
4d71b527dc move ThmemePrivate in own file
it will make easier making it implicitly shared
2013-03-11 19:24:07 +01:00
Marco Martin
44781d4b35 make settingsChanged() private 2013-03-11 18:08:03 +01:00
Marco Martin
b7a079f87d replace homepage() with pluginInfo()
a KPluginInfo will have the homepage from the desktop file but also the other data as well such as author and description
2013-03-11 18:01:22 +01:00
Marco Martin
ae120ba02d remove useNativeWidgetStyle 2013-03-11 17:44:00 +01:00
Marco Martin
62c8a7b500 don't expose windowTranslucencyEnabled 2013-03-11 17:39:42 +01:00
Marco Martin
bf79616342 get rid of the FontRole enum 2013-03-11 17:15:25 +01:00
Marco Martin
74d1a62bdd remove fonts from Plasma::Thmeme
replace FontProxy with default QFont QML2 bindings
2013-03-11 16:59:39 +01:00
Marco Martin
f07387267a remove fontMetrics() 2013-03-11 16:08:37 +01:00
Marco Martin
d0b4b462f0 remove properties and invokables from Theme 2013-03-11 16:03:05 +01:00
Aaron Seigo
961dd4d6ce make setting a custom max cache size work
replaces the data member for tooltip, which API has been removed
2013-03-11 14:35:47 +01:00
Sebastian Kügler
f429f83153 typos-- 2013-03-11 13:07:54 +01:00
Sebastian Kügler
7dfe957e66 The Big Move
All cpp code moves into the src/ subdirectory, as the Frameworks policy
suggests.

Directory structure should now be in line with other, future frameworks.
2013-02-14 17:17:12 +01:00