Commit graph

355 commits

Author SHA1 Message Date
Ivailo Monev
8f1f10be6c plasma: do not fade the end of the text from Plasma::Label
it causes undesired look in the weather applet for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-23 09:10:43 +02:00
Ivailo Monev
be5e962187 generic: compiler warning fixes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-18 04:07:46 +02:00
Ivailo Monev
b55dab289f plasma: move event object to the scope it is used in in Plasma::LineEdit::focusOutEvent()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-23 15:35:25 +03:00
Ivailo Monev
ce66b4435a plasma: remove qrc support leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-22 19:17:46 +03:00
Ivailo Monev
cabdebd649 plasma: remove unused Plasma::TextBrowserPrivate member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-22 19:07:05 +03:00
Ivailo Monev
05c5e67554 plasma: remove redundant Plasma::GroupBox::resizeEvent() reimplementation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-22 18:43:59 +03:00
Ivailo Monev
965b0b33e2 plasma: correct base class call in Plasma::IconWidget::mouseReleaseEvent()
someone made a boo boo (hint - wasn't me)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-22 18:37:21 +03:00
Ivailo Monev
93c35e4c15 generic: remove build-time compat options
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 19:57:19 +03:00
Ivailo Monev
73d767817d plasma: remove scripting leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 19:28:06 +03:00
Ivailo Monev
fbfb374b9c generic: drop scripting and tray support
after changes to multiple sub-projects (Katie, kdelibs, kde-workspace
and kde-extraapps) that finally happened, can write lots about it but I
will keep it short - by rewriting parts that were using js/qml (e.g. the
plasma applets) the desktop startup was reduced to half, also the legacy
tray thing shall be no more (anything that needs tray icon shall be a
plasma applet now) thus some applications and features will be dropped
aswell. see all repositories for the changes done

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 08:06:58 +03:00
Ivailo Monev
9afe0d8566 plasma: remove redundant constraints checks
whatever the constraints were attempting to filter and secure is unused now
and I bet in the past - the "Constraints" group is not a thing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-24 21:53:02 +03:00
Ivailo Monev
4f56e99b9a plasma: elide the Plasma::Frame text
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-24 12:19:33 +03:00
Ivailo Monev
9c683ba417 plasma: do not override QStyle::ComplexControl::CC_Slider control rectangle
Plasma::Slider is now painted as native widget

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-20 19:46:24 +03:00
Ivailo Monev
961d56277c plasma: paint Plasma::ComboBox, Plasma::LineEdit, Plasma::PushButton, Plasma::Slider and Plasma::SpinBox as native widgets
goal is to paint as little as possible with svg images, the fact that there
are 3 kinds of widgets (native, plasma and qml) makes things look
different and as if made of bits and pieces instead of having a uniform
look. with my reimplementation of several widgets and applets it is less
so tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-20 10:26:36 +03:00
Ivailo Monev
b1b83d3afd plasma: do not add stretches around the Plasma::TabBar proxy
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-18 20:09:13 +03:00
Ivailo Monev
9222bc71e1 plasma: remove redundant Plasma::Applet::eventFilter() reimplementation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-18 17:29:49 +03:00
Ivailo Monev
46cf566daa plasma: clear the internal Plasma::ToolButton image member from Plasma::ToollButton::setImage()
if the image path happened to be the same but the elemente ID not then the
image was not going to change, that is no longer the case

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-16 11:10:36 +03:00
Ivailo Monev
581fe4066a plasma: do not adjust Plasma::ScrollWidget on timer
while the compression of the scrollbars adjustment has its gain the visual
glitches that resizing on timer causes are not worth it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-14 15:04:06 +03:00
Ivailo Monev
e66a124829 plasma: do not deep-copy the Plasma::Applet::action() and Plasma::Applet::addAction() arguments
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-14 12:00:06 +03:00
Ivailo Monev
7d56c26074 plasma: call QToolButton constructor in Plasma::ToolButton constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-14 08:43:19 +03:00
Ivailo Monev
c4e23a5c3f plasma: remove redundant signals declaration
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-10 06:59:27 +03:00
Ivailo Monev
8656f87085 plasma: remove unused Plasma::ScrollWidgetPrivate members
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-09 23:37:42 +03:00
Ivailo Monev
f8f34a1825 plasma: mark Plasma::AbstractRunner::hasRunOptions() as const
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 00:53:32 +03:00
Ivailo Monev
f92c0651ba plasma: mark Plasma::ConfigLoader getters as const
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 00:49:36 +03:00
Ivailo Monev
8bdcf8d36f plasma: mark Plasma::Containment getters as const
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 00:46:12 +03:00
Ivailo Monev
c800e36a5e plasma: mark Plasma::Corona::appletMimeType() as const
could batch such changes but - meh..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 00:41:57 +03:00
Ivailo Monev
1d07019215 plasma: Plasma::DialogShadowsPrivate::setupPixmaps() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 00:28:49 +03:00
Ivailo Monev
df591fa7ea plasma: mark Plasma::PackageStructure::entryList() as const
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 00:22:21 +03:00
Ivailo Monev
3b22af1d92 plasma: mark Plasma::View::trackContainmentChanges() as const
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 00:07:56 +03:00
Ivailo Monev
5ae3cd4ede plasma: remove unused Plasma::ItemTypes::LineEditType enum
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 23:27:52 +03:00
Ivailo Monev
78fa7ed2c6 plasma: mark Plasma::FrameSvg::prefix() as const
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 23:23:26 +03:00
Ivailo Monev
614724f90e plasma: initialize Plasma::ItemBackgroundPrivate members from its constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 23:20:29 +03:00
Ivailo Monev
6b339097d2 plasma: mark Plasma::IconWidget::numDisplayLines() as const
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 23:14:37 +03:00
Ivailo Monev
a2530529a4 plasma: create key sequence objects from the key enums
create QKeySequence from string involves decoding the string (splitting it
into bits and pieces and matching it to a well known list of strings and
then create integer out of the decoded bits which is sub-optimal

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 20:48:43 +03:00
Ivailo Monev
6ed94914fe generic: get QImage and QPixmap objects width and height via the specialized methods
QImage::size() and QPixmap::size() construct QSize object from the internal
width and height members

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 03:45:25 +03:00
Ivailo Monev
88598523d0 kdeui: new KPixmapWidget
the idea for QImage/QPixmap-optimized widget occurred to me while
writing kimageviewer (see the kde-playground repo), unlike the widget I
wrote for kimageviewer this one supports drag-n-drop tho and is drop-in
replacement for QLabel when showing only a pixmap is required. the
widget also shows a small image while dragging ala ksnapshot

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-29 08:59:51 +03:00
Ivailo Monev
e7823a0484 generic: require Katie v4.14.0+
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 20:35:10 +03:00
Ivailo Monev
07de7723af plasma: replace use of QTime as timer with QElapsedTimer in Plasma::ScrollWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 02:10:11 +03:00
Ivailo Monev
da2cb4b848 plasma: do not check if the current "requires configuration" state matches from Plasma::Applet::setConfigurationRequired()
because the message overlay is used for both (error) messages and to show
configuration button (with optional message) and the overlay may have to
be recreated to override the one previously setup by
Plasma::Applet::showMessage() (e.g. when an applet is created, message is
shown and then a configuration overlay but with the internal "requries
configuration" state not changing)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 16:17:47 +03:00
Ivailo Monev
c3a344c4af plasma: check the display outside the loop in Plasma::DialogShadowsPrivate::freeX11Pixmaps()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 14:49:53 +03:00
Ivailo Monev
bd063c8b56 generic: remove dead and irrelevant links references
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 14:26:19 +03:00
Ivailo Monev
b7b609278b plasma: static analyzer warning fix
because the AppletHandle pointer is connected before assigning the handle
member the AppletPrivate::handleDisappeared() slot may be called with null
null handle pointer resulting in a call of member on a null pointer

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 15:15:42 +03:00
Ivailo Monev
32a3def809 plasma: replace QVarLengthArray<T> with std::vector<T>
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 18:29:19 +00:00
Ivailo Monev
1e4db516f3 plasma: correctLastComponentCase() function optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 11:33:20 +03:00
Ivailo Monev
b7d67374be plasma: focus hack for Plasma::CalendarWidget
as is done by Plasma::LineEdit

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-24 20:51:50 +03:00
Ivailo Monev
6cb0ae1239 plasma: call Plasma::ThemedWidgetInterface::initTheming() from Plasma::CalendarWidget constructor
to apply palette and font instantly instead of relying on it to happen due
to external events

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-24 08:39:14 +03:00
Ivailo Monev
97372f70af plasma: Plasma::CalendarWidget documentation correction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-24 06:38:43 +03:00
Ivailo Monev
ce03856f54 plasma: theme the Plasma::CalendarWidget via the internal Plasma::ThemedWidgetInterface class
what that does - the general application color scheme applies to the native
widget and any Plasma::Theme overrides are applied on top of that making it
slightly less native looking and more plasma-themed.

also that allows to not just hide the calendar month button but disable it,
the colors for disabled widget as slightly lighter than the usual color
scheme so its not a big difference visually with that change

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 20:55:55 +03:00
Ivailo Monev
0560ab5550 plasma: sligthly better workaround for Plasma::CalendarWidget navigation bar
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 13:06:57 +03:00
Ivailo Monev
7e78f97d61 plasma: new Plasma::CalendarWidget class
to be used by the clock and calendar applets

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 11:30:15 +03:00