Summary:
Current code will, when mirrored, treat all keys like they're the left
key.
BUG: 379894
Test Plan: Ran plasma in RTL
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D6480
Summary:
* make sure after a showevent the size is final and the
dialog can be safely repositioned.
* set mainItem visible in :setVisible() so that is executed before showEvent:
resizing windows in their show event is definitely not enough, causes events to arrive to
reset to the old geometry in race with the setgeometry done there, don't know yet
if it's the qpa, qwindow, or the windowmanager
* make synctomaintem and updatelayoutparameters working even if
the dialog is not visible as we need to resize beforehand
* move the plasmasurface window also in the show event as if there was no moveevent
after an hide/show, its position would be resetted to 0,0
Test Plan:
current dialog users behave the same (like pre-D6216 notifications applet), tests still pass
notifications applet reworked to use this works as expected
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: sebas, hein, davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D6215
like happened in KPasswordWidget, show the show password
button also when there is no text, otherwise is impossible
to know what will be typed, a dot or the actual letter
BUG: 378277
Summary:
Don't construct a QUrl for every source strings. Check it's a file url
first (which is the only kind of url we support at the moment)
When extracting the path, use toLocalFile, so it works on platforms where
path!=toLocalPath (e.g. windows)
Don't split a string and get a chunk, but just extract the chunk we need
with section. Reduces allocations that are automatically discarded.
Narrow iconPath scope
Test Plan: Tests still pass, plasmashell still works
Reviewers: #frameworks, #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D6014
Summary:
take into account size hints also when adjusting with synctomainitemsize
which sometimes has to be executed right before adjusting from the layout
hints, giving one wrong resize
introduce geometryUpdatesBlocked, which stops the dialog
from syncing which is useful when both visual parent and item
contents gets updated in one go (the tooltip) it is not
yet exported to qml and it shouldn't as is dangerous, but
kicker may make use of it between changing the submenu model and
the visualparent
alternative implementations may be:
* a method that takes both main item and visual parent
* delaying with a timer setGeometry (ouch)
this part can also be left behind for now and see if the rest is good enough
Test Plan:
no visual glitches visible anymore in wayland when moving the tooltip
in the taskbar, x11 ok too
Reviewers: #plasma, hein, davidedmundson
Reviewed By: #plasma, hein, davidedmundson
Subscribers: broulik, davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5912
Summary:
this ensure two things:
* submenus have the main menu as transientParent
* the visualParent window() is used as transientParent, if exists
this partly fixes popup positioning in wayland, tough
the main taskbar menu is still mis positioned
Test Plan: submenus ok, taskbar contextmenus only partially fixed
Reviewers: #plasma, #plasma_on_wayland, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #frameworks, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D5773
Summary:
every time the window gets shown the wayland surfaces
get created, when hidden, they get destroyed
showevent is too early for it as they aren't there yet,
use :Exposed instead, but only the first time when the surface
isn't there yet
Test Plan:
popup applets always have correct blur in a wayland
session
Reviewers: #plasma, #plasma_on_wayland, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #frameworks, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D5745
Summary:
when usesPlasmaTheme gets changed, make sure to
invalidate the svg icon if there, to reload the
icon from the proper source, being either from
the plasma theme or the system icon theme.
Test Plan:
cuttlefish now reloads dynamically the proper icons
when the monochrome checkbox is ticked
Reviewers: #plasma, sebas
Reviewed By: #plasma, sebas
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5721
Summary:
We were missing installing the qmldir file which is quite important
Test Plan: Actually used them in a Plasmoid
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5603
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
To use isMobile one need to import the QtQuickControls as well in
addition to QtQuickControls.Private
This fixes the warning flood at runtime
CCMAIL: faure@kde.org
I think p-f 5.30.0 tars need to be re-done with this.
I think it's wrong to set the flags for *every* event() but at least avoid the
string comparison Qt does internally in QX11Info::isPlatformX11()
Also, removes the need for an ifdef.
Differential Revision: https://phabricator.kde.org/D4019
The old code was connecting the KIconLoader signal to implicitWidth/HeightChanged
but never actually set a new implicit size.
Also, while at it use "setImplicitSize" - it's also marked internal but public
like setSize and uses qreal instead of QSizeF.
Differential Revision: https://phabricator.kde.org/D4011
It's not the property that changes (we don't assign a new QQmlPropertyMap) but
the properties within and it's already smart enough to signal this.
Differential Revision: https://phabricator.kde.org/D4013
Every single (Frame)SvgItem would creates its own Units instance which in turn would
create a property map for icon sizes and lots of other stuff. Avoid this.
CHANGELOG: There is now a global "Units" instance reducing memory consumption and creation time of SVG items
Differential Revision: https://phabricator.kde.org/D4012
This makes it consistent with the Breeze widget style.
The other themes (Air and Oxygen) didn't even have a scroll bar background.
Differential Revision: https://phabricator.kde.org/D3828
Summary: Ref T4947
Test Plan: works on desktop at least, haven't tested on phone yet
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Maniphest Tasks: T4947
Differential Revision: https://phabricator.kde.org/D3789
This introduces a new lineedit_reveal_password restriction (similar to lineedit_text_completion)
that disables the reveal password button on Plasma text fields, like the lock screen and WiFi password inputs.
Differential Revision: https://phabricator.kde.org/D3654
when the tabbar is vertical, on rtl layout the tabs order should
stay as is, as is rtl, not bottom-to-top
Change-Id: Ia5f1722d5e327207cf584a997dc8073c595c905b
REVIEW:129521
This reverts commit acd7ab7815.
This broke the build for me and on CI:
/home/jenkins/sources/plasma-framework/kf5-qt5/src/declarativeimports/core/datamodel.cpp:214:9:
error: 'LOG_PLASMACORE' was not declared in this scope
CCMAIL:notmart@gmail.com
port every terminal output to appropriate QCdebug/QCwarning,
each different binary has its own logging category now, so
it's possible to enable/disable them selectively.
this should also make plasmashell a bit more quiet on
terminal by default
Change-Id: Ic0b26364f988935e990c6988f8f9375b7c9bf838
REVIEW:129210
According to [X.org
docs](http://www.x.org/releases/X11R7.7/doc/compositeproto/compositeproto.txt)
regarding NameWindowPixmap:
"This pixmap will remain allocated until freed, even if 'window' is
unmapped, reconfigured or destroyed. However, 'window' will get a new
pixmap allocated each time it is mapped or resized, so this request will
need to be reinvoked"
So, pixmap needs to be discarded not only on XCB_CONFIGURE_NOTIFY event
but on XCB_MAP_NOTIFY event also.
WindowThumbnail did some open GL operations, discarding old textures, in
the GUI thread. Whislt it's not going to cause a threading issue (as
updatePaintNode always ran when the main thread was blocked) we're not
meant to mix threads with openGL contexts.
It also seems to have a GL leak on nvidia, which was previously masked
by the double delete fixed in
https://git.reviewboard.kde.org/r/126131/diff/2/
It seems only one worked, and in the applied version we went with the
wrong one.
This patch makes use of QQuickItem::releaseResources to delete the GL
textures on window change and destructor; it's then removed from
stopRedirecting so that start/stop redirecting handles xcb on the GUI
thread and updatePaintNode/discardPixmap is the GL stuff on the render
thread.
See http://doc.qt.io/qt-5/qquickitem.html#graphics-resource-handling
REVIEW: 128763
BUG: 368066
Similar to KPasswordWidget in kwidgetaddons
Also fixes:
- the clear button still being clickable when not enabled
- RTL icons
- Updating the right margin correctly
REVIEW: 128660
This flips the tooltip when using right-to-left languages
CHANGELOG: The standard tooltips are now mirrored when in a right-to-left language
REVIEW: 128662
LayoutChanged causes QML to destroy all delegates and re-create them.
Since the number of days doesn't change but only the numbers, we can just call dataChanged on all roles.
Furthermore, when agenda-related data changes, only the containsEventItems role
might have changed, so only emit a change for it.
CHANGELOG: Performance when changing months in the calendar has been greatly improved
REVIEW: 128648
The QSGTextures are created with
window()->createTextureFromId(m_texture, QSize(w,h),
QuickWindow::TextureOwnsGLTexture));
this means we don't want to be deleting textures ourselves too, it will
be deleted when we delete the QSGTexture, which is a scoped pointer
inside our QSGNode.
BUG: 355644
BUG: 365946
REVIEW: 126131
Currently the code gets the icon name from the QIcon and tries to do
some Plasma theming with it.
However if that fails it then loads the QIcon::fromTheme again.
This is pointless in most cases and will break any icons that have a
custom loader (all SNIs)
REVIEW: 128580
QtQuick.Layouts by default left aligns content and because the Layout is
anchors.fill'd the icon would show off-center in a button when no text has been set.
This fixes this.
REVIEW: 128493
BUG: 365947