Commit graph

2388 commits

Author SHA1 Message Date
Andrey Bondrov
d7fd252484 Merge branch 'Plasma/5.2' 2015-03-24 18:52:15 +10:00
Andrey Bondrov
b3a9f41fd0 Fix title height for maximized windows with Aurorae decorator 2015-03-23 23:27:09 +10:00
Andrey Bondrov
4922b6d1cd Fix a typo in aurorae QML code 2015-03-22 21:48:01 +10:00
Martin Gräßlin
caf99f83d5 Require Qt 5.4
REVIEW: 122617
2015-02-19 10:56:50 +01:00
Martin Gräßlin
58a70ad1dc [aurorae] Only update shadow if it had changed 2015-01-27 12:46:30 +01:00
l10n daemon script
bf7bf73464 SVN_SILENT made messages (.desktop file) 2015-01-15 09:02:26 +00:00
Martin Gräßlin
a22ea244db Merge branch 'Plasma/5.2' 2015-01-14 13:56:15 +01:00
Martin Gräßlin
c565017720 [aurorae] Bring back configuration for button sizes
The config option got disabled during porting to kdecoration2.
This change re-adds the config option and adds a small config
interface for SVG based themes.
2015-01-14 08:59:18 +01:00
l10n daemon script
d173ff7412 SVN_SILENT made messages (.desktop file) 2015-01-13 12:47:17 +00:00
Martin Gräßlin
c4fb3cd55d [kdecoration] Try falling back to default plugin and Aurorae
If the configured decoration plugin fails to load, we try to load
the default decoration plugin. If that also fails to load, we try
to load Aurorae, which is shipped with KWin, so the chances are
higher that it is available.

Also the checks in Aurorae are improved to fall back to the Plastik
theme if the selected SVG theme is not available.

BUG: 341014
FIXED-IN: 5.2.0
REVIEW: 121859
2015-01-12 14:30:30 +01:00
Martin Gräßlin
233730e8bf [aurorae] Send MouseButtonDblClicked to the QQuickWindow
Needed to make MouseArea on MenuButton accept double click events.
2014-12-16 08:44:26 +01:00
Martin Gräßlin
e8a52bbe65 [aurorae] Use mousePressAndHoldInterval from StyleHints 2014-12-16 08:27:11 +01:00
Martin Gräßlin
060b310082 [aurorae] Do not update shadow from ::paint
Paint is in the middle of the compositor rendering loop. Updating
the shadow at that point breaks KWin. Thus we delay the update to
the next event cycle. Obviously it would be even better to only
update the shadow if it changed, but that might be too expensive.
2014-12-12 22:12:11 +01:00
Martin Gräßlin
d26b5a1739 [aurorae] Fix BorderSize for SVG based themes 2014-12-05 17:36:25 +01:00
Martin Gräßlin
f6a01c134e [aurorae] Fix BorderSize in Plastik 2014-12-05 17:19:46 +01:00
Martin Gräßlin
65fd014fdb [aurorae] Fix setting closeOnDoubleClickOnMenuButton
It's now a setting provided by DecorationSettings and doesn't need
to be configured per theme.
2014-12-05 16:43:13 +01:00
Martin Gräßlin
521627396f [kcmkwin/deco] Reconfigure deco after applying changes
Required hooks also added to KWin core and Aurorae.
2014-12-05 15:58:05 +01:00
Martin Gräßlin
798b1ad860 [aurorae] Fix loading of theme's config values 2014-12-05 14:53:55 +01:00
Martin Gräßlin
7da6d3a41e [kcmkwin/deco] Add configuration for decoration plugin/themes
This brings back the configuration for decoration plugins. As a change
to the old variant the configure button is moved into the list view
together with the preview. It is enabled/disabled depending on data
provided by the DecorationModel. For a plugin the DecorationModel
queries for a boolean "kcmodule" key in the metadata. For a theme it
invokes the slot hasConfiguration with the theme name which returns
whether the theme provides configuration.

The actual opening of the configuration is triggered from the
PreviewBridge, which uses the existing KPluginFactory to load the
KCModule. The decoration plugin must provide the keyword "kcmodule"
for it.

