In order to have support for tooltip window type in Wayland, the
window type NET::Tooltip is also set through KWindowSystem API once
the platform surface is created.
REVIEW: 128300
the llvmpipe driver doesn't have a good quality enough for the
taskbar thumbnails components, it will have many crashes in the driver.
disabale thumbnails with that driver, as kwin disables many effects as well.
BUG:363371
emergency change: in Qml the name "state" for a property
is reserved for the internal state machine, so any object that
exposes a "state" property on its own would automatically
break the state machine
Like KIconloader, support a Selected state, in IconItem,
as in all generic svgs/framesvg
it replaces the text color with HighlightedText and the
background color with HighlightColor
Change-Id: Id97a527405d2c3feed75a172f05547defdbf440c
REVIEW:127975
Only reset if there's an event for current date. Without that when
the applet tries to get the updated list of events and it gets the
old one (empty) due to the check at the beginning of eventsForDate().
lately the highlight color of plasma became a very
washed-out blue, (since it switched to use the
global system colors) that was because it actually
taken the highlight color (and highlightedText)
from the wrong source.
there is a correct color group in kcolorscheme for
that, that is Selection, take those two colors
from that (also means highlight and highlightedtext
always be the same in all plasma::theme::colorgroups
but that's not a problem)
update test to reflect that
REVIEW:127842
add named colors for positive (usually green)
neutral(usually yellow) negative(usually red)
foreground objects, such as text or parts of
svg icons/themes
REVIEW:127696
Change-Id: I646306339f1684cdc062da3d3af1489af6092372
we have a color in the Plasma theme "highlight" that is basically
an accent color used around.. but one of the uses is to use it as
a background, such as highlighted text. in that case we don't know
what color would be safe for contrasting on top of it for things
like the highlighted text color (plasma style used the background
color for that, which is incorrect)
REVIEW:127637
This removes some old cruft that is not really used and serves
basically only as a bool property for checking if it's null and
wheter it equals the last activated date.
This can be done without it by simply resetting the current selected
date (another property) to "today".
REVIEW: 127455
BUG: 360683
We have a lot of reusable singletons that are just hidden when not needed, such
as the OSD. IconItem, however, will always fade from the previous state, even if
the previous action happened minutes ago.
This fixes for example changing the volume and then later changing the brightness
where you could see the OSD animating from the volume icon.
REVIEW: 122859
Changing the color group of an Svg emits repaintNeeded which will then
cause it to schedule a pixmap update anyway. Includes a unittest.
REVIEW: 127313
source should always return the same value as it was assigned.
Also removed duplicated code (empty sourceString is now handled
as if the source couldn't be converted to any type).
REVIEW: 127282
IconItem handled both QOixmaps and QImages as a source.
QVariant(somePixmap).canConvert<QImage>() returns true so one of the
two code paths isn't executed. Given converting between the two is
practically free, we don't need two code paths.
REVIEW: 127270
Add some tests for IconItem.
Also found one issue in animation when quickly changing source, first frame
will be rendered with wrong icon.
REVIEW: 127103
Unset mainItem and set it back only after changing of tooltip contents
is completed. This improves behavior of morphingpopups effect (popups
animates from/to incorrect values).
REVIEW: 127118
This prevents the tooltip from showing up if hideTooltip was called
before it was shown.
BUG: 358894
Differential Revision: https://phabricator.kde.org/D959
tooltips are now animated by a KWin effect, don't try
to animate own X11 positions, that's quite dangerous
Change-Id: I08ef2bc23ec1ef7cb7c432ba1bf6d9c5b0a0ab01
Commit 5184ac introduced a small regression that caused IconItem
to no longer load non-theme icons with name set, for instance icons
coming from sni-qt, causing sni-qt apps to not show in systray.
BUG: 359388
FIXED-IN: 5.20
REVIEW: 127091
If you use Plasma's ToolButtonStyle with different controls than the PlasmaComponents.ToolButton it prints a warning about an ID that does not exist.
Use "control" instead which is guaranteed to be the item.
This removes the custom label-based triangles and replaces them with proper ToolButtons
using proper icons. It also adds a "Today" button to return to the current day.
The tooltips on the buttons reflect the actual action ("Previous Month", "Previous Year",
"Previous Decade", depending on the zoom level).
Furthermore, the day names and week numbers now use the regular font size but they're still
visually disconnected. The day names row is hidden in the zoom levels now.
REVIEW: 126960
BUG: 336124
BUG: 348362
BUG: 358536
When showing QIcons in IconItem, it would ignore stylesheet colors.
This tries to load QIcons created with QIcon::fromTheme as svg, by using
the icon name returned from QIcon::name.
REVIEW: 126792
CCBUG: 353358
Animators do not reliably work with a duration of 0 as can be seen in the linked bug report.
Upstream bug report: QTBUG-39766
BUG: 357532
REVIEW: 126652
keep internally a pointer (important that is *not* a smart pointer)
to the item the context has been created for.
on context deletion, remove the copy from the static bookeeping hash
this solves two related crashes: an infinite recursion
and a connection to a deleted object
Since some time PlasmaCore had the very useful ColorScope class,
which can semi-automatically make children take colors of the
View, Button or Complementary color groups.
Unfortunately it didn't support dynamic reparenting, giving
wrong colors in some cases (see black on black battery on the phone)
even tough is a bit complicated, now by cascading signals down the
children tree, support on the fly apply of the new context upon
reparenting.
also add a manual test case showing text, rectangles and icons
dynamically changing color as they get moved from one scope
to the other
REVIEW:126654
Change-Id: I3d746b73eac55a359c4706fb719b4d5018677fb5
Given with Qt high-dpi support manually adjusting the icon sizes to fit is mostly
obsolete because applications will do that nowadays - we should do the same.
REVIEW: 126641
Even when flat we should indicate that a ToolButton has focus.
This makes keyboard navigation substantially less awkward.
CHANGLOG: Improved visibility of keyboard focus on buttons
REVIEW: 126567
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.
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
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
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
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
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.
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
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
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
-use splitRef when converting parts of qstring to ints to avoid redundant memory allocations
-warnings--: remove redundant ';'
CCMAIL: notmart@gmail.com
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
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
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
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
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
PlasmaCore.IconItem has a fade animation when changing source.
Clearing the source when tooltip is not visible eliminates the
animation.
REVIEW: 125178
When using ModelContextMenu with a JS array the "model" param of the clicked
signal is null because QtObject property can only hold QObject but no JS objects.
CHANGELOG: The onClicked signal of PlasmaComponents.ModelContextMenu now works properly
if model is a JS Array of JS objects
REVIEW: 124910
Nowadays the size of the icon is defined by the size of the button itself,
and vice-versa.
This patch uses the unit sizes to decide which sizes to offer.
REVIEW: 124628
on denser screens we need more higher speed and
deceleration expressed in pixels
Change-Id: Ida366190ec99720f05b8c52f08514fc087a67948
reviewed-by: "Kai Uwe Broulik" <kde@privat.broulik.de>
This adds a "Year overview" showing all 12 months in a grid, and a "Decade overview"
showing the current decade.
CHANGELOG: Calendar navigation has been significantly improved, providing a year and decade overview
REVIEW: 122488
Otherwise it's centered on the button instead to the icon and it looks
wrong. Also it's good that we use the rectangular background as it involves
all the button, arrow included.
Reviewed by Marco Martin
solves some highdpi issues
saves and reads natural sizes separed by scalefactor
so they don't get mixed up when the scaefactor changes
resulting in wrongly sized items
reviewed-by:David Edmundson <david@davidedmundson.co.uk>
Makes the code a bit simpler & lighter and fixes the sometimes missing
bottom line in calendar.
The grid is now equally padded from both sides (including the month
name), so basically it's now always aligned to the center and this also
fixes the cases where there was a bigger padding on one side than on the
other.
The grid is now also anchored to the bottom so that the bottom margin
can stay moreless consistent with the side margins in different sizes.
Change-Id: I2f2173d11e473d6e93db2bdca002269e4239f516
REVIEW: 124072
CHANGELOG: Improve hidpi support in the Calendar grid component
Sometimes the first day in the grid can be Sunday, but the week number
must always be counted from Monday in that week
BUG: 349044
Change-Id: I903650fcaadb4fd78764ad6a8bb1e219261c791b
FIXED-IN: 5.11
There can be a situation when changing resolution/scaling or some other screen
property that driver/XRandR decides to turn the screen off temporarily, during
which there are no screens and QGuiApplication::primaryScreen returns a null
pointer.
Approved-by: David Edmundson
Since the password echo is a circle woithout vertical or horizontal lines, it won't be
more blurred with different rendring types.
Using Qt rendering, the dots will look more aligned and equally spaced.
Change-Id: I8052f176930d1e2dc144f0b65daf539764cf08b1
REVIEW:123799
Now it will show first character only if the ListView has FirstCharacter
set
Change-Id: I6d2451d95e36a9a07eed4168402ac5748e87dcb3
Reviewed-by: Marco Martin
To improve accessibility and consistency with widget applications scroll bars no longer
automatically hide after a timeout, which was the case when a touch screen was present,
which is nice for tablets but bad for desktops.
CHANGELOG: Scroll bars no longer automatically hide when a touch screen is present
REVIEW: 123645
BUG: 347254
When the tooltip is empty (no text, no subtext, and no mainItem) it will not be shown.
However, when it becomes empty while it is already shown, it stays there as a small
rectangle. This hides the tooltip immediately (so KWin's fadeout animation still has
the proper content rather than the empty tooltip) when the TooltipArea that opened
the tooltip has been destroyed or its content becomes empty.
CHANGELOG: Fixed stray tooltips when temporary owner of tooltip disappeared or became empty
REVIEW: 122939
When Component.onCompleted is emitted, all the static children have been created,
thus we can call the layout function right away.
CHANGELOG: Fix TabBar not properly laid out initially, which could be observed in eg. Kickoff
REVIEW: 123106
Not a real issue as initialize() is always called before they're used
but it's cleaner and fixes a coverity warning.
Change-Id: Ib1168be7f9d72c7d5765850a7f35d524ea279a75
This improves animation smoothness, eg. when switching between heavy system tray plasmoids.
CHANGELOG: PageStack transitions now use Animators for smoother animations
REVIEW: 123102
This reduces stuttering when switching between lazyloaded pages
CHANGELOG: TabGroup transitions now use Animators for smoother animations
REVIEW: 123103
Since attached properties cannot ever change during the lifetime of the object,
a colorscope needs to be created for each obect that asks for the
attached property. now each instance if (internal) has m_inherit
(only those created as an attached property), will search for the property
of the proper ancestor. Not super efficient, but the proeprties should be
actually asked for rarely enough.
doesn't look much nice, but seems to work pretty reliably and the only way to.
Change-Id: I735da5551dbb8c2641be88d245f998d00ed977ac
REVIEW:122988
when QT_DEVICE_PIXELRATIO is something different from 1,
the pixmaps generated by Svg will be scaled up to give a proper texture.
This is complementary but not replacing our current approach:
the pixelratio that can be accessed by units is now in relation to the qt pixel ratio,
spacings are also adjusted accordingly (therefore, spaces and sizes won't
need an integer value like pixelratio)
svg introduces also a scaleFactor property (that is pretty much like its old pixelRatio)
basically, scalefactor, will scale both the textures and all the reported sizes,
(old method) pixelratio just scales textures without altering measures
(like qt pixelratio likes)
Change-Id: I304aa0d80abf76abafac239be185dd3b2ab741b7
REVIEW:122673
The active property is usualy set in response to a hover event.
Loading the new pixmap right away, starting the fade animation immediately, provides
a more responsive user experience.
REVIEW: 122857
Currently units is based on font metrics except icon size and some SVG
parts which use DPI directly.
Instead of taking the physical DPI we take the logical DPI which is used
for working out font point -> pixel sizes.
We can rely on this being correct as otherwise every other app would
appear broken.
REVIEW: 122799
BUG: 338308
Change-Id: I22f668ccea7d6d15ff475e1368c82964bdde1e60
This patch ports the default tooltip away from custom spacing,
positioning and Row/Column to QtQuick.Layouts. It makes the sizing more
predictable, and the code more modern and readable. Tooltips feel to
behave a bit smoother with this patch.
In the process, this...
- fixes spacing when no icon or image is set
- limits the maximum height of the subtext to 8 lines (this prevents the
klipper tooltip for example from growing super-high)
- Makes the icon on the LHS proportional to the text
- Limits the width a bit more to prevent super-wide tooltips
- makes it use units.gridUnit throughout
Changelog: Improve tooltip layout
REVIEW:122717
This reverts commit fa2109ccb6.
Turns out the plan to raise the version with every framework
release is not as simple as raising the version numbers as
this breaks pretty much everything.
Filtering only by regexps is not enough because as soon as filtering by
special characters is needed, they can get interpreted as regexp special
characters and stuff will break.
Change-Id: Ic5cd0309e1e77d790faeecedbe87fdaaeceffc33
REVIEW: 122695
This patch cuts down animation time quite considerably. We've discussed
this during the sprint. The default long animation is now 120ms instead
of 250. We have played around with different values, and this seemed to
hit sweet spot between the interface feeling really snappy, but the
animations still visible, so no sudden transitions in the UI.
We should consider doing something similar for kwin animations.
Reviewed-by: Kai Uwe & Marco
CCMAIL:plasma-devel@kde.org
CCMAIL:kwin@kde.org
This makes them significantly less annoying by having them close more reliably when
leaving the ToolTipArea and more importantly fixes the tooltip interrupting the
applet resize operation.
REVIEW: 122624