Summary:
Using QtQuick.Controls for Label and TextField can result in blurry font rendering for a fractional scaling (e.g. 1,5). There is a work around for QtQuick.Controls 2.x therefore using QtQuick.Controls 2.0 for Label and TextField resolves the problem
BUG: 366451
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: ngraham, zzag, davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D14495
Summary:
Remove all instances of anchors in a layout.
This is undefined behaviour (even if it happens to work) and results in
a warning in 5.11.
Resulted in some shuffling about, but generally cleaner code.
Visually looks the same
Test Plan:
Added some buttons
Dragged and dropped some buttons out of the top header
Still got my "drop here to remove button" hint with the same opacities
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12284
Summary:
As documented via bug reports and online support requests, many users have difficulty learning that window decorations are customizable, because they don't notice or understand the little icon-only button in the bottom-left corner of each theme preview.
This patch centers the buttons and adds text including the theme name , making it obvious what the buttons are for.
Also, clicking on one of the buttons now automatically selects its corresponding theme, because configuring an un-selected theme doesn't make a lot of sense and could lead to user confusion once this UI is more obvious and widely-used.
BUG: 390245
Test Plan:
{F5761897}
- Clicked on the configure buttons; each one selects its parent theme and opens its configuration dialog
Reviewers: #kwin, #plasma, #vdg, cfeck, graesslin
Reviewed By: #kwin, #plasma, graesslin
Subscribers: richardbowen, zzag, kigwana, rkflx, matheusm, fabianr, abetts, Fuchs, graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11201
Summary:
The KCM has a context property of the currently set theme index. This is
set before the decorations model is populated, so it is currently always
-1.
This model is populated after the constructor but before
KCModule::load().
KCModule::load is called from KCModule::showEvent so before
QQuickGridView will start doing anything with delegates.
This fixes the problem simply and also avoid parsing the config file
multiple times.
This bug was introduced in 5.9.4:
Someone made a (tested) change to make sure the view scrolled to the
right place on startup.
I then made a (tested) commit fixing the crash on exit
The author then updated his patch to my changes, but now in a way that
didn't work.
Test Plan:
Opened system settings module with a million decorations.
The correct entry was visible and highlighted.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5401
Summary:
using the same trick as elsewhere, set the currentIndex
and move the view to currentIndex right at startup
the only way to be sure is onContentHeightChanged
as there are no signals for when "the view has been
populated and settled up"
Test Plan:
the view is at the right state since the first frame shown,
no more jumping around effect
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4703
Summary:
As described in https://bugreports.qt.io/browse/QTBUG-57714 exposing a
QWidget as a context item to QtQuick can crash. Especially as the
engine's context property gets deleted whilst deleting the parent item.
This patch reworks the code so that the models are exposed to QML
directly rather than going through a QWidget.
CCBUG: 373628
Test Plan:
Pressing back whilst in the decoration KCM used to crash every time, now it doesn't.
I still have the buttons.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, cfeck, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4533
Summary:
Currently the configure button is aligned to the win decoration in the
background. This is bound to 40 - the inactive decorations shadow.
This means the configure button ends up in different places across each
item,
looking a bit weird and potentially not even on top of the right
delegate.
This patch aligns the configure button relative to the overall delegate
so that it's in the same place on every item
Test Plan: Looked at KCM
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3526
BUG: 372685
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
- tab theme and button items
- move menubutton close hint below checkbox (moved on top)
- use proper background palette on palette updates
REVIEW: 125393
The text cannot be aligned to the icon (makes
it move around when dragging the icon) nor
can we just allocate two line (makes single lines
detached from the icon)
BUG: 343411
REVIEW: 122301
FIXED-IN: 5.2.1
the only way to ensure the view won't randomly become black
(probably QQuickwidget won't be fixed in qt anytime soon or
ever in 5.x lifetime due to how architecturally is)
basically systemsettings has no control of what gets loaded in,
if one other kcm will call winId(), this one will break.
BUG:341971
- 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
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.
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.
* 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
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).
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
Using a QQuickPaintedItem for the rendering. The item gets the library
name from the model and loads the decoration with its own decoration
plugin. Thus each preview has its own plugin which eliminates the need to
constantly recreate the decoration as it is done with the preview.
Having a QQuickItem gives new possibilities. The item accepts hover
events and forwards them as enter and leave events to the widgets inside
the decoration. By that the mouse interaction of e.g. Oxygen is still
functional. If the decoration uses the new update approach the bridge is
forwarding the updates to the item and triggering a repaint so we even
have animations in the preview although the widget is never shown.
This introduces quite some changes. We cannot include a QQuickView
directly in the QWidget based UI as a replacement for the
QDeclarativeView used before.
Instead a QScrollArea is used as replacement for the view and a
QQuickView is embedded into a widget container in the scroll area's
view port. This allows us to keep the existing semantic of having a
native scroll bar synced with the list view. It might be an idea to
change this to QtQuickControls in future.
As the list view is now only inside the scroll area we do not need to
pass the slider width to the root context and can by that more easily
calculate the width of one decoration.
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.
Model is extended to support QML based Aurorae themes as well
the preview is able to handle it. For this a new qml component
is added which loads the decoration preview.
Stop at bounds while flicking to have a list which behaves in a
natural way on the desktop and ensure that the scrollbar
handles cannot overshoot the list.
Thanks to Nuno for providing the QML based scrollbar. Obviously
this does not improve the consistency with other widget styles, so
a proper solution is still required.
BUG: 291612