So far Aurorae is adjusted and provides configuration for the Plastik
decoration. The interaction with the configuration module works, but
the configuration itself for Plastik seems to be currently broken.
2014-12-05 13:44:16 +01:00
Martin Gräßlin
2034e7e875 [kcmkwin/deco] Bring back KNewStuff support
KNewStuff is no longer hard-coded to Aurorae themes. Instead the
availability of KNewStuff is derived from the available plugin
metadata. If the section org.kde.kdecoration2 contains a key
"KNewStuff" it's value is interpreted as the knsrc config file name.
If there is at least one plugin with such a key KNS gets enabled.

If there are multiple plugins providing KNS support the download
button is turned into a button with a connected menu and each menu
entry points to one of the available resources. Of course this is
not optimal, but KNS doesn't allow the combining of multiple config
files.
2014-12-05 10:15:41 +01:00
Martin Gräßlin
ca27bc09c5 [aurorae] Use QQuickRenderControl if compiled against Qt 5.4
QQuickRenderControl brings a few advantages for the usage in Aurorae:
* can create an offscreen window
* eliminate the need for mutex as we control the rendering
* control the tear down of the QML scene (no more crashes in Qt)

In future we can further improve this, by sharing the context, so
that we can use the FBO texture directly. But this first needs
some more work in KWin core.

As we don't hard depend on Qt 5.4 yet it's using ifdefs. Once we have
Qt 5.4 the old code will be removed.
2014-12-03 16:22:15 +01:00
Martin Gräßlin
c815775a0e [aurorae] Better specify y value of titleBar
It uses the borderBottom now to have at least an as large resize
border as at the bottom. This still needs improvement.
2014-12-03 12:09:24 +01:00
Martin Gräßlin
b9fb7df15a Do not use KDecorationDefines in Aurorae 2014-12-02 10:31:16 +01:00
Martin Gräßlin
f5c305bf64 Do not include kdecoration.h in plastik decoration plugin 2014-12-02 10:15:04 +01:00
Martin Gräßlin
4188736bc4 Stop building libkdecorations
Some defines are still used, so it's not yet deleted.
2014-12-02 09:58:29 +01:00
Martin Gräßlin
027a7a1646 [kdecoration2] Decoration::shadow returns QSharedPointer
Adjust all components to use the QSharedPointer. Aurorae obviously has
to create a QSharedPointer, Shadow holds a QSharedPointer for the
DecorationShadow (advantage: is kept when the Decoration is destroyed),
and the KCM needs to add a property on PreviewItem to get access to the
Shadow. It's no longer a Q_PROPERTY on Decoration and we cannot re-add
it as a dynamic property (cannot be read from QML side).
2014-12-01 09:40:24 +01:00
Martin Gräßlin
6bdd0e96f6 [kdecoration] Decoration::client returns a QWeakPointer
In aurorae a wrapper property is added.
2014-11-28 16:28:39 +01:00
Martin Gräßlin
0cc86656c9 DecorationButtonType::QuickHelp -> DecorationButtonType::ContextHelp 2014-11-28 11:27:31 +01:00
Martin Gräßlin
211834edcc [kdecoration] ::paint uses QRect instead of QRegion 2014-11-28 10:26:23 +01:00
Martin Gräßlin
b337a0b52e DecorationShadow uses QRect to set element sizes 2014-11-11 17:02:15 +01:00
Martin Gräßlin
1afc355759 DecorationShadow uses QMargins for padding 2014-11-11 15:18:35 +01:00
Martin Gräßlin
99545da109 [aurorae] s/requestMaximize/requestToggleMaximization/g 2014-11-11 13:20:15 +01:00
Martin Gräßlin
0f76516d01 [aurorae] Decoration::titleRect renamed to ::titleBar 2014-11-11 11:55:20 +01:00
Martin Gräßlin
8cf402f185 Decoration::extendedBorders renamed to ::resizeOnlyBorders 2014-11-11 11:33:02 +01:00
Martin Gräßlin
1c90ca9087 [aurorae] Decoration sets borders using QMargins 2014-11-11 10:49:10 +01:00
Martin Gräßlin
cb9cbae36e Decoration::paint takes the repaint region 2014-11-11 09:39:45 +01:00
Martin Gräßlin
fcec334b3c [kdecoration] Adjust to change that DecorationBridge is no longer a singleton
* Aurorae needs to pass QVariantList args to parent Decoration
* DecorationBridge implementation needs to be a KWIN_SINGLETON
* DecorationBridge needs to be passed with args to created Decoration
2014-10-30 09:01:06 +01:00
Martin Gräßlin
a7bcb70980 [kdecoration2] Adjust to DecortionSettings no longer being a singleton 2014-10-29 16:11:20 +01:00
Martin Gräßlin
17103c49a1 [aurorae] Add a ThemeFinder
The idea behind the ThemeFinder is to expose a way for a configuration
module to find all themes. The API is not yet finalized, thus it's just
a QObject with a Q_PROPERTY themes of type QVariantMap with key being
the user visible name and value being the internal theme name.
The ThemeFinder will have to be moved to KDecoration library.

