Commit Graph

2308 Commits

Author SHA1 Message Date
Aleix Pol
e34d89a1f5 No need for compose-over-borders in the Breeze button
Reviewed by David Edmundson
2014-07-22 15:40:34 +02:00
David Edmundson
bdb0b3b2ca Check for empty sized elements in original SVG
Reviewed-by: Aleix Pol
2014-07-22 13:35:44 +02:00
Aleix Pol
0b1bb7edd8 Optimize breeze theme
Breeze theme usually has borders and center that can be tiled, which
ends up in more performant rendering, as we don't need to re-render
anything from the svg every time we resize an element.

Basically what we did was "s/hint-stretch-borders/hint-tile-center/g".
The only exceptions we found for this were: picker, dragger and monitor.

Reviewed by David Edmundson

CCMAIL: plasma-devel@kde.org
2014-07-22 13:01:50 +02:00
Aleix Pol
e613662ab5 Make framesvg unit test pass
Revert the changes in contentsRect, it was clearly not the best place to
put the code that contains the code that computes the content size.
Instead move the code in FrameSvgItem, duplicates data and code but works.
2014-07-22 03:14:26 +02:00
Aleix Pol
ab93d83890 Merge branch 'davidedmundson/framesvg_native'
Use FrameSVG as 9 tiles instead of uploading a big texture of the finished frame each time.
This also saves the cache being populated with full created frames in different sizes; which end up taking up space in the disk and shared memory cache as well as the GPU memory.
A code path falls back to the original uploading the entire texture if obscure settings are used, i.e overlay.

Benchmarks:
apitrace when resizing a frame goes from an average of 7.6ms per frame of CPU time just for the swizzling and uploading to 1.4ms
GPU time also drops from 40us to 10us

Themes will need to remove stretch-borders (when we gain nothing from stretching; i.e Breeze) to get the most out of it.

REVIEW: 119330
2014-07-21 18:38:11 +02:00
Aleix Pol
dca3958b44 Stop exposing that many things in FrameSvgItem
Move the shared code between FrameSvg and FrameSvgItem into a separate file
that both can link to.

Reviewed by David Edmundson
2014-07-21 18:01:26 +02:00
Aleix Pol
99586bc420 Add API documentation as it's public API now
Reviewed by David Edmundson
2014-07-21 15:49:10 +02:00
Aleix Pol
47c7688d02 Move some of the code and make some API public
It's unreasonable to use private API, so make everything public API so that
every user of FrameSvg have as much features exposed as possible.

Reviewed by David Edmundson
2014-07-21 15:44:25 +02:00
Lukáš Tinkl
3f07e41e2a i18n style fix 2014-07-18 22:36:42 +02:00
Lukáš Tinkl
cdce8e5445 don't replace ampersands for an underscore
in context menu actions
2014-07-18 22:36:13 +02:00
Aleix Pol
565b2b6f51 Add a guard after figuring out the contentRect for a framesvgitem 2014-07-18 12:44:06 +02:00
Aleix Pol
a1d7863f4f Fix scrollbar display, polish sectionRect function
While debugging a glitch I found out a bug in the painting code that hide
behind QRect documentation. See comment in sectionRect. This never rendered
correctly.
2014-07-18 02:42:46 +02:00
David Edmundson
f2fb13ab3b Merge branch 'master' into davidedmundson/framesvg_native 2014-07-17 22:43:08 +02:00
David Edmundson
3eee37bd81 Don't allow tiling + compose over border at the same time
It wouldn't make any sense. Just choose tiling
2014-07-17 22:42:26 +02:00
David Edmundson
371c9a53dd Add composeOverBorder support in FrameSVGItem 2014-07-17 22:29:54 +02:00
David Edmundson
a0bd7c9c14 Revert "Do not leak toolbox items"
This reverts commit 5e9fc425c6.
2014-07-17 21:12:16 +02:00
David Edmundson
1f7951d873 Revert "Setting parent on toolbox causes problems. Instead delete via connection"
This reverts commit c38e6a204e.

