Commit graph

221 commits

Author SHA1 Message Date
Script Kiddy
5cd15e8920 SVN_SILENT made messages (.desktop file) 2012-10-01 10:36:58 +02:00
Script Kiddy
8c38be18b7 SVN_SILENT made messages (.desktop file) 2012-09-29 11:37:39 +02:00
Martin Gräßlin
9f8228bb1c Merge branch 'KDE/4.9' 2012-09-27 15:35:36 +02:00
Martin Gräßlin
049582536a Fix enabled borders and padding for maximized Aurorae decos
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
2012-09-27 15:34:32 +02:00
Script Kiddy
cb86f3e0f5 SVN_SILENT made messages (.desktop file) 2012-09-20 10:06:35 +02:00
Script Kiddy
203a9c1838 SVN_SILENT made messages (.desktop file) 2012-09-19 01:16:25 +02:00
Script Kiddy
31464244e1 SVN_SILENT made messages (.desktop file) 2012-09-18 19:14:07 +02:00
Script Kiddy
f161331b1e SVN_SILENT made messages (.desktop file) 2012-09-02 10:37:09 +02:00
Script Kiddy
62ef8ddcad SVN_SILENT made messages (.desktop file) 2012-09-01 11:00:30 +02:00
Martin Gräßlin
4812edc92d Ignore SettingsCompositing changed in Aurorae
Not needed and causing troubles when restarting Compositing.
2012-09-01 10:02:17 +02:00
Script Kiddy
c4d6cd3cf7 SVN_SILENT made messages (.desktop file) 2012-08-30 10:53:23 +02:00
Script Kiddy
9fb338ccd5 SVN_SILENT made messages (.desktop file) 2012-08-28 18:59:14 +02:00
Martin Gräßlin
d81df32a4f Support for Plastik's configuration options
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
2012-08-26 20:59:37 +02:00
Martin Gräßlin
8de1fea67e Option to disable window close on menu double click in Aurorae
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
2012-08-26 20:56:19 +02:00
Martin Gräßlin
8d55d9fa21 Use DecorationOptions in Aurorae themes
Instead of injection the Factory as a context property into the
Aurorae QML file the new DecorationOptions is used.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
459da3ea44 Port of Plastik decoration to QML
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++.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
ce2b251c9b Support for config values in QML decorations
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.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
13993a6efb Properly reset Aurorae decorations when theme changes
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.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
673dcd6ad3 Declarative extension plugin for window decorations
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.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
5923086d1f Basic QML theme support in Aurorae
Aurorae can load QML themes from Plasma package structures.
Code not yet tested as there are no packages yet.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
fb01e4ab8c Ensure that titleHeight is at least height of buttons
Required to properly lay out the title in case of vertical or
bottom alignment.

BUG: 304822
FIXED-IN: 4.9.1
REVIEW: 105937
2012-08-17 20:39:17 +02:00
Martin Gräßlin
85f31b1310 Honor the decoration font in Aurorae
Adding two properties to the AuroraeFactory to read the active
and inactive title font.

BUG: 304791
FIXED-IN: 4.9.1
REVIEW: 105956
2012-08-17 17:45:56 +02:00
Martin Gräßlin
874fccacd5 Delay maximize operation by one event cycle
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
2012-08-10 16:52:53 +02:00
Martin Gräßlin
46441998a3 Do not accept left mouse press events on titlebar in Aurorae
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
2012-08-02 10:50:21 +02:00
Martin Gräßlin
5c7d046d13 Install event filter on Aurorae Decoration to handle WheelEvents
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
2012-08-02 10:49:06 +02:00
Martin Gräßlin
5517d4db2c Delay closing of a window by one event cycle
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
2012-07-14 11:11:02 +02:00
Martin Gräßlin
e868ed8999 Do not use States and Transitions in QML of Aurorae
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
2012-07-05 15:22:57 +02:00
Script Kiddy
953d088b6a SVN_SILENT made messages (.desktop file) 2012-06-12 17:07:51 +02:00
Script Kiddy
62211420c7 SVN_SILENT made messages (.desktop file) 2012-05-28 11:08:19 +02:00
Martin Gräßlin
4490d51ae8 Initialize themeconfig class members with default values
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
2012-05-19 19:46:28 +02:00
Martin Gräßlin
ea8db29c2b Escape HTML tags in window caption in Aurorae and Killer
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
2012-05-19 11:56:35 +02:00
Thomas Lübking
e2553bd842 add deco API versioning support
REVIEW: 104978
BUG: 299141
FIXED-IN: 4.9
2012-05-17 23:26:43 +02:00
Martin Gräßlin
2b2976aa20 Adjust Aurorae Menu Button close behavior to KCommonDecoration
See 27b667f49562963ea3f13d5b9dd56ff846feb75a
2012-03-01 13:33:35 +01:00
Martin Gräßlin
cb5360c53d Improve mouse click behavior of Aurorae Menu button
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.
2012-02-16 11:34:37 +01:00
Thomas Lübking
85635dd485 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:30:22 +01:00
Thomas Lübking
bf88ec09ac Revert "fix tabbing"
pushed out of branch, not master - leading to absent revision, found hash collision??

This reverts commit 94b2ad7b85801e37e2df4671cdc4f26b6d7e5506.
2012-02-11 16:29:14 +01:00
Thomas Lübking
d245035a17 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:01:41 +01:00
Martin Gräßlin
2fce5db7cf Fix button sizes in Aurorae
Maximize/Restore, Menu and spacers did not honor button size factor.
2012-01-13 18:08:45 +01:00
Martin Gräßlin
de72df5a90 Proper resetting of Aurorae on changes
Most settings don't require a reload of the decorations.
2012-01-13 18:08:45 +01:00
Martin Gräßlin
5f5499a74f Reload Aurorae buttons when the button settings changed 2012-01-13 18:08:45 +01:00
Martin Gräßlin
a1bee6f8a7 Proper button handling in Aurorae QML
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.
2012-01-13 18:08:45 +01:00
Martin Gräßlin
4e07ced451 Drop unused code 2012-01-13 18:08:45 +01:00
Martin Gräßlin
0df0266602 Makes two methods private which are no longer accessed from outside 2012-01-13 18:08:45 +01:00
Martin Gräßlin
beba190f8f Correctly update decoration width/height on theme change 2012-01-13 18:08:45 +01:00
Martin Gräßlin
12ca69deda Ensure that borders have at least a size of 0
Prevents cropping of windows with tiny borders.
BUG: 257428
2012-01-13 18:08:45 +01:00
Martin Gräßlin
cb47db887c Fix c'n'p error 2012-01-13 18:08:44 +01:00
Martin Gräßlin
30d8f2c1ea Don't load FrameSvg in AuroraeTheme
This allows to remove Plasma compile dependency from Aurorae and
the KCM.
2012-01-13 18:08:44 +01:00
Martin Gräßlin
8a4a8b3903 Drop GraphicsScene based Aurorae 2012-01-13 18:08:44 +01:00
Martin Gräßlin
a0efa6453e Adding a slot to load an AuroraeTheme.
Can be used from the decoration module to load the theme for each
decoration.
2012-01-13 18:08:44 +01:00
Martin Gräßlin
b44efd3c22 Use one declarative engine for all decortions
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?
2012-01-13 18:08:43 +01:00