The json metadata provides a "themeListKeyword" which is used as the
keyword to the KPluginFactory.
2014-10-28 09:57:38 +01:00
Martin Gräßlin
f94b4bec0b [aurorae] Set drawBackground property to false on visual parent
Small hint for the previewer that it shouldn't draw the background.
2014-10-28 08:17:46 +01:00
Martin Gräßlin
0778434f85 [aurorae] Add a dummy Shadow for the configuration mode 2014-10-28 08:16:53 +01:00
Martin Gräßlin
47484384ad [aurorae] Support DecorationShadow
DecorationShadow is supported through using the padding values. The
window becomes larger by the padding and gets positioned accordingly.
This requires to translate all mouse events.

The DecorationShadow is just using the complete image, which is kind of
a memory waste, but at least the SVG based Aurorae doesn't provide us
better information (might be added, but would probably need changes in
the theme).

For switching back to non-compositing we recreate the QuickWindow. It's
not fortunate, but as long as we do not yet have the render control it's
needed.
2014-10-27 12:45:05 +01:00
Martin Gräßlin
16afb24426 [aurorae] QQuickWindow needs to be a QPointer instead of a ScopedPointer
Lifetime is bound to the foreign QWindow of the decoration. Thus if that
gets destroyed our pointer becomes invalid and we need to track that.
2014-10-27 12:43:39 +01:00
Martin Gräßlin
5c3cd6f4bc Initial port of Aurorae to KDecoration2
The port to KDecoration2 means quite some changes in the way how Aurorae
works. First of all: the theme to load is passed to the Deocoration ctor
and not searched for by Aurorae itself.

The rendering mechanismn didn't change significantly yet. It's still
rendering to an FBO and passing the image on. This needs some further
work as KDecoration2 does not support the padding any more. So all
themes using shadow are currently broken.

Another big change is the way how the rendering scene is constructed
and used. KDecoration2 doesn't want the the Decoration to be a native
window. But for being able to render a QtQuick scene at all we need a
QQuickWindow. Thus it creates a window parented to the decoration id,
but not accepting any input event. Input is nowadays controlled from
the outside: events are passed into the Decoration, so we don't want
the QtQuick window intercepting events.

In case of non-composited the normal FBO mechanism doesn't work and
Aurorae just renders to the QQuickWindow directly. This could use
some optimization in the decoration renderer in KWin core to not even
try to perform the normal rendering. On the other hand it's probably
too much a hassle for the use case.

The rendering architecture might hopefully be improved with Qt 5.4
and the new QQuickRenderControl class.

The QQuickWindow also exposes a problem for preview in the
kdecoration-viewer and the future KCM: we don't want a different
window, but best would be to get to the QML scene directly. A small
hack is added to have the previewers set a "visualParent" which Aurorae
uses to parent the QML scene to without the need to create a
QQuickWindow.
2014-10-24 13:48:31 +02:00
Martin Gräßlin
d96af81f5e Merge branch 'Plasma/5.0'
Conflicts:
	kcmkwin/kwindesktop/desktop.desktop
2014-09-08 10:07:57 +02:00
Martin Gräßlin
edd2899094 [aurorae] Use AlignHCenter instead of AlignCenter for horizontalAlignment
The Text.horizontalAlignment property expects AlignHCenter instead of
AlignCenter. By not using AlignHCenter the centering broke when a window
got maximized.
2014-09-08 10:05:44 +02:00
l10n daemon script
26baff06a4 SVN_SILENT made messages (.desktop file) 2014-09-01 09:18:50 +00:00
l10n daemon script
baf37deacd SVN_SILENT made messages (.desktop file) 2014-09-01 08:42:05 +00:00
Martin Gräßlin
3d3cd72fa2 [aurorae] Drop project from CMakeLists.txt
Left-over from when it used to be a separate project.
2014-08-21 13:24:25 +02:00
l10n daemon script
90bba3ba77 SVN_SILENT made messages (.desktop file) 2014-08-18 09:18:47 +00:00