This causes problems on the panel toolbox.
We were already trying to set a parent; however as it's a property of a QQuickItem
it only changes the visual parent; kdeclarative has a code path that if there's
a visual parent to skip the memory management; bug is probably there instead.
2014-07-17 21:08:02 +02:00
David Edmundson
c38e6a204e Setting parent on toolbox causes problems. Instead delete via connection
Reviewed-by: Eike Hein
2014-07-17 20:36:02 +02:00
David Edmundson
2bf3466b53 Put compose over border onto the slow path that renders the entire item 2014-07-17 19:32:17 +02:00
David Edmundson
5e9fc425c6 Do not leak toolbox items
Finally found the cause of the items QML_LEAK_CHECK warns of.

BUG:336561
REVIEW: 119343
2014-07-17 18:50:05 +02:00
David Edmundson
31c1fcc50e Do not leak containment actions
REVIEW: 119341
2014-07-17 18:49:50 +02:00
David Edmundson
09e23eb675 Merge branch 'master' into davidedmundson/framesvg_native 2014-07-17 12:39:55 +02:00
Marco Martin
9ba599e1b9 packages with Hidden=true metadata are invalid
This originates from the request of downstreams to hide packages that are still installed.
why should be easier than not installing them i don't know, *but* semantically I think it makes sense act as if the package was not existing when the metadata says it's hidden

REVIEW:119329
2014-07-17 12:30:43 +02:00
l10n daemon script
f7208d7d21 SVN_SILENT made messages (.desktop file) 2014-07-17 08:59:54 +00:00
David Edmundson
1924877140 Add code path FastStretch, which resizes without re-rendering 2014-07-16 22:51:29 +02:00
David Edmundson
be05a8394a Don't remove nodes from a parent whilst we're cycling through them 2014-07-16 22:22:43 +02:00
David Edmundson
6c0dadc1c2 tidy variable + method names + fix crash 2014-07-16 20:40:41 +02:00
David Edmundson
e037203748 Add tiling support 2014-07-16 20:40:41 +02:00
Aleix Pol
a4e3569bbd Introduce the FrameSvgItem fastPath alternative, opt out of it on overlays
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
2014-07-16 17:01:05 +02:00
David Edmundson
9b0d414e57 Fix minor memory leak in Wallpaper interface
REVIEW: 119316
2014-07-16 15:40:00 +02:00
Aleix Pol
cbe13ac765 Do a full repaint when frameSvg says a repaintNeeded 2014-07-16 13:51:53 +02:00
Aleix Pol
a30afb9c34 Ensure we don't overlap the center with the right and bottom borders 2014-07-16 13:51:25 +02:00
Aleix Pol
fc4e09df46 Add warning 2014-07-15 19:57:43 +02:00
Aleix Pol
0a94e1b1b8 Take composeOverBorder into accoun 2014-07-15 19:56:04 +02:00
Aleix Pol
cf0f8d0c91 Make sure all prefixes are being used 2014-07-15 19:54:45 +02:00
Aleix Pol
89536abd9c Take into account that the requested prefix is not always the actually used prefix 2014-07-15 17:26:25 +02:00
Aleix Pol
4bde2d48dd Iterate over svgitem
Don't upload textures every time we resize, makes the resize much smoother.
Make it possible to show and hide borders
2014-07-15 16:28:41 +02:00
Aleix Pol
c4d9bcb362 don't let the contentRect overlap the borders 2014-07-15 16:27:34 +02:00
Martin Klapetek
06827054f4 Replace Calendar grid with Canvas
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
2014-07-15 13:53:34 +02:00
Marco Martin
188d131d77 make the uiloaded tests pass
work in case of every order the various applets and containments emit uiready
REVIEW:119284
2014-07-15 10:16:10 +02:00
Marco Martin
427acdb373 Merge branch 'mart/coronaautotest'
REVIEW:119270
2014-07-14 20:48:31 +02:00
Aleix Pol
83895d8e26 Use proper sizes and positions 2014-07-14 20:02:47 +02:00
Aleix Pol
f9d1bb3452 Merge branch 'master' into davidedmundson/framesvg_native 2014-07-14 18:52:51 +02:00
David Edmundson
dcbcb8a490 Construct full frame image using nodes inside FrameSVGItem 2014-07-14 18:44:33 +02:00
Aleix Pol
a8b37129d0 Refactor a contentGeometry method out of generateFrameBackground
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
2014-07-14 18:13:40 +02:00
David Edmundson
9fc470089b If SvgItem size is 0, remove any nodes in the scenegraph 2014-07-14 17:23:33 +02:00
David Edmundson
96941f6c55 Use Atlas textures 2014-07-14 17:23:33 +02:00
Aleix Pol
d574f51108 Move the central space painting into a separate function
Reviewed by David Edmundson
2014-07-14 17:00:39 +02:00
Aleix Pol
33aa8e406d cleanups
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
2014-07-14 16:49:12 +02:00
Aleix Pol
ae56796cb9 Move corner painting into a paintCorner function 2014-07-14 16:47:56 +02:00
Aleix Pol
f62b357b62 Prefer passing a size rather than a width and height 2014-07-14 16:37:00 +02:00
Aleix Pol
df1d44407a cleanup
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
2014-07-14 16:32:10 +02:00
Marco Martin
6666445af5 don't make failed applet block the corona 2014-07-14 14:22:36 +02:00
Aleix Pol
5b1fc96329 Small internal code refactoring
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
2014-07-14 14:16:16 +02:00
Aleix Pol
dac1d8f265 Figure out why my plasma wasn't notifying the startup
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
2014-07-14 13:23:20 +02:00
Martin Klapetek
2f933387af Refactor the Calendar component a bit
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
2014-07-12 13:52:34 +02:00
Aleix Pol
054a38b9d0 --runtime warnings 2014-07-11 19:51:42 +02:00
Aleix Pol
e008a5d7d4 If a timer is active and we start it, it will restart
No need to check if it's active and stop it first, according to the
documentation.
2014-07-11 19:15:06 +02:00
Aleix Pol
804a0d34da Fix cache implementation
It was weird.

