Fallback to the old code if there's something not (yet?) handled by the
new implementation. This way we get to optimize for the the common use-case
without breaking former, complex, code-paths.
Reviewed by David Edmundson
This patch simplifies the grid a bit more by using Canvas instead of
Rectangles, so actually lowering the number of Items needed to create
the grid from 16 to just 1.
It works pretty neatly with no junctions problem at all.
REVIEW: 119283
Given the FrameData and the total size, we get to know where is the
contents going to be and gives us the information to extrapolate where to
put all the borders and corners.
Reviewed by David Edmundson
Move variable declarations closer to its uses
Prefer using QSize than width and height separately, so we can pass it
around directly and use isEmpty
Remove duplicated code in the central piece drawing
Reduce type casts from QSizeF to QSize, we're always using it as a QSize,
so just make the cast once.
Remove redundant constructions like checking whether it's null and returning
null or unneeded arithmetics
Create a paintBorder function that can generically paint framesvg borders.
This helps us reduce duplicated code as well as improving the readability
of the code.
Reviewed by David Edmundson
Make sure AppletPrivate::uiReady is set in applet_p.cpp when we report that
the ui is ready.
Make sure that if we loop through all the containments and they're all
ready, we emit that it's done.
So far, Corona::startupCompleted was never emitted.
REVIEW: 119220
Currently the grid itself is composed of 88 rectangles that draw all the
lines in a way that two big rect draws the whole two topmost horizontal
and leftmost vertical border lines and then each day rectangle is
drawing small bottom and right rect.
This patch reduces it to 13 rects only where one rect draws the whole
frame around the grid and then 1px wide/high rects draw the inner lines.
Results in much cleaner & simple code.
Plus there's a small refactor on the id names so it makes more sense.
This does not require any additional changes in the applets.
REVIEW: 119232
While profiling plasmashell memory usage with Vishesh we realized that most
of the usage came from loading the Background image repeatedly.
We traced it back to this change, where we were connecting to
wallpaperChanged before initializing it, so it would initialize it again,
loading the wallpaper twice. It's not that we were leaking the object,
AFAIK, but loading an image using QQuickImage already raises the memory
quite a bit.
This change alone reduces by 15% the memory usage of my plasmashell (with 2
screens, that makes it a bit worse, because there's 2 DesktopViews then).
REVIEW: 119216
TimeTracker is a small class that keeps track of an object the changes in
the properties of an object and relates them to a point in time. This way
we can see how things change and react to each other. Then, this information
is exported into a json file to analyze.
REVIEW: 119199
Qt Quick accessibility already picks up the text automatically. Instead
set the name (which is a descriptive element) to the placeholder text
which is more descriptive of the element. Otherwise Orca will read the
text twice.
restore the disconnect: sometimes appletRemovedForward gets executed after
aboutToQuit is emitted, but before closingDown returns true
this prevents configuration to be forgotten
the problem is that sometimes when QCoreApplication::aboutToQuit the containment is already deleted (the order is not really deterministic), therefore appletScript::applet() will hit an assert.
using a qpointer should solve it, its data being already 0ed in the cases the containment is already deleted at :aboutToquit time.
the disabled/invisible actions already have it as properties.
this fixes the add widgets action sometimes not being available
in the toolbox
Reviewed by: Bhushan Shah <bhush94@gmail.com>
Applet::immutability() is the maximum between internal applet immutability
and the immutability of its containment.
so not set higher immutability in the internal member of Applet
or the applet will not be able to be unlocked properly
Reviewed by: Sebastian Kügler <sebas@kde.org>
the color properties are remotely useful only when used from QML
and risk to explode in number in the future,
it's not a good thing for a public c++ api.
Also, they will become kinda deprecated as in largely replaced by
the ColorRole api. Too late to remove those properties completely,
but still last days to move them at least out of c++ api.
(and in qml they could be removed in the future in a 2.1 version
of the import while still being present in 2.0 if needed)
This moves the color properties is a theme subclass available only from QML
REVIEW:118972
The latter breaks for subclasses of QMenu.
Follow up to review 118361.
CCMAIL:martin.klapetek@gmail.com
Fixes libkonq menus opened from Folder popup dialogs closing the
dialog.
BUG:336702
Qt::Tooltip is a mix of other flags (0x0001101)
using a simple & is not correct as any Window will have (0x0000001) set
and the bitwise & operation will return a non-zero value
REVIEW: 118906
The popup dialog can currently never be resized, so it doesn't make
sense to record its height in a config file. Additionally, this also
causes problems when applet writers change the size of their plasmoid.
Since the old size is saved in the config file, it is shown with the old
dimensions instead of the new ones.
REVIEW: 118849
BUG: 336070
Included is a plasma theme to make it look the same.
A known regression is that SectionScroller is temporarily removed
but that is currently not used in plasma-desktop
and this fixes a lot more problems than it causes.
REVIEW: 114283
it's an import in core, and advertises itself as an "attached property"
with this we can:
say that all its chidren are of a certain context, like "button" or
"complementary"
then anywhere there will be available an attached property, as ColorScope,
so like:
PlasmaCore.ColorScope {
group: PlasmaCore.Theme.Complementary
PlasmaComponents.Label {
text: "foo"
color: ColorScope.textColor
}
}
- internally, smallSpacing, largeSpacing and gridUnit are entangled, and
all use the font's rendered size. This means we can save a
QFontMetrics construction by merging the updating of these three
props.
- A wanted side-effect is that the updating of spacing and gridunit now
happens at the same time, so they're updated consistently in the UI.
- Also, use compile-time connects for the Plasma::Theme::themeChanged
connection
1/8 is really ridiculously small, it ends up being 2px on almost all
systems, and using it between UI elements makes them look really
cramped. 1/4 works much better, and makes this property actually useful.
for areas intended to have independent background and text color than
all the rest, like the Logout dialog
if Colors:Complementary is not present in the theme, it falls back to
normal colors
The used corona is either the containment's parent or, in case the parent
is an applet, it's containment's corona. With this change we ensure the
proper corona is always found.
This change requires screenContainment to be able to walk through the
object tree in case it's not a containment directly managed by it.
BUG: 334500
Basically splits the Calendar::m_startDate into 'today' and
'displayedDate', where displayedDate is the date that is displayed (it
controls the days model etc) and can be manipulated by the user by eg.
changing months in the plasmoid, and today is the current day, populated
by our dataengine (which means it auto-updates with no need for a
timer).
This allows for greater flexibility and things like "Go back to today"
when eg. the plasmoid is hidden or when the user have browsed too far in
the calendar and just wants to get back to today (the button to do that
pending).
Also this fixes a problem where the time dataengine is being polled
every 30secs for the clock and would reset the calendar view as the
startDate is currently bound to the dataengine and the view resets on
that change.
REVIEW: 118668
CCBUG: 336304
This enables and disabled menuitems with a timer, so we can see whether
dynamically updating these properties are propagated to the QMenu in the
proxy.
CCBUG:336281
* trigger an update after the animation finished as the IconItem needs to
switch to SVGTextureNode again
* Don't connect needlessly to a lambda slot
* FadingMaterialShader had the texture bind swapped
* Fix virtual method hidden warning in FadingMaterialShader
* Use dynamic_cast instead of static_cast to convert to SVGTextureNode
or FadingNode.
REVIEW: 118251
this makes it as synced as possible with the window
will still be behind the window size by exactly one frame
but at least is ensured is no more than one
experiment in dynamic repacement of Text and Background
colors, in order to be able to generate icons of different colors
based on where they are (for instance if the normal background
is dark and the button background is light
at the moment supported an option to invert colors, one
to use the "highlight" color (if we want colored icons
on mouse over)
It doesn't make sense to try to give hints at what it will be given that
we don't know.
For example, see how we're defining ::numScreens as 1 on the other method
as well.
newly created containments may have some default entries like plugin
or formfactor written in the config group, but not in keyList()
they have to be explicitly removed because wouldn't be removed in
deleteGroup
BUG:335792