Commit Graph

21 Commits (03231942bb65e56e0e04727b11dbda75f47993d9)

Author SHA1 Message Date
Martin Gräßlin 484e4be7f6 [kcmkwin/deco] Delay deleting of PreviewBridge
Our decoration is deleted using deleteLater() and that might cause access
to the bridge. Given that we also need to deleteLater() the
PreviewBridge.

To do so the PreviewBridge is no longer directly exposed to QML, but
in a wrapper object which holds the bridge as only element.

BUG: 344278
FIXED-IN: 5.4.3
REVIEW: 125724
2015-10-20 14:33:15 +02:00
Martin Gräßlin 09880d1267 [decorations] Introduce logging category for decorations 2015-07-31 13:13:46 +02:00
Mika Allan Rauhala 3389c7569f Adapt to KDecoration API changes
Adapt to API changes introduced by b62e8888cd39301e00ad98dfe791fa66676408fb.
It adds DecoratedClient::color(group, role) for getting colors that are
not included in QPalette. Breeze used to read these colors from
kdeglobals, breaking per window color schemes. KWin now handles reading
these colors along with QPalette loading with DecorationPalette.

REVIEW: 122883
2015-03-31 15:26:55 +02:00
David Edmundson b62bf43236 Avoid deleting an engine whilst components from our engine are still in use
Otherwise it can lead to crashes

Reviewed-by: Martin G
2015-01-28 14:12:25 +01:00
Thomas Lübking ce2fa727e8 Overhaul of deco kcm
- align with system palette
- base color for buttons and preview individually
  to create a visual gap (make them more standalone)
- downsized button config buttons to match up w/ preview
  appearance (and because it was simply to huge for a desktop thing)
- upsized preview to preferably show two elements at once
  (current + 2*1/2context)
- made the titlebar a visible visual element
- label the titlebar "Titlebar"
- move the (altered) hint to the drag-from area
- hint draggability with a pointing hand cursor
- less hardcoded values
- brief animations on button adding/removing

BUG: 337544
REVIEW: 122064
2015-01-22 01:31:31 +01:00
Martin Gräßlin d5233a6b6f [kcmkwin/deco] Bring back a decoration buttons configuration interface
The decoration button configuration interface is merged into the QML
part using two list views (left buttons, right buttons) and a grid
view for all the available buttons.
2014-12-09 16:07:27 +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 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 39f9581d4f Bring back configuration options for Decorations
* Border Sizes
* Close menu double click

Both are added to the Settings and exposed in the decoration kcm.
As it started to no longer scale the kcm uses a ui file.

Still missing:
* buttons
* custom decoration configuration
* GHNS
* search
2014-12-04 16:28:06 +01:00
Martin Gräßlin 106e595709 DecorationSettings provides QVector for decorationButtons 2014-12-01 11:53:44 +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 d1bf38e92c [kdecoration2] Detect double clicks on the decoration title bar
No longer handled by the Decoration.
2014-11-28 14:50:21 +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 f103cd0bea DecorationShadow elements are QRects 2014-11-12 09:06:03 +01:00
Martin Gräßlin faa78e187e Rename DecoratedClient::borderingScreenEdges to adjacentScreenEdges 2014-11-11 14:33:31 +01:00
Martin Gräßlin dc85ab14f8 Decoration::windowFrameSection renamed to ::sectionUnderMouse 2014-11-11 13:17:50 +01:00
Martin Gräßlin 2fdafbb133 s/requestMaximize/requestToggleMaximization/g 2014-11-11 09:53:54 +01:00
Martin Gräßlin cb9cbae36e Decoration::paint takes the repaint region 2014-11-11 09:39:45 +01:00
Martin Gräßlin 062d071fc5 [kwindecoration] Add a PreviewButtonItem to the declarative plugin
Allows to create a DecorationButton and renders a preview for it.
Very basic, doesn't forward mouse events, etc.
2014-11-03 16:12:54 +01:00
Martin Gräßlin 8dd0a8163f [kcmkwin/kwindecoration] Import a new decoration configuration module
Following features are supported:
* finds all plugins
** finds all themes for a theme-engine plugin
* renders previews for the plugin/themes
* loads currently used plugin/theme
* saves selected plugin/theme
* triggers config reload in KWin

Following features are currently not supported:
* Search
* Plugin configuration
* GHNS
* Button configuration
2014-10-31 07:53:04 +01:00