Commit Graph

13139 Commits

Author SHA1 Message Date
Marco Martin
9365123152 fix minimumWidth/height
don't try to access undefined properties

make the style and the control as independent as possible
2014-07-24 17:11:19 +02:00
Marco Martin
02c6bba518 initial port of Button to QtControls
still loads of layout problems
2014-07-24 15:58:14 +02:00
Marco Martin
f6e4cb790e Revert "support platformcontents for shell packages"
This reverts commit 9760601704.

thinking about it, a shell package should be really device specific per se
2014-07-24 14:05:58 +02:00
Marco Martin
9760601704 support platformcontents for shell packages
reviewed by: Bhushan Shah
2014-07-24 13:58:26 +02:00
Eike Hein
9ff445b0e4 Fix bottom/top elements in viewitem not being of consistent height.
This was causing broken vert alignment everywhere and making me very
cranky.
2014-07-23 20:07:43 +02:00
David Edmundson
c127b78d57 Always take the slow path for composeOverBorder
We previously only supported compose-over-border when the centre was not
set to tile.

It's possible to use compose over border with tile.. even if it doesn't
make much sense.

Given that creating an opacityMask loads most of the image anyway, we
can make use of the FrameSVG painter path and avoid any additional code
complexity here.

REVIEW: 119406
2014-07-23 15:54:13 +02:00
Marco Martin
d580410142 add a mask prefix in dialogs 2014-07-23 13:16:01 +02:00
Marco Martin
80516dbef0 framework part of the applet alternatives chooser
this is the little part in plasma-framework for the applet alternatives chooser.
works together the branch mart/alternativesConfig of plasma-workspace and plsma-desktop.
for how it looks and why, see the vdg forum thread:
https://forum.kde.org/viewtopic.php?f=285&t=122067&p=315919#p315919

still possible problems:

I'm not sure about using a new desktop file entry X-Plasma-Provides, maybe Categories could be enough, but it may produce many false positives as well

REVIEW:119409
2014-07-23 12:25:32 +02:00
Aleix Pol
fbb6166f84 Revert "No need for compose-over-borders in the Breeze button"
It was needed, after this we realized that the buttons looked odd,
in some cases, because the center wouldn't be under the 2px wide
sides.

This reverts commit e34d89a1f5.
2014-07-22 16:22:06 +02:00
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
Marco Martin
963a900e0e add an autotest for some properties of FrameSvg
shows that contentsRect() is broken in master right now
2014-07-21 19:38:11 +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
41c4ba6787 Make it possible to run the widgetsgallery from qmlscene
Adds a new entry point to the widgets gallery so we can test it
from qmlscene.
It's a valid use case for the components and the best tool we
have for testing that we didn't break components.

REVIEW: 119322
2014-07-16 17:41:34 +02:00
Aleix Pol
061723f236 Add a couple of manual tests 2014-07-16 17:02:01 +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