Commit graph

19 commits

Author SHA1 Message Date
Ivailo Monev
ebde34f06c plasma: call the base class init() method
Plasma::Applet::init() marks the applets as movable items for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-19 02:03:22 +03:00
Ivailo Monev
506fa7f1c0 plasma: use Plasma::AspectRatioMode::Square as aspect ratio mode for keyboard applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-11 05:27:21 +03:00
Ivailo Monev
1bc77d7777 plasma: set the aspect ration mode of keyboard applet to Plasma::AspectRatioMode::ConstrainedSquare
because no size at all is set, otherwise it should be set to
Plasma::AspectRatioMode::KeepAspectRatio and the size set to something like
128x128

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-14 05:49:00 +02:00
Ivailo Monev
40675886b2 plasma: ensure applets have preferred size in systemtray applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-22 07:42:49 +03:00
Ivailo Monev
1cad595824 generic: drop scripting support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 08:14:30 +03:00
Ivailo Monev
b0d6fc59e6 plasma: set the keyboard applet text font point-size according to the content size even for panels
because panels can be stretched to (more or less) half-desktop size

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-20 14:03:13 +03:00
Ivailo Monev
752bf96aaa plasma: set the minimum size of keyboard applet to twice the desktop icon size for non-panel form factor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-20 13:29:55 +03:00
Ivailo Monev
43894f8f20 plasma: use bigger font for panels in keyboard applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-14 10:36:27 +03:00
Ivailo Monev
63d9a63011 plasma: cache the keyboard layout string in keyboard applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 21:17:28 +03:00
Ivailo Monev
ed479c4346 plasma: optimize keyboard applet flag painting
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 21:12:10 +03:00
Ivailo Monev
7bc2872f69 plasma: set the keyboard applet minimum size, based on form factor
because it is painted as pixmap setting the minimum size is a must

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 21:01:52 +03:00
Ivailo Monev
04d081086c plasma: optimize keyboard applet painting
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 20:45:54 +03:00
Ivailo Monev
fcc96cd259 plasma: implement configuration interface for devicenotifier applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 10:57:44 +03:00
Ivailo Monev
7c6d3bcb45 plasma: create batterymonitor applet widget and keyboard applet layout from constructors
Plasma::Applet::init() and Plasma::Applet::constraintsEvent() may be called
in order such that the members were not created yet

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 22:17:22 +03:00
Ivailo Monev
c4ef054ebd Revert "plasma: plug keyboard applet memory leak"
This reverts commit b77b83565f.
2023-09-06 19:10:05 +03:00
Ivailo Monev
d1874e4964 plasma: create Plasma::Svg on the heap in KeyboardApplet::paintInterface()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 18:59:07 +03:00
Ivailo Monev
b77b83565f plasma: plug keyboard applet memory leak
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 03:51:50 +03:00
Ivailo Monev
39998c92dc plasma: set the keyboard applet status based on the number of keyboard layouts
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 19:03:05 +03:00
Ivailo Monev
b5b873c2b3 generic: keyboard layout applet and kayboard KCM reimplementation
lots of changes with this commit - on the plasma applet side:
 + the applet now handles mouse wheel events
 * the applet itself sets its global global shortcut key
 + the applet itself has configuration interface for the text and flag options
 * ported to the new KKeyboardLayout class
 - no per-window or per-application keyboard layout

on the overall keyboard configuration:
 * no KDED module required
 + keyboard layout descriptions (model, layout, variant, etc.) are actually translated
 - no keyboard configuration will be shown when a keyboard is plugged-in (see bellow)
 - keyboard layout options are not configurable, not via GUI interface anyway

the hotplug plasma data engine, device notifications and solid actions
have to be either reimplemented or extended to handle more device types
(currently the above mentioned handle only removable devices by default
such as cameras, not input devices such as keyboard)

overall - from reimplemented one thing to another and the keyboard
configuration is not done yet (adding and editing keyboard layout not
implemented yet) but in a working state

on a side note the changes here affect kvkbd as it uses D-Bus interface
for keyboard layout change that is no more and has to be ported or (most
likely) replaced with a handler for QEvent::RequestSoftwareInputPanel
event that shows a keyboard on demand

there is also the double-keyboard layout applet thing - applet for the
keyboard layout could be added and the daemon (KDED module) was showing
its own keyboard layout indicator automatically (by default)

the X11 keyboard bell options are next to useless btw - there is
KNotification::beep() for such things so the X11 bell options are
simply dropped

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 18:12:13 +03:00