Summary:
In effect this is meant to resurrect the "Panel" icon size setting from
the Icons -> Advanced KCM in System Settings, for use as a ceiling on
panel icons to avoid them taking up too much space, especially in wide
vertical panels.
Previously, the actually-unused "Desktop" size hint was added to the
iconSizes map. I believe this was in error, as the size hints are
semantically different from the size classes. This patch marks the
"desktop" iconSizes map entry as deprecated and makes it available
under iconSizeHints instead.
The soon-to-be-updated D5592 will demonstrate this API in use.
CCBUG:378443
Reviewers: #plasma, mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5593
Summary:
The reference textField is undefined in this context
It works if the style happens to be used from PlasmaComponents
Use control instead to access the TextField.
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: ltoscano, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5297
now with fallback is common to have prefixes that are not present and fail.
this generates a lot of debug that is not really useful, as is an OK
thing.
Summary:
if the user code did something like
IconItem {
implicitWidth: 32
implicitHeight: 32
}
then never automatically update implicitWidth or height.
this favors compatibility and fixes the desktop
toolbox appearance
Test Plan:
textbox works, other icon items in plasmashell seems properly sized.
applet alternatives fix is still needed
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: hein, davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5243
When using a regular JavaScript Array as model and omitting certain roles (e.g. not
having a "text" for a separator) it would throw a warning.
Differential Revision: https://phabricator.kde.org/D5247
We had m_smooth but never actually used it in the texture node.
With Plasma SVG icons this shouldn't be used but when passing custom pixmaps
or raster graphics (e.g. custom icon in Kicker, thumbnails in Folder View)
Differential Revision: https://phabricator.kde.org/D5214
We overwrite implicit size based on the icon loaded nowadays which breaks this.
Also, while at it, added an explicit "valid" check for the icon.
Differential Revision: https://phabricator.kde.org/D5202
Summary:
This allows users of IconItem to know the aspect ratio of the
source document, which can be used to size the item or set
applet size hints to accomodate non-square images better.
This will be used in a patch to Kicker/Dashboard that ports
a use of Image in its CompactRepresentation to IconItem to
get the hover highlight effect even for a custom button image.
Reviewers: #plasma, mart, davidedmundson
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5160
Use the enums in a consistent way to place the menu around the parent item.
Test Plan:
Tested with plasma-pa and task manager context menu.
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4921
This way containment context menus and PlasmaComponents Menu get accelerators assigned to by default.
CHANGELOG: Most (context) menus have accelerators (Alt+letter shortcuts) now
BUG: 361915
Differential Revision: https://phabricator.kde.org/D5057
Summary:
This is a basic styling of a QtQuickControls2 series based on Plasma theme.
it has the main controls available in Qt 5.7
it installs them as a separate import (org.kde.plasma.controls 3.0) for
use restricted to plasmoids, is probably needed to be still installed as
a style as well
Test Plan:
tried with minimal QML files, a more comprehensive gallery may be needed.
pending considerations:
* some of the classes, like Drawer, the dialogs and ApplicationWindow *don't* make sense in plasmoids
* it will probably still need to be installed also as a qqc2 style, as this should be used in Plasma mobile
* probably only some of the controls should be installed as a separate import, the whole set as a style strictly for Plasma Mobile use. the same qml files would be used, so no maintainance overhead
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, broulik, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4508
Summary:
When setting an empty QStringList as prefix, it can lead to unexpected results, such as the prefix not changing.
BUG: 377441
Reviewers: #plasma
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5000
It is deprecated. Instead re-implement roleNames().
Done in places where only static roles were used.
Differential Revision: https://phabricator.kde.org/D4891
Test Plan: Ran
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4857
Summary:
Like all the inbuilt shaders this now has a separate GLS source file which
works with a newer version without requiring compatibility.
Was https://git.reviewboard.kde.org/r/128426/
Test Plan:
Ran plasmashell with ForceGlCoreProfile set in the config
Hovered an icon in the task manager and it animated to the correct one
correctly.
Ran glslangValidator on both files. No warnings.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4851
Summary:
This matches what Qt does internally, it's easier to read and gives us
syntax highlighting on the shader files, but more importantly in future
we will get Qt's automatic loading of core profile shaders.
Test Plan:
Opened QML with IconItem, made the icon switch.
Still looks the same
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, broulik, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4848
There was already some kind of detection and adjustment if there is not enough
space for the popup available. Do some more work by placing the popup according
to its PopupPlacement enum. Do this also if the popup breaks the top or left
boundary of the screen.
Also fixes some minor problems:
* TopPosedRightAlignedPopup was the same as RightPosedTopAlignedPopup, but in
the first case the menu should be on top of parentItem
* LeftPosedTopAlignedPopup was above parentItem and not left of it
* Small documentation error
Reviewers: #plasma, hein
Subscribers: plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D4867
This hints the actual size of the handle, excluding any padding and shadows
and allows for the handle to touch the outermost border of the rail underneath.
Differential Revision: https://phabricator.kde.org/D4762
Summary:
if a framesvgitem has an array as prefix, like
FrameSvg {
prefix: ["toolbutton-hover", "hover"]
}
it will use the first available prefix, so on themes that
have toolbutton-hover, that one will be used, old themes will
continue to use "hover" as prefix
Test Plan:
tested the calendar with breeze theme has breeze-widget style
toolbuttons, with olt themes as air, the old behavior is still
there, switching on the fly works
Reviewers: davidedmundson, #plasma
Subscribers: davidedmundson, broulik, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4827
Summary:
Otherwise if anyone used setAction it would be missing a very important
connect.
Test Plan: Compiled
Reviewers: #plasma
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4758
Summary:
Unlike the visible property, the opacity does not inherit parent values
and refers to the relative opacity of that item.
The current style code is checking that an item we can't control
externally has an opacity > 0, this doesn't really acheive anything.
This was a breakage from when we ported *to* QtQuickControls 1.
Test Plan:
I was running a plasmoid I had written years ago (my RSS tutorial)
and had abnormally high CPU usage in an animation that I didn't have then.
Code was:
BusyIndicator {
opacity: 0
running: true
}
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4729
Also clean them up a bit and drop the "smooth" dance as it doesn't make a difference with QtQuick 2.
Differential Revision: https://phabricator.kde.org/D4572
since the vertical size hints of the button depend from the
labe size hints, it cannot have Layout.fillHeight as it
breaks its Layout.*Height and implicitHeight
use a vertical anchor instead as buttons always have a single line
reviewed-by:d_ed
ScrollArea has a property for en/disabling the frame provided by its style.
Until now the property wasn't evaluated, which besides making it impossible
to deactivate the frame leads to visual artifacts (observed in Simple Menu:
Flashing frame at the bottom of the page list).
In order to not change the current implementations we additionally set the
value in ScrollArea to true.
Reviewed By: mart
Subscribers: broulik, hein, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4473
Summary:
give frameSvg the concept of repaintBlocked(), that enables and
disables the regeneration of the frame data when a property is set.
the use case is when often, a lot of properties are set one after
the other (such as prefix, enabled borders, size)
collapse the formely similar, but a bit different logic of frame
regeneration is a single function for better maintanability.
QML FrameSvgItem sets repaintblocked when it starts and releases it just on oncomponentCompleted
Test Plan:
plasmashell still starts, autotests still work, all frames are rendered correctly
the destruction of old frames is cutted by 50%. in the qml profiler
the creation time of a framesvgitem slightly improved, on this machine from around 26 msecs to around 21, can still be improved, but at least the code is a bit simpler
Reviewers: #plasma
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4414
This fixes the label not being vertically centered if the button is smaller than its implicit height.
This can happen with the global menu applet in a narrow panel.
BUG: 375911
Differential Revision: https://phabricator.kde.org/D4436
Summary:
Icon's are generally small, they may as well go in the existing shared
texture atlas, save some memory and it means more items can be batched
whilst rendering.
The textures used during animation are unchanged for now as it also
requires changing FadingNode's shader.
Test Plan:
Ran plasma.
We use atlas's in frame/SVGItem already so it should be fine.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4342
This allows to limit the maximum width of a menu. It can be useful for instance
in task manager where long file names for recent documents will result in gigantic menus.
The property has a RESET method (which is called if you assign "undefined") which will
set it back to QWIDGETSIZE_MAX to remove the size restriction.
Differential Revision: https://phabricator.kde.org/D4257
Summary:
I just realized there was a weird workaround in plasma-nm where it gets
checked so it's shown.
Properly use the declarative API instead of listening to a ton of signals.
Test Plan: Tested with plasma-nm and org.kde.plasma.notifications plasmoids
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4214
the layout engine has a bug
https://bugreports.qt.io/browse/QTBUG-58307
that if some items have an odd height, some an even height,
the smallest items are resized by half pixel to try to
really center it, breaking rendering
BUG:375318
Reviewed-by:David Edmundson
Summary:
Means long main texts don't get truncated. One of the main uses
for tooltips is to show full text for things that are truncated
in the usual UI, so this is a bad default.
BUG:375141
Reviewers: #plasma, mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4189
Using KPlugin allows for the plugin metadata to be localized. Contains
also fallback code to be able to load the pre-KPlugin plugins so that
the plugins are not broken until next Plasma/KDE Applications release.
Differential Revision: https://phabricator.kde.org/D3811
Summary:
Though we can make the property constant, some applications still use the
signal (for example FolderView.qml) to know that one of the icons has
changed sizes and do some processing.
Whilst it would be possible to fix folderview, we should avoid public
API changes.
Reviewers: #plasma, #frameworks
Subscribers: plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4092
QML sizes can be fractional. In case we're asked to load a 31.5 px pixmap it would truncate
it to 31 and then round down to 22 causing a blurry result. Instead, round the size.
Differential Revision: https://phabricator.kde.org/D4040