Publish tool cleanup and Framework monitoring refinements
This commit is contained in:
@@ -9,7 +9,7 @@ include(KDEInstallDirs)
|
||||
include(KDECMakeSettings)
|
||||
include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
include(CTest)
|
||||
find_package(Qt6 6.8 REQUIRED COMPONENTS Quick Widgets DBus Test QuickTest)
|
||||
find_package(Qt6 6.8 REQUIRED COMPONENTS Quick Widgets DBus)
|
||||
find_package(KF6 REQUIRED COMPONENTS Config I18n Service KIO)
|
||||
add_library(panelactionsplugin MODULE src/plugin.cpp src/panelcontroller.cpp src/settings.cpp)
|
||||
target_link_libraries(panelactionsplugin PRIVATE Qt6::Quick Qt6::DBus KF6::ConfigCore KF6::Service KF6::KIOGui)
|
||||
@@ -21,8 +21,8 @@ target_link_libraries(plasma-panel-actions PRIVATE Qt6::Quick Qt6::Widgets Qt6::
|
||||
# RPM normalizes file timestamps. A content-specific URL prevents Qt from
|
||||
# reusing an older settings page's disk cache after a same-day upgrade.
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS src/SettingsWindow.qml src/ConfigGeneral.qml)
|
||||
file(SHA256 src/SettingsWindow.qml window_hash)
|
||||
file(SHA256 src/ConfigGeneral.qml form_hash)
|
||||
file(SHA256 "${CMAKE_CURRENT_SOURCE_DIR}/src/SettingsWindow.qml" window_hash)
|
||||
file(SHA256 "${CMAKE_CURRENT_SOURCE_DIR}/src/ConfigGeneral.qml" form_hash)
|
||||
string(SHA256 ui_hash "${window_hash}${form_hash}")
|
||||
set(settings_ui_dir "plasma-panel-actions/${ui_hash}")
|
||||
target_compile_definitions(plasma-panel-actions PRIVATE SETTINGS_UI_DIR="${settings_ui_dir}")
|
||||
@@ -36,6 +36,7 @@ install(FILES data/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/se/ajpanton/panelact
|
||||
install(DIRECTORY package/ DESTINATION ${KDE_INSTALL_DATADIR}/plasma/plasmoids/se.ajpanton.panelactions)
|
||||
install(DIRECTORY controller/ DESTINATION ${KDE_INSTALL_DATADIR}/plasma/plasmoids/se.ajpanton.panelactions.controller)
|
||||
if(BUILD_TESTING)
|
||||
find_package(Qt6 6.8 REQUIRED COMPONENTS Test QuickTest)
|
||||
add_executable(test-panelsettings tests/test-settings.cpp src/settings.cpp)
|
||||
target_link_libraries(test-panelsettings PRIVATE Qt6::Test KF6::ConfigCore KF6::Service KF6::KIOGui)
|
||||
target_include_directories(test-panelsettings PRIVATE src)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Name: plasma-panel-actions
|
||||
Version: 0.1.0
|
||||
Release: 10%{?dist}
|
||||
Release: 11%{?dist}
|
||||
Summary: Configurable panel scrolling and empty-space click actions
|
||||
License: MIT
|
||||
URL: https://git.ajpanton.se/ajp_anton/fedora-tools
|
||||
@@ -47,6 +47,10 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}%{_licensedir}/%{name}/LICENSE
|
||||
%{_sysconfdir}/xdg/autostart/se.ajpanton.plasma-panel-actions-autostart.desktop
|
||||
%{_datadir}/fedora-tools/settings/plasma-panel-actions.json
|
||||
%changelog
|
||||
* Sat Sep 12 2026 fedora-tools contributors - 0.1.0-11
|
||||
- Reset partial scrolling when interactions are disabled
|
||||
- Simplify configuration loading and fix incremental build dependencies
|
||||
|
||||
* Fri Sep 11 2026 fedora-tools contributors - 0.1.0-10
|
||||
- Use Plasma's content boundaries for both clicks and scrolling at panel edges
|
||||
* Wed Sep 09 2026 fedora-tools contributors - 0.1.0-9
|
||||
|
||||
@@ -25,7 +25,8 @@ Kirigami.ApplicationWindow {
|
||||
applications: panelSettings.applications
|
||||
Layout.fillWidth: true
|
||||
function load() {
|
||||
for (const key in panelSettings.values) form["cfg_" + key] = panelSettings.values[key];
|
||||
const values = panelSettings.values;
|
||||
for (const key in values) form["cfg_" + key] = values[key];
|
||||
}
|
||||
Component.onCompleted: load()
|
||||
}
|
||||
|
||||
@@ -20,11 +20,7 @@ PanelController::PanelController(QQuickItem *parent) : QQuickItem(parent)
|
||||
}
|
||||
m_pendingButton = Qt::NoButton;
|
||||
});
|
||||
connect(this, &PanelController::settingsChanged, this, [this] {
|
||||
m_singleClickTimer.stop();
|
||||
m_pendingButton = Qt::NoButton;
|
||||
m_pressedButton = Qt::NoButton;
|
||||
});
|
||||
connect(this, &PanelController::settingsChanged, this, &PanelController::resetInteraction);
|
||||
connect(this, &QQuickItem::windowChanged, this, [this](QQuickWindow *window) {
|
||||
if (m_panel) {
|
||||
m_panel->removeEventFilter(this);
|
||||
@@ -33,10 +29,7 @@ PanelController::PanelController(QQuickItem *parent) : QQuickItem(parent)
|
||||
if (m_panel) {
|
||||
m_panel->installEventFilter(this);
|
||||
}
|
||||
m_remainder = 0;
|
||||
m_pressedButton = Qt::NoButton;
|
||||
m_singleClickTimer.stop();
|
||||
m_pendingButton = Qt::NoButton;
|
||||
resetInteraction();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -50,6 +43,14 @@ PanelController::~PanelController()
|
||||
}
|
||||
}
|
||||
|
||||
void PanelController::resetInteraction()
|
||||
{
|
||||
m_remainder = 0;
|
||||
m_pressedButton = Qt::NoButton;
|
||||
m_singleClickTimer.stop();
|
||||
m_pendingButton = Qt::NoButton;
|
||||
}
|
||||
|
||||
QString PanelController::areaAt(const QPointF &position)
|
||||
{
|
||||
// Dragging outside the panel must not project back onto one of its widgets.
|
||||
@@ -68,10 +69,7 @@ QString PanelController::areaAt(const QPointF &position)
|
||||
bool PanelController::eventFilter(QObject *object, QEvent *event)
|
||||
{
|
||||
if (object != m_panel || !m_active) {
|
||||
m_remainder = 0;
|
||||
m_pressedButton = Qt::NoButton;
|
||||
m_singleClickTimer.stop();
|
||||
m_pendingButton = Qt::NoButton;
|
||||
resetInteraction();
|
||||
return false;
|
||||
}
|
||||
if (event->type() == QEvent::Wheel) {
|
||||
|
||||
@@ -27,6 +27,7 @@ Q_SIGNALS:
|
||||
protected:
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
private:
|
||||
void resetInteraction();
|
||||
QString areaAt(const QPointF &position);
|
||||
QPointer<QQuickWindow> m_panel;
|
||||
bool m_active = false;
|
||||
|
||||
@@ -135,6 +135,21 @@ private Q_SLOTS:
|
||||
QCOMPARE(window.delivered, 4);
|
||||
QCOMPARE(actions.count(), 1);
|
||||
}
|
||||
void disablingDiscardsPartialScroll()
|
||||
{
|
||||
QJSEngine engine;
|
||||
PanelWindow window;
|
||||
PanelController controller;
|
||||
setup(controller, window, engine);
|
||||
QSignalSpy actions(&controller, &PanelController::actionRequested);
|
||||
wheel(window, 60);
|
||||
controller.setProperty("active", false);
|
||||
controller.setProperty("active", true);
|
||||
wheel(window, 60);
|
||||
QCOMPARE(actions.count(), 0);
|
||||
wheel(window, 60);
|
||||
QCOMPARE(actions.count(), 1);
|
||||
}
|
||||
void draggingCancelsClickEvenWhenReturning()
|
||||
{
|
||||
QJSEngine engine;
|
||||
|
||||
Reference in New Issue
Block a user