It got removed in frameworks recently and it seems like their is no
replacement. Therefore all of them are currently removed. Also there are
no porting guides yet for i18n.
addImportPath prepends the path to importPathList so we must add our
paths in reverse order.
Based on the fix for kdeclarative.cpp in kdelibs
400b9f2e9d10386bb175b6123fe0cdaafeaffe61
REVIEW: 110670
I've no real idea what breaks the theme -> qml assignment but the patch
re/creates the theme object (just as the engine and component) with the theme
BUG: 316033
FIXED-IN: 4.10.2
REVIEW: 109273
Adding a new property on whether we want animations based on whether we
are on raster or with Compositing. The property is constant as the deco
gets recreated on compositing change state anyway.
REVIEW: 109456
BUG: 314532
FIXED-IN: 4.10.2
Many headers included KLocale to use i18n and co. But those methods are
defined in KLocalizedString and not in KLocale.
With KF5 klocale.h does no longer include KLocalizedString causing lots
of compile errors.
Where possible it is changed to Cursor::pos(), where we cannot use the
Cursor class (e.g. Aurorae) we can at least try to limit the usage to
prevent roundtrips to the X server.
REVIEW: 109178
The Borders element provides the four properties:
* left
* right
* top
* bottom
And is used directly in Decoration for all the different kind of settings
following this pattern:
* normal borders
* maximized borders
* padding
* extended borders
These properties replace the existing used borderLeft & co. This makes
the code in the C++ side easier as the various border elements can now be
read with a shared implementation.
The Borders provide some convenient methods to set the sizes of the
borders. E.g. it's possible to just set the side borders to a specific
value. This should simplify the implementation of the no-side-borders
feature in new decoration.
The aurorae qml and plastik are adjusted to use the new way. Existing
3rd party decorations would break, but there's a good reason why there's
no documentation for QML based decorations ;-)
REVIEW: 108436
BorderNoSides is what is known from Oxygen as "No Side Borders". The name
should indicate that there is only a border at the bottom. BorderNone is
a mode with no borders at all.
The new enums are added to KDecoration and the KCM so that all decos can
make use of it.
Aurorae is adjusted to support the new sizes for QML themes (it breaks
the old svg based themes) and Plastik makes use of it, by rendering a
one-pixel border around the window, which illustrates that it's still up
to the decoration to decide how to make use of the setting.
REVIEW: 108164
Fixed krazy warning about invalid ifdef guard in include
Fixed Krazy warning about signal/slot normalization.
fixed Krazy spelling warning in comments.
Removed x10 multiplicative factor when rendering shadow;
added x10 mutiplicative factors for config UIs with respect to what's actually saved in config
file;
remove kconfupdate for shadowoffset.
- move Shadow configuration UI to libs
- removed useDropShadow and useOxygenShadow options, and replaced by activeShadow::enable and inactiveShadow::enable
- use kcfg for decoration configuration. The handling of exceptions requires dedicated readConfig and writeConfig methods, implemented in oxygenutils
- changed sizegrip combobox into a check box and rephrased for clarification
Aurorae Themes can make use of the extended borders feature to allow
resizing outside the window decoration area. So far only Plastik makes
use of it in the Tiny border case.
This should be extended in future by adding generic NoSideBorders and
NoBorders sizes as used by Oxygen.
FEATURE: 308992
FIXED-IN: 4.11
REVIEW: 107936
A decoration can provide the AbilityAnnounceAlphaChannel in addition to
AbilityUsesAlphaChannel. If this ability is provided the decoration can
enable/disable the use of the alpha channel through setAlphaEnabled().
The base idea behind this mechanism is to be able to tell the compositor
that currently alpha is not needed. An example is the maximized state in
which the decoration is fully opaque so that there is no need to use the
translucency code path which would render all windows behind the deco.
In addition also the blur effect honors this setting so that behind a
known opaque decoration no blurring is performed.
Oxygen is adjusted to disable translucency in maximized state and Aurorae
is adjusted to allow themes to enable/disable translucency. For Plastik
translucency and with that also blurring is disabled.
REVIEW: 106810
oxygenexceptionlistwidget: better check index validity in "edit" method. Also update buttons status after removing items, since
apparently selectionChanged signal is not sent by Qt.
CCBUG: 309388
Disable animations till the decoration is completel loaded. This
ensures that the buttons do not flicker because of the animation from
black to their respective color.
A component has the advantage that the width property can depend from
other properties. This does not work with the previous on the fly
construction as the width does not update when the referenced property
changes.
This build option is added to make it easier to build just KWin without
kde-workspace. This is a common requirement by developers wanting to
contribute to KWin and only want to build KWin but use everything else
from their normal distribution.
Building KWin standalone is very often difficult due to Oxygen. If the
library has changed it is not possible to build just KWin without also
building the workspace libs and if you do so you run into ABI problems
when trying to start KWin - either the decoration or the style is
crashing due to not matching libraries.
To circumvent this common issue for new developers this build option
is introduced to just exclude the Oxygen window decoration and defaulting
to Plastik.
Of course by default this option is turned ON, so that the Oxygen
decoration gets build. By default there is no change at all.
REVIEW: 106303
In the maximized state the enabled borders were still enabled causing
the actual borders to be still shown. In addition the padding is not
adjusted to be 0. This is done in the C++ part is it does not make any
sense to have shadows being thrown to another screen for a maximized
window.
REVIEW: 106576
BUG: 307365
FIXED-IN: 4.9.2
using color.rgba() for an invalid color corresponds to solid black, which in turns conflicts with the cache
value for such color. We use "transparent black" instead.
CCBUG: 304868
using color.rgba() for an invalid color corresponds to solid black, which in turns conflicts with the cache
value for such color. We use "transparent black" instead.
CCBUG: 304868
Adding a KConfigXT xml file and an ui file to configure the QML
variant of Plastik.
Currently supported options:
* title alignment
* title shadow
* animation of buttons
Missing option:
* colored borders
For each theme the setting can be enabled individually with the
default being enabled by default. It is completely handled
inside the MenuButton QML component so each QML theme benefits
from the option automatically, too.
BUG: 301327
FIXED-IN: 4.10
REVIEW: 106160
The Plastik decoration buttons are provided by a declarative
extension plugin as the canvas drawing API would be needed to
draw these buttons. This should be changed with Qt 5.
But it's also a nice example to show how a QML based decoration
can have an extension in C++.
When the decoration is reset a signal is emitted that the config
might have changed which the decoration can connect to for
reloading its configuration. For this an invokable method is
added to Aurorae allowing to read a config value which just
returns the QVariant.
Proper support for border sizes are added by providing the enum
in DecorationOptions, so that QML themes can use the enum values
to decide which border size to use.
The kcm is adjusted to also support these config mechanisms and
to properly load and save the border sizes for QML based themes.
On change of theme recreate all decorations and create a new
declarative engine and component which is basically a re-init
of the Factory.
There are too many differences between themes - especially when
switching between an old SVG based Aurorae and a new QML based
Aurorae theme.
The generic QML components from Aurorae are split out into an
own declarative plugin. In addition two new helper classes are
added to this plugin:
* A ColorHelper to map a few function of KColorSheme and making
it possible to actually work with colors in QML. The need
emerged from trying to port Plastik to QML which makes strong
use of color shading.
* A DecorationOptions class which is a wrapper around KWin's
KDecorationOptions but in a more useable way for QML. The
various options are provided as properties and the value of
the properties changes automatically depending on whether the
decoration is active or inactive.
Aurorae itself is not yet adjusted to these changes, but it
should also be adjusted as some of the options are currently
exported in the factory and the factory is injected into the
Aurorae QML decoration.
The result of maximizing a window might be the decoration
going away. Because of that we need to delay the handling of
maximize and title bar double click by one cycle as had been
done for other close operations in 0fea5325
BUG: 304870
FIXED-IN: 4.9.1
REVIEW: 105961
Accepting the mouse events breaks moving the window by dragging
the title bar. The reason is that it eats the mouse event and
by that never reaches KWin core to perform the movement.
Other mouse buttons need to be accepted for handling the window
operations. Also we need to listen in general to left mouse
button for the double click operation.
BUG: 304249
FIXED-IN: 4.9.1
REVIEW: 105784
Unfortunately QtQuick 1 does not provide a way to receive Wheel
events. But the window decoration needs to pass wheel events on
the titlebar to KWin core.
In order to process also Wheel Events in Aurorae an event
filter is installed on the widget and in case the mouse positon
is on the title bar the titlebarMouseWheelOperation is invoked.
BUG: 304248
FIXED-IN: 4.9.1
REVIEW: 105801
This is an issue we already had in the past with Aurorae. When
closing a window the graphics scene crashes because the deco
gets destroyed before the code in the graphics scene finished
the execution.
With the port to QML this seemed to be fixed unless as it turns
out it throws an XIO error on closing:
fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
This can be triggered using glxgears. Closing glxgears would
reliable crash Aurorae. To circumvent this issue we have to
delay the close by one event cycle using QMetaObject's
invokeMethod with a Qt::QueuedConnection.
This has also to be done in the useractions menu as the menu
is still open when the window closes causing the same problem
inside Aurorae.
BUG: 303450
FIXED-IN: 4.9.0
Reviewed-By: Thomas Lüking
According to Nuno it's much better to define the animations in
a Behavior element as that is together with the element which
gets animated.
Also he recommends to not use states but just property binding
for the properties which are animated in the Behavior.
And I must admit that this produces cleaner code, though the
conditions are now scattered all over the source code and not
nicely put together in one state section. Let's just hope I got
the logic right.
Well seems like it is useful to go to a QML training, at least
it made me aware of my State definitions are not good and then
talking to Nuno and giving a try to his recommendations.
REVIEW: 105426
Option is called "CloseFromMenuButton"
It is false by default.
To turn it on, add
CloseFromMenuButton=true
in [Windeco] section of $HOME/.kde4/share/config/oxygenrc.
Note that it results in poor usability of the menu button, if enabled.
CCBUG: 301237
Static getters for each default value added which are used in
ctor to initialize the class members and in the load for
readEntry's default value.
REVIEW: 104994
The unescaped tags are interpreted as HTML by Aurorae decorations
and the KWin killer. Escaping the tags ensures that the text is not
rendered incorrectly.
BUG: 293657
FIXED-IN: 4.9.0
REVIEW: 104989
The general idea is: single click opens menu, double click closes
the window. The problem is that the when the menu is opened after
the single click, the menu will eat the second click. So double
click will not work.
This commit brings back the workaround from Aurorae2. The clicked
event is not used at all, but we start a timer on the press event
with the doubleClickInterval. If no double click appears during the
interval we open the menu, if there is a double click we close the
window.
The downside of this approach is that there is a slight delay between
clicking the menu button and the menu appearing. For that the right
click behavior is unchanged. That is right clicking opens the menu
instantly and double click to close it, is broken.
Buttons are exported as a global "options" in the factory.
Additionally the theme's buttons are also exported. The thme decided
based on the custom button positions property which one to use.
In the kcm the button options are also exported.
Each decoration gets a graphicsview and scene instead and a declarative
item is created for each decoration.
There's probably still room for improvments. E.g. never render the
scene onto the widget but directly into the textures?
Switches to the explicit maximized decoration element and animates
the button groups and caption.
Legacy support for just the centered element is still missing. Unsure
if it should be added or if it makes sense to break compatibility here.
What's working:
* background for active and inactive decorations inclusive transitions
* all buttons get loaded
* transition between button states
* all borders, paddings etc is working
* mouse interaction with buttons and title area
What's not yet working:
* special maximize mode
* mouse wheel on title area
* window tabs
* changing themes
* crash resistence (currently a not compiling QML file crashes KWin badly)
* window/blur mask (tricky - we need the alpha mask of the background SVG)
What's going to be dropped:
* special opaque mode
* decoration position at left/right/bottom instead of top
Why? Because nobody uses these features