Commit Graph

13258 Commits

Author SHA1 Message Date
Marco Martin
f2a1824c31 proper colors for the labels and icons 2014-07-25 15:43:17 +02:00
Marco Martin
957eab570e support for attached buttons 2014-07-25 15:36:14 +02:00
Marco Martin
c8cb89faa9 support for round buttons 2014-07-25 14:40:13 +02:00
Marco Martin
a3266857ad initial port of ToolButton
wonder if will be possible to share something with Button,
but ToolButton is way more complicated
2014-07-25 14:21:05 +02:00
Marco Martin
a059748fbc Merge branch 'mart/QtControlsButton'
REVIEW:119455
2014-07-25 13:05:00 +02:00
Aleix Pol
daf7981820 Just pass the bigger textures from the !m_fastPath to the textures cache
It's a really cheap lookup, and maybe we get to skip some textures
uploading

Reviewed by David Edmundson
2014-07-25 12:57:16 +02:00
Marco Martin
05f4a44059 use implicitWidth as label minimum width 2014-07-25 12:54:27 +02:00
Aleix Pol
ab0740228c Remove hint-stretch-over-borders from lineedit
This way the line edit can go through the fast path as well
2014-07-25 12:53:24 +02:00
Aleix Pol
6641285d3b Remove deprecated code-path
hint-compose-over-border is now treated by the !m_fastPath
2014-07-25 12:42:31 +02:00
Aleix Pol
bc425f1809 Cache the textures created for the fast path
Create a cache that has pointers to all the textures that we've generated,
so in case we have one already created, we can re-use it.

REVIEW: 119425
2014-07-25 12:41:53 +02:00
Marco Martin
dbbb8056f5 use the minimumWidth gave by the Layout 2014-07-25 11:26:41 +02:00
Marco Martin
d29b3f051d don't mix anchors and layouts 2014-07-25 11:20:26 +02:00
Marco Martin
7538c3292c don't compute two times the same thing 2014-07-24 20:16:46 +02:00
Marco Martin
0c2138916e use RowLayout 2014-07-24 20:11:31 +02:00
Marco Martin
b538a1dca9 override iconSource for compatibility 2014-07-24 19:19:26 +02:00
Marco Martin
9301163142 support checked buttons 2014-07-24 18:30:55 +02:00
Marco Martin
2e06bb3214 create arrow on demand, layout it correctly 2014-07-24 18:29:48 +02:00
Marco Martin
9b06cbc392 style doesn't depend from control properties 2014-07-24 17:47:19 +02:00
Marco Martin
a39c8898b3 don't redefine iconSource 2014-07-24 17:38:13 +02:00
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