Reviewed by the Handa-man.
2014-07-11 18:37:55 +02:00
Marco Martin
100b60a7fb return the prefix that has ben set even if not avail
symmetricity++ between setelementprefix and prefix
2014-07-11 16:55:59 +02:00
Marco Martin
c77b2bf9a8 fix switch from a less complete to a more complete
if the old theme didn't have a prefix, but the new one has,
set the old (formerly nonexisting) prefix again
2014-07-11 16:42:55 +02:00
Marco Martin
c2284cb48e connect(QPoineter breaks on some gcc versions
please, use connect(QPointer.data(), for time to come
2014-07-11 10:49:25 +02:00
Aleix Pol
d1e24d19fb fix build on jenkins
for some reason it works here...
2014-07-10 20:28:19 +02:00
Aleix Pol
4b222c5ef6 --warning unused variable 2014-07-10 20:28:01 +02:00
Aleix Pol
f75eb2d984 Don't connect to signals until the class has been initialized
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
2014-07-10 19:53:03 +02:00
Aleix Pol
92a8007489 Introduce TimeTracker debugging tool for plasma
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
2014-07-10 19:20:59 +02:00
l10n daemon script
8afadc6410 SVN_SILENT made messages (.desktop file) 2014-07-10 04:23:58 +00:00
Aleix Pol
124dc4799a fix build 2014-07-09 18:23:58 +02:00
Aleix Pol
f5f96c1390 Remove unneeded casts
They're all because we're accessing the d-pointer of the parent class (!),
we can access it without casting.
2014-07-09 18:20:32 +02:00
Aleix Pol
459f81814d Only consider a containment as finished if it actually passes a "true".
So far, we were only considering the fact that teh signal was being
emitted, and that's doesn't seem correct.

REVIEW: 119191
2014-07-09 12:51:24 +02:00
Aleix Pol
8fb62cc0a4 Cleanup
Re-use containment variable instead of keep fetching it every time. It's
not a trivial function, so better reduce the calls.
2014-07-09 12:43:08 +02:00
Aleix Pol
ae996c6666 --deprecated call 2014-07-09 12:36:34 +02:00
Aleix Pol
5e0acaa443 --warning 2014-07-09 12:02:31 +02:00
Marco Martin
11311f61e9 treat desktop location as bottom edge
swap edge only when the location is left or right
fixes tooltip position for things in desktop, like Folder icons

BUG:337112
2014-07-09 11:40:34 +02:00
Frederik Gladhorn
445331bba8 Improve TextField accessibility
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.
2014-07-09 09:57:23 +02:00
Andrew Lake
c29896a3a8 fix too many minute marks.
BUG:337235
2014-07-08 21:27:28 -07:00
l10n daemon script
ee230c4d21 SVN_SILENT made messages (.desktop file) 2014-07-09 03:37:24 +00:00
Frederik Gladhorn
5199c9778a Fix accessible roles 2014-07-08 21:46:13 +02:00
Marco Martin
9218543b65 QCoreApplication::closingDown() becomes true too late
restore the disconnect: sometimes appletRemovedForward gets executed after
aboutToQuit is emitted, but before closingDown returns true
this prevents configuration to be forgotten
2014-07-08 12:49:04 +02:00
Marco Martin
a5ecb2e0ff fix a crash sometimes happening on close
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.
2014-07-08 11:04:05 +02:00
Frederik Gladhorn
2f93b7f764 Add Accessibility properties
Also clean up increase and decrease actions for Slider a tiny bit.
2014-07-08 10:49:16 +02:00
Aleix Pol
596dc7523d Prefer inner scopes
Don't request data until we're going to use it.
Don't emit about config changes if config doesn't change
2014-07-08 01:47:43 +02:00
Marco Martin
0dba9044bf actions() returns the complete list
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>
2014-07-07 19:36:30 +02:00
Alexander Potashev
0e4c0c8851 Improve spelling and capitalization in i18n()-d text 2014-07-06 23:50:09 +04:00
Marco Martin
573f48921e don't escalate immutability on each save
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>
2014-07-03 14:12:21 +02:00
l10n daemon script
29908f145a SVN_SILENT made messages (.desktop file) 2014-07-01 12:38:20 +00:00
l10n daemon script
601836ad7f SVN_SILENT made messages (.desktop file) 2014-06-30 08:49:36 +00:00
l10n daemon script
b06bb52100 SVN_SILENT made messages (.desktop file) 2014-06-29 08:42:52 +00:00
Marco Martin
18b6d854a0 add missing files
REVIEW:118972
2014-06-27 15:13:46 +02:00
Marco Martin
6c54fb596d Don't expose color properties in c++ api
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
2014-06-27 15:06:52 +02:00
Marco Martin
6754c86cae plasma version of user-identity 2014-06-27 13:18:44 +02:00
Marco Martin
ffcc0d43d8 use correct highlight color
CCBUG:336775
2014-06-27 11:11:24 +02:00
David Edmundson
3cfa88f8c4 Add workaround for scrollview disabling keyboard interaction
See https://bugreports.qt-project.org/browse/QTBUG-31976

Reviewed-by: Marco Martin
2014-06-26 15:51:36 +02:00
Eike Hein
4153a2c8ee Catch popup menus by window type, not class name.
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
2014-06-25 16:17:26 +02:00
David Edmundson
dc79190b8d Fix dialog's check for isTooltip
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
2014-06-24 21:17:58 +02:00
Marco Martin
655e7fcc0d base on tabbar minimum width to show scrollbuttons
be more deterministic and now usually kickoff never shows the
scroll buttons

BUG:335392
2014-06-24 16:35:50 +02:00
Marco Martin
41722f7fb5 fix stylesheet 2014-06-24 15:04:28 +02:00
Marco Martin
f74b88a356 add a monochrome k menu logo 2014-06-24 14:51:53 +02:00
Kai Uwe Broulik
347e073df3 Add paintedWidth and paintedHeight properties to WindowThumbnail
REVIEW: 118886
2014-06-23 19:58:15 +02:00
Aleix Pol
ce5d182510 Make Application component async
We're not using it for concatenating process calls, so it doesn't make
sense to make it block.

Reviewed by David Edmundson
2014-06-23 15:37:47 +02:00