Commit graph

226 commits

Author SHA1 Message Date
Ivailo Monev
1689a9288d kdeui: do not change the spin boxes suffix to empty one on value change from KIntNumInput and KDoubleNumInput
because suffix may be set via the KDoubleNumInput::setSuffix() overload
that takes QString argument

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-31 18:50:42 +03:00
Ivailo Monev
cd0bf16803 kio: rework KIO::pixmapForUrl() to use KFileItem
for overlays and overall icon consistency (where possible, KHistoryComboBox
still cannot use it)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-28 10:16:47 +03:00
Ivailo Monev
bbf7da7475 kdeui: use foreach() for iteration in KTextEdit::contextMenuEvent()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 10:08:49 +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
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
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
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
a8080b7dde kdeui: setup the session config instance for saving
comes with a warning, session management is tricky but it works like a
charm now

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 06:23:55 +03:00
Ivailo Monev
753b39282c kdeui: remove KMainWindow compat bits
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 03:58:43 +03:00
Ivailo Monev
0e0db0b815 kdeui: move session management to KApplicaiton
every comment about X11 and session management in general claims it was
broken, not going to claim otherwise. everything that does not use
KApplication shall not be involved into session management now and gets
the middle finger (SIGTERM or SIGKILL) after 5 sec by klauncher when the
session is done

also session management has to be explicitly enabled by applications
now, disabled by default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-09 08:29:51 +03:00
Ivailo Monev
817b7a4aab kdecore: rework KMimeType
more accurate probing then before, notably by probing the file content
from the file slave (only the name was checked before because the
filepath was not a full path in some cases and the file could not be
open)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-04 20:14:53 +03:00
Ivailo Monev
59f92c0970 generic: compiler warning fixes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 20:21:35 +03:00
Ivailo Monev
53dc9fede5 kdeui: enable opening of external links for KMessageWidget and disable text selection
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 21:31:32 +03:00
Ivailo Monev
1c4fa8c32a kdeui: add warning about KSqueezedTextLabel
reminds me of surrogates chopping in QString..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 07:40:55 +03:00
Ivailo Monev
02df654093 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 07:11:05 +03:00
Ivailo Monev
9dfe6602a9 kdeui: pass the associated action from KKeySequenceWidget to KGlobalAccel
for better shortcut stealing, e.g. for actions with more than one
shortcut

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-27 04:49:06 +03:00
Ivailo Monev
956cfc5a59 generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-26 22:38:19 +03:00
Ivailo Monev
d74d369e5e kdeui: simplify KActionCollection settings reading and writing
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 23:10:57 +03:00
Ivailo Monev
2c8f18c893 kdeui: check for self-match in global shortcuts too from KKeySequenceWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 09:45:07 +03:00
Ivailo Monev
d077f26ce5 kdeui: deal with TODO related to KKeySequenceWidget
it is simple - as soon as a second key sequence is added to action it will
be a partial match with itself (atleast)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 09:08:48 +03:00
Ivailo Monev
18e2f7d037 kdeui: implement shortcut blocking for KGlobalAccel and use it in KKeySequenceWidget
obviously recording global shortcuts was borked

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 07:14:06 +03:00
Ivailo Monev
a81a250707 kdeui: fix handling of more than one shortcut in KKeySequenceWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 06:24:55 +03:00
Ivailo Monev
f623641b73 kdeui: semi-working KShortcutsEditor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 13:41:29 +03:00
Ivailo Monev
843463c95d kdeui: drop KSortcut
missing proper configuration interface for the shortcuts, the old one
was borked anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 10:19:03 +03:00
Ivailo Monev
594e901c4a kdeui: rework KGlobalAccel
global shortcut resolution (the KGlobalAccel methods) work on
application level, X11 as far as I can tell does not have a method to
tell which application has grabbed a key (to fill KGlobalShortcutInfo).
other than that no configuration interface for global shortcuts (not by
KGlobalAccel itself, plasma and its applets have interface for that),
also the shortcuts interface did not and still does not handle global
shortcuts well so that is something to look into.

one of the problems solved with this change is the fact that multiple
plasma applets (e.g. multiple instances of the keyboard applet) could
not use the same shortcut, now it is possible. as for which applet gets
the shortcut action it is the one that has the grab first - that is how
key grabbing works in X11

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-22 00:07:35 +03:00
Ivailo Monev
936a4e3e84 kdeui: new/delete size mismatch fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 21:40:37 +03:00
Ivailo Monev
4b7f20f57b kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 16:00:36 +03:00
Ivailo Monev
71e27caf2e kdeui: place the close button of KMessageWidget conditionally again
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-16 20:15:45 +03:00
Ivailo Monev
324518962f kdeui: drop redundant KMessageWidget slots
animating KMessageWidget could not be done properly, not with fade and
not with size animation. it was bad idea from the start

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-16 19:58:27 +03:00
Ivailo Monev
f0b2eac1f1 kdeui: use custom close button properties in KMessageWidget
and because there is no meat from the old implementation copyright goes to
me

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-16 18:44:16 +03:00
Ivailo Monev
d36ed141e9 kdeui: KMessageWidget painting optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-16 16:31:35 +03:00
Ivailo Monev
6daac470e8 kdeui: drop unused KColorValueSelector, KGradientSelector, KSelector and KXYSelector classes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-16 15:43:51 +03:00
Ivailo Monev
a2e4da709f kdeui: remove unused private member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-16 14:39:40 +03:00
Ivailo Monev
d47d67b645 kdeui: drop unused KRuler class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-16 05:44:42 +03:00
Ivailo Monev
ce983caed6 kdeui: KMessageWidget tweak
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-16 03:36:12 +03:00
Ivailo Monev
1c84eaf43b kdeui: rework KMessageWidget
using the selection color for information messages when the text is
selectable was questionable atleast, overriding QFrame action setters,
using QFrame as base class when none of its features were used..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-16 03:24:12 +03:00
Ivailo Monev
ddd6e8a034 kdeui: drop unused KTitleWidget features
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-15 22:37:09 +03:00
Ivailo Monev
213163aa45 kdeui: simplify highlighter management of KTextEdit
instead of virtual method for creating one and a setter now there is only
a setter with ownership of the highlighter belonging to the parent (the
case for the default-created highlighter) or caller of
KTextEdit::setHighlighter()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-08 12:04:44 +03:00
Ivailo Monev
e774460cf3 kdeui: do not create KTextEdit spell checker based on focus and setup its language in all cases
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-07 18:29:44 +03:00
Ivailo Monev
d54681d5d2 kdeui: remove now unused internal NestedListHelper class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-07 12:00:51 +03:00
Ivailo Monev
259cf0c497 kdeui: minor KTextEdit painting optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-07 10:02:21 +03:00
Ivailo Monev
ba8ffa064b kdeui: remove redundant private KTextEdit methods
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 22:33:14 +03:00
Ivailo Monev
0cfa9cb2f3 kdeui: remove unused private KTextEdit methods and members
also initialized all members while at it, some could be used uninitialized

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 22:27:55 +03:00