Commit Graph

989 Commits

Author SHA1 Message Date
Eike Hein
706276d108 Stop relying on timer to schedule pixmap updates.
The timer was used to skip ahead of parsing and to compress prop
updates to handle width/height changes atomically. This achieves
both by moving pixmap load into the polish phase after those are
guaranteed to be done.

This fixes a bunch of flicker all over the place since 150ms is
obviously far beyond the frame time budget on 60 hz, but we can
usually easily fit into one frame on hot caches.
2015-12-22 18:39:53 +01:00
Eike Hein
283ab4a634 Fix element ids for east orientation. 2015-12-22 05:04:01 +01:00
Kai Uwe Broulik
9b48e3d010 [Window Thumbnails] Don't crash if Composite is disabled
We were checking for Composite at compile-time but not at runtime causing a crash
when Composite has explicitly been disable in which case Damage might still be availab.e

REVIEW: 126296
2015-12-13 20:25:20 +01:00
Martin Klapetek
e33b486be6 [calendar] Delay the model reset until the view is ready
Otherwise things will crash.

Reviewed-by: Eike Hein
BUG: 355943
2015-12-02 12:57:57 -05:00
Nick Shaforostoff
c7c2980f14 qstring optimizations
REVIEW: 126148
2015-11-27 20:03:48 +00:00
Kai Uwe Broulik
9ccc6293f7 [IconItem] Don't crash on null KIconLoader theme
REVIEW: 126168
BUG: 355577
FIXED-IN: 5.17
2015-11-25 18:17:57 +01:00
Marco Martin
a9d3d9a81a make event filters static to decrease installed filters on qApp
since seems there are so many event filters installed
on the QApplication installed that may give performanc
 issues, try to use separate, singleton watchers for them
to decrease the amount of eventfilters called

REVIEW:126113
2015-11-20 14:26:16 +01:00
Martin Klapetek
6f3fed77d5 [calendar] Use ui language for getting the month name
Simple QDate::longMonthName(..) won't do the job as it
will return the month name using LC_DATE locale which is used
for date formatting etc. So for example, in en_US locale
and cs_CZ LC_DATE, it would return Czech month names while
it should return English ones. So here we force the first ui
language locale and take the month name from that.

BUG: 353715
REVIEW: 125705
2015-11-18 12:38:08 -05:00
Martin Klapetek
e571628b18 [calendar] Sort the events by their type too
The QML sectioning code does not actually sort the model, this needs to
be done beforehand. This should now sort the events by their type and
their start datetime
2015-11-18 12:38:08 -05:00
Marco Martin
ee9e5907cf allow paste on password fields
but don't allow to copy, select or cut
2015-11-18 18:22:46 +01:00
Marco Martin
8e0c244482 fix positioning of edit menu, add a button to select
don't show edit menu for passwords
2015-11-18 16:59:42 +01:00
Martin Klapetek
c84e591b96 [calendar] Use correct plugin IID for filtering
With moving the plugin to KDeclarative, the namespace got changed but it
was forgotten to change the plugins filter
2015-11-17 19:04:08 -05:00
Martin Klapetek
e757ebb483 [calendar] Add missing item id 2015-11-17 17:45:49 -05:00
Martin Klapetek
f746db2878 [calendar] Fix some missing properties and property settings 2015-11-17 17:44:01 -05:00
Marco Martin
258242fffd fix tickmarks in vertical mode 2015-11-17 17:52:21 +01:00
Marco Martin
91ad79a553 better disabled look 2015-11-17 17:52:21 +01:00
Martin Klapetek
520837a07c [calendar] Move the plugin library to KDeclarative
Marco is not happy with the plugin being here and having a Plasma
namespace, so after some discussion it was decided to move it to
KDeclarative and change to CalendarEvents namespace.
2015-11-16 14:26:26 -05:00
Martin Klapetek
c507c744ca [calendar] Fix build 2015-11-16 12:22:34 -05:00
Martin Klapetek
f9d7fc87d5 [calendar] Fix binding loops 2015-11-16 11:52:55 -05:00
Martin Klapetek
b65195ee65 [calendar] qmlRegisterUncreatableType needs a bit more arguments 2015-11-16 11:52:17 -05:00
Martin Klapetek
d0d0a27bac [calendar] Move the plugins handling to a separate class
This is also made a QML singleton that will be used for the applet
config view where it will add the plugin configs once we add that
possibility.

The same instance is then set to the DaysModel from QML.

REVIEW: 125951
2015-11-16 11:49:02 -05:00
Martin Klapetek
fe0384f0d4 [calendar] Add plugin system for Calendar events
This adds a simple plugin interface that can be subclassed
and provide events integration with Plasma Calendar applet.

It's asynchronous and I've kept it deliberately simple.
For now the Calendar tells the plugins which date range
is being displayed, the plugins load the data and then
emit the dataReady() signal containing the events.

The events are stored in a multihash for quick access
by the Calendar's agenda part but also for overall
easy-to-use (eg. in teh model data()).

The event data is stored in EventData class, which has
a pretty self-explanatory members, except perhaps the
"isMinor" property. The intention with this is to support
namedays, where in some countries the calendars have
different name every day. This is just a minor holiday
and as such should not mark the calendar grid, otherwise
the whole grid would be in a different color.

Putting the interface here might raise the question of
depending on plasma-framework, but plugins provided by
KDE can go to plasma-workspace and other 3rd party ones
would just have to live with it. I don't think it will
be a problem but if it turns out it is, we can rethink
the placement.

REVIEW: 125817
CCBUG: 349676
CHANGELOG: Allow plugins to supply event data to Calendar applet
2015-11-16 11:46:26 -05:00
Marco Martin
c8b9b852ef check for slot existence before connecting or disconnecting
since this is a blind connect to a slot that may exist
or not exist, the new syntax can't be used, but check
for the slot existence before attempting a connection

BUG:354751
2015-11-11 11:07:46 +01:00
Martin Gräßlin
fae8384845 [declarativeimports/core] Specify HAVE_XCB_COMPOSITE in config-x11.h 2015-11-09 11:11:06 +01:00
Martin Gräßlin
286300ad35 Use newer cmake syntax for XCB dependencies 2015-11-09 11:11:06 +01:00
Martin Gräßlin
e95de33465 [declarativeimports/core] Drop xcb shape dependency as it's unused 2015-11-09 11:11:06 +01:00
Kai Uwe Broulik
606c7f651d [TabBarLayout] Layout sooner
CHANGELOG: Fix TabBar items being cramped together on initial creation, which can be observed in eg. Kickoff after Plasma start

REVIEW: 125978
2015-11-07 13:15:50 +01:00
Nick Shaforostoff
db7f198a19 -use QStringLiteral and QLatin1String in the code that is executed multiple times (avoids utf8->utf16 conversions)
-use splitRef when converting parts of qstring to ints to avoid redundant memory allocations
-warnings--: remove redundant ';'

CCMAIL: notmart@gmail.com
2015-11-06 13:39:18 +00:00
David Rosca
f32677b8e0 Take QApplication::wheelScrollLines into account from ScrollView
This is adaptation of https://codereview.qt-project.org/#/c/109615/
for Plasma style.

REVIEW: 125889
2015-11-06 12:03:51 +01:00
Martin Gräßlin
ae4ba8920e [declarative/core] Use BypassWindowManagerHint only on platform X11
BypassWindowManagerHint is a flag which is X11 specific. Because of
that for example QtWayland doesn't create a real window for QWindows
with this flag.

Using such a window will eventually result in a freeze of the whole
application. If one renders with QtQuick to such a window, mesa will
request a frame callback from the compositor. Just the compositor
will never deliver the frame rendered callback as it doesn't know the
window exists in the first place and by that doesn't render it and
will never ever deliver the frame rendered callback.

If now one tries to render another frame, mesa notices that it hasn't
got the frame callback and will block the thread till that happens.
With the setup described: that's until eternity.

See Qt Bug: https://bugreports.qt.io/browse/QTBUG-49272

REVIEW: 125961
2015-11-06 08:51:37 +01:00
David Rosca
5dc3f0ac7f calendar: Make the entire header area clickable
This makes the entire header area clickable (not just the header label).

REVIEW: 125899
2015-10-31 22:18:06 +01:00
David Rosca
2ca48a7d2d calendar: Don't use current day number in goToMonth
Fix goToMonth when that month does not have current day number
(eg. today = 31).

REVIEW: 125894
2015-10-31 22:17:15 +01:00
David Rosca
1e867f276b calendar: Fix updating decade overview
Always update model when switching to decade overview.

REVIEW: 125893
2015-10-31 22:16:32 +01:00
Aleix Pol
36288df5ac Fix logic (and warnings) in ModelContextMenu
It was checking that a variable existed, then it used it. Now it works like
the rest of the properties.

REVIEW: 125809
2015-10-26 18:14:41 +01:00
Marco Martin
bf05c65858 Merge branch 'breeze/5.5'
merge the new theme
is mostly an incremental difference compared to the previos theme
2015-10-26 13:07:12 +01:00
Dāvis Mosāns
39f8db95c2 Initialize QFunctionPointer to Q_NULLPTR
REVIEW: 125756
2015-10-22 16:23:51 +03:00
Marco Martin
c1065ccf39 Theme breeze icons when loaded trough IconItem
This makes IconItem try to load global icons from the theme
with Plasma::Svg as well, making it assign the colors from
the stylesheet if the breeze monochrome icons are treated,
that should be scriptable, from some attempts i did the
script seems to convert them correctly, without any
change in rendering.

This will automatically color monochrome breeze icons only
in plasmashell, and more specifically only those that use
IconItem, not QIconItem (iconitem should probably have an
animation-less mode to be able to be used in taskmanager
and stuff)
perhaps in the future we'll be able somehow to hook all
this stuff in QIconEngine to be able to use it in QWidget
applications, but since QIcon does have any idea where it is,
is not usable yet for things like the fullscreen fixed-dark
gwenview view.

Change-Id: I28e5fedabafbe8ed82a9df7614f8e2af18c6a24d
REVIEW:125657
2015-10-20 11:49:20 +02:00
Marco Martin
b4d7916dba make the new checkmark work
Change-Id: I673e5e5d2dad7318027ae40c8712ffc7ba795505
2015-10-19 18:25:47 +02:00
David Edmundson
1a4c1d7eeb Fix Button minimumWidth property
Plasma's Button has an extra property "minimumWidth" which is an extra
hint not in QQC to say "what is the size to exactly fit the contents".

(it's a bit confusing, as we can perfectly handle a button below it's
"minmimum" size)

This should be based on the size the contents want to be (the
implicitWidth), not how small the contents can go (which with is pretty
meaningless when our button can elide)

It got broken at some point recently.

BUG: 353584
Change-Id: I637898c3abf98183bbae30d8f15c4d72801a3650
REVIEW: 125698
2015-10-19 11:30:19 +01:00
David Edmundson
e6ba526539 Remove duplicate code expanding size hint of panel to fit text
QtQuickControls already does this inside Button code. This hint is meant
to be "what's the default size for a panel to be".

Change-Id: I12fd084a3d3c35b172fbff9c7d3ab5c5565a82dc
2015-10-19 11:30:14 +01:00
Marco Martin
7cafe26fa0 make PageRow work
enum names aren't anymre available in js files
fix scrollToLevel behavior
2015-10-12 18:19:13 +02:00
Marco Martin
dea284f8f3 use a RowLayout for ToolbarLayout
more reliable.
also put the first and last buttons at the extremes, the others in the middle
2015-10-05 11:41:42 +02:00
Takahiro Hashimoto
64b951fab3 Make tooltip dialog hidden on the cursor entering the inactive ToolTipArea
REVIEW: 125443
2015-10-02 23:23:14 +09:00
Marco Martin
c6804b034d consider devicepixelration in standalone scrollbar
Change-Id: I06e55738cde060f7ff372c039be20f5dad72d070
2015-09-18 20:17:07 +02:00
Marco Martin
244574edd1 no hover effect on touchscreen+mobile
still normal hover effect on laptops with touchscreen

Change-Id: I64f101e1572eed9d48174f0cf290fdfea085aaeb
2015-09-18 20:08:16 +02:00
David Edmundson
7453beb9ce Use lineedit svg margins in sizeHint calculation
QQC button heights are max(backgroundHeight, label + margins).
QQC lineedits are only from the background

We need to take the margins into consideration when deciding how high
the textbox should be otherwise we're effectively just ignoring what the
SVG says.

This means button and textbox on the login screen are now the same
height.

REVIEW: 125240
2015-09-16 23:56:39 +01:00
David Rosca
4b4461d76b Don't fade animate icon in plasma tooltips
PlasmaCore.IconItem has a fade animation when changing source.
Clearing the source when tooltip is not visible eliminates the
animation.

REVIEW: 125178
2015-09-14 11:06:00 +02:00
David Rosca
0df4823e8b Fix eliding button text
Setting minimumWidth to implicitWidth forces overflowing text
instead of eliding it.

REVIEW: 125201
2015-09-12 22:49:00 +02:00
Bhushan Shah
4fcb1c6dc5 Fix documentation of gridUnit
gridUnit doesn't correspond to milimetter but size of capital M

REVIEW: 125099
2015-09-08 12:25:40 +05:30
Marco Martin
573d2985ba Merge branch 'mart/inlineEditMenu'
REVIEW:124374
2015-09-02 11:58:06 +02:00