Commit graph

5443 commits

Author SHA1 Message Date
Ivailo Monev
38ebb6f97e plasma: correct condition in Plasma::Label::setElideText()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 07:28:47 +03:00
Ivailo Monev
7715020fd0 plasma: correct comment in Plasma::IconWidgetPrivate::decoration()
it is deffinetly not KFileItemDelegate but it was probably copy-pasted from
there

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 07:20:59 +03:00
Ivailo Monev
dbf44ae507 plasma: remove redundant method call
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 06:45:06 +03:00
Ivailo Monev
4869eb7bcc plasma: check the popup dialog visibility on status change too
because the status may change as the popup dialog is visible

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 06:35:13 +03:00
Ivailo Monev
32d4c73c53 plasma: implement option to elide text from Plasma::Label
off by default for compat

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 18:27:26 +03:00
Ivailo Monev
5e5d82a274 plasma: return the original (not elided) text from Plasma::Label::text()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 18:07:48 +03:00
Ivailo Monev
19bded13ce plasma: automatically elide the text from Plasma::Label when not wrapping words
this may have to be made an option tho but for now it is not because word
wrapping is an option

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 17:39:55 +03:00
Ivailo Monev
e670fe2c33 plasma: do not delete the widget from Plasma::ScrollWidget::setWidget()
Plasma::ScrollWidget does not own the widget and it allows to swap widgets
(to reuse the same Plasma::ScrollWidget for scrolling more than one widget)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 16:35:43 +03:00
Ivailo Monev
d1733d8914 kdecore: keep reference to the QByteArray object in KStandardDirs::realFilePath()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 12:00:08 +03:00
Ivailo Monev
b8325fec7e plasma: drop support for setting image instead of icon for widgets
mixing the usual icons with svg icons makes things look different, does it
not?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 10:10:13 +03:00
Ivailo Monev
2ee9256d1a plasma: use the native widget text interaction flags to check if context menu should be shown by Plasma::Label
the text interaction flags can be changed behind the back of Plasma::Label
so

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 09:20:01 +03:00
Ivailo Monev
28995472b7 kdeui: send job data to org.kde.plasma-windowed
the same has to be done for application notifications

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 08:30:03 +03:00
Ivailo Monev
1b034764ad kdeui: KPlasmaJobTracker::registerJob() optimization
by not converting the QVariant (property) to QString and then back to
QVariant (implicitly)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 07:31:12 +03:00
Ivailo Monev
338a0bcc5e plasma: pass the rectangle that should be visible to Plasma::ScrollWidgetPrivate::makeRectVisible()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 07:25:20 +03:00
Ivailo Monev
b643c2b0da kdeui: update comment in KDynamicJobTracker::registerJob()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 07:22:55 +03:00
Ivailo Monev
a2209be85f kdecore: return boolean from KJobTrackerInterface::registerJob()
so that classes that inherit from it and use D-Bus interfaces can return
true if the interface is not valid as may be the case for
KPlasmaJobTracker, that way KDynamicJobTracker will not have to create
QDBusInterface object to decide which tracker to use

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 17:48:49 +03:00
Ivailo Monev
ff8414d276 plasma: fix regression since f2f4c376a8
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 14:56:34 +03:00
Ivailo Monev
5b2e668fde plasma: do not filter child events from Plasma::ScrollWidget
the event filter checks the watched object if it is either the internal
scroll widget or the widget that is to be scrolled

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 13:11:10 +03:00
Ivailo Monev
cbee69376d plasma: properly initialize Plasma::ScrollWidgetPrivate members
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 13:05:37 +03:00
Ivailo Monev
f2f4c376a8 plasma: set the animation pointers to null after deleting the animations
just in case

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 12:55:48 +03:00
Ivailo Monev
ab65afa79b plasma: Plasma::ScrollWidgetPrivate::createFlickAnimations() optimization
why is it creating QString to convert it multiple times to QByteArray?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 12:44:49 +03:00
Ivailo Monev
53369ab8d7 plasma: drop the feature of Plasma::ScrollWidget to move on mouse move events
does not do bounds checking like the usual moving, also requires event
filter for DnD in widgets using it to ensure events are not stolen by it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 12:35:18 +03:00
Ivailo Monev
2dcb8c968a plasma: pass the focus reason when setting focus
the focus reason serves some purpose

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 12:06:42 +03:00
Ivailo Monev
87b428e010 plasma: remove compat Plasma::ScrollWidget::nativeWidget() method
it used to proxy some widget once I guess

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 12:01:59 +03:00
Ivailo Monev
ca3e34f47c plasma: new Plasma::ListWidget class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 10:38:06 +03:00
Ivailo Monev
06d8b39d5c kdeui: do not set the alignment of KIntNumInput and KDoubleNumInput
see the following commit in the Katie repo:
79236242c8dc7491898c5da8f29bcd1ab7b826c9

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 10:13:43 +03:00
Ivailo Monev
b3eee3d695 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 17:29:40 +03:00
Ivailo Monev
b5b1741ca5 kio: correct logic for hiding user name in KIO::SlaveBase::openPasswordDialog()
that nasty operator not..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 17:12:52 +03:00
Ivailo Monev
020f82e5d7 kdeui: choose default KIntNumInput and KDoubleNumInput alignment based on layout direction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 15:16:37 +03:00
Ivailo Monev
c5e842cc7a kdecore: KMimeTypeRepository::findMimeTypeByName() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 15:02:09 +03:00
Ivailo Monev
11e1a73adb plasma: use pulse animation for Plasma::ItemStatus::NeedsAttentionStatus
because Plasma::IconWidget state is messed up if pressed is set manually
and it is possible for it to be activated (if it accepts mouse button
events). it is also fancier, especially when the icon is not very small

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 14:19:45 +03:00
Ivailo Monev
46f5e8cbc2 kdeui: drop KIntValidator and KDoubleValidator
by reworking KIntNumInput and KDoubleNumInput to set the locale of the
internal spin boxes (QSpinBox or QDoubleSpinBox) both of which use
either internal validator (QSpinBoxValidator for QAbstractSpinBox) or
validate via the locale

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 12:31:17 +03:00
Ivailo Monev
de27e20efc kdeui: KIntValidator and KDoubleValidator review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 10:14:07 +03:00
Ivailo Monev
1332872ba6 kdeui: KIntValidator and KDoubleValidator review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 09:51:21 +03:00
Ivailo Monev
f559d2b200 kdeui: simplify KIntValidator
KDoubleValidator rewritten also by me, see the following commit:
84ea11af90

thus copyright goes to me. also now KIntValidator uses the global
KLocale for validatation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 09:41:08 +03:00
Ivailo Monev
27ae4b6288 kdeui: set the KIntNumInput and KDoubleNumInput validators range
otherwise the validators are unaware of the ranges, the old implementation
of the integer input widgets was not doing it (no wonder it was borked for
integers with base other than 10)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 09:23:31 +03:00
Ivailo Monev
bdf64f5e2c kdeui: implement step setter for KIntNumInput and KDoubleNumInput
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 07:36:57 +03:00
Ivailo Monev
5d3c498bc6 kdeui: setup KIntNumInput and KDoubleNumInput, connect the spin boxes to the sliders
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 06:59:17 +03:00
Ivailo Monev
7ca1def2e4 kdeui: implement KIntNumInput and KDoubleNumInput alignment proxies
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 16:03:10 +03:00
Ivailo Monev
e4ff263ec7 kdeui: set KIntNumInput and KDoubleNumInput layouts margin to zero
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 15:49:54 +03:00
Ivailo Monev
7b9b0eee9e kdeui: reimplement KIntNumInput and KDoubleNumInput
work-in-progress, the slider is not connected currently and code in many
places needs adjustments

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 15:40:17 +03:00
Ivailo Monev
92ff7de73c plasma: proxy QDoubleSpinBox from Plasma::SpinBox
rounding via qRound() and other methods is always possible anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 12:23:29 +03:00
Ivailo Monev
0ca4db3298 plasma: theme Plasma::Slider widget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 11:25:34 +03:00
Ivailo Monev
6635f1d35d plasma: drop extender support
unused

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 09:50:05 +03:00
Ivailo Monev
386f894043 kinit: delay deletion of processes by 3 seconds
because the process is connected to shortly after started but it may finish
before the connection is made and attempting to connect to it will result
in a crash

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 02:25:05 +03:00
Ivailo Monev
aa8fa5abaf plasma: remove redundant Plasma::ItemStatus::NeedsAttentionStatus
is used by the panel view to force-activated applet windows but since it is
done on mouse press the window should become active anyway (unless there is
something like focus stealing prevention getting in the way)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-19 23:33:32 +03:00
Ivailo Monev
7ce4310781 plasma: remove unused focus-related signals
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-19 10:25:15 +03:00
Ivailo Monev
4621f48a1c kdecore: rework KThreadPool::waitForDone() to not lock
also active and queued threads remain unchanged by the method, events
processing continues too (at a certain interval)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-19 10:22:28 +03:00
Ivailo Monev
25e28e7076 plasma: simulate pressed icon for applets that have Plasma::ItemStatus::NeedsAttentionStatus status
this is only for popup applets, normal (Plasma::Applet-based) applets paint
everything and as such should handle status

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-19 01:57:13 +03:00
Ivailo Monev
9fb18a72e5 kutils: drop unused KPasswdRouletteDialog class
was experimental

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 23:21:27 +03:00