diff --git a/CMakeLists.txt b/CMakeLists.txt index 342a8a1..a964c7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) project(BareCode - VERSION 1.3.0 + VERSION 1.3.1 DESCRIPTION "A modular code editor built with Qt6" LANGUAGES CXX ) diff --git a/PKGBUILD b/PKGBUILD index bd36be7..ab85123 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Projekt Hirnfrei - https://www.projekt-hirnfrei.de pkgname=barecode -pkgver=1.2.0 +pkgver=1.3.1 pkgrel=1 pkgdesc="Schlanker modularer Code-Editor für HTML, PHP, CSS und C++" arch=('x86_64' 'aarch64') diff --git a/README.md b/README.md index a9b358b..192b441 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # BareCode **Schlanker, modularer Code-Editor für Web-Entwickler** -Version 1.3.0 — von **Dany Thinnes** | [Projekt Hirnfrei](https://www.projekt-hirnfrei.de) | [Discord](https://discord.projekt-hirnfrei.de) +Version 1.3.1 — von **Dany Thinnes** | [Projekt Hirnfrei](https://www.projekt-hirnfrei.de) | [Discord](https://discord.projekt-hirnfrei.de) Entwickelt mit **C++17**, **Qt6** und **CMake**. Kompiliert auf **Linux**, **Windows** und **Haiku**. diff --git a/main.cpp b/main.cpp index 3089297..b8693e1 100644 --- a/main.cpp +++ b/main.cpp @@ -13,7 +13,7 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); app.setApplicationName("BareCode"); - app.setApplicationVersion("1.3.0"); + app.setApplicationVersion("1.3.1"); app.setOrganizationName("BareCode"); // Icon diff --git a/src/core/AboutDialog.cpp b/src/core/AboutDialog.cpp index 40a13e7..63b33eb 100644 --- a/src/core/AboutDialog.cpp +++ b/src/core/AboutDialog.cpp @@ -74,7 +74,7 @@ AboutDialog::AboutDialog(QWidget *parent) info->addLayout(row); }; - makeRow(tr("Version"), "1.3.0"); + makeRow(tr("Version"), "1.3.1"); makeRow(tr("Entwickler"), "Dany Thinnes"); makeRow(tr("Projekt"), "Projekt Hirnfrei"); makeRow(tr("Framework"), QString("Qt %1").arg(qVersion())); diff --git a/src/editor/CodeEditor.cpp b/src/editor/CodeEditor.cpp index 948faa8..7884108 100644 --- a/src/editor/CodeEditor.cpp +++ b/src/editor/CodeEditor.cpp @@ -563,6 +563,16 @@ void CodeEditor::keyPressEvent(QKeyEvent *event) { const int tabSize = m_settings->tabSize(); + // ----------------------------------------------------------------------- + // Escape: Signatur-Tooltip sofort schließen (unabhängig vom Cursor- + // Kontext). Das Variablen-Popup behandelt Escape bereits selbst weiter + // unten in m_varCompleter->handleKeyPress(). + // ----------------------------------------------------------------------- + if (event->key() == Qt::Key_Escape) + { + m_signatureHelper->dismiss(); + } + // ----------------------------------------------------------------------- // Shift+Tab: Einrückung zurückziehen // ----------------------------------------------------------------------- @@ -758,5 +768,6 @@ void CodeEditor::focusOutEvent(QFocusEvent *event) { QPlainTextEdit::focusOutEvent(event); m_varCompleter->notifyFocusLost(); + m_signatureHelper->notifyFocusLost(); } diff --git a/src/editor/SignatureHelper.cpp b/src/editor/SignatureHelper.cpp index c84f723..ffda890 100644 --- a/src/editor/SignatureHelper.cpp +++ b/src/editor/SignatureHelper.cpp @@ -57,6 +57,23 @@ void SignatureHelper::loadDatabase() } } +// --------------------------------------------------------------------------- +// Editor hat den Fokus verloren — Tooltip schließen, damit es nicht +// als verwaistes Fenster über allen Workspaces stehen bleibt. +// --------------------------------------------------------------------------- +void SignatureHelper::notifyFocusLost() +{ + m_tooltip->hide(); +} + +// --------------------------------------------------------------------------- +// Tooltip sofort schließen (z. B. per Escape) +// --------------------------------------------------------------------------- +void SignatureHelper::dismiss() +{ + m_tooltip->hide(); +} + // --------------------------------------------------------------------------- // Cursor-Bewegung auswerten // --------------------------------------------------------------------------- diff --git a/src/editor/SignatureHelper.h b/src/editor/SignatureHelper.h index 9b1ec89..9e4f46e 100644 --- a/src/editor/SignatureHelper.h +++ b/src/editor/SignatureHelper.h @@ -24,6 +24,17 @@ class SignatureHelper : public QObject public: explicit SignatureHelper(CodeEditor *editor); + // Muss aufgerufen werden, wenn der Editor den Fokus verliert + // (z. B. beim Tab-Wechsel oder wenn eine andere Anwendung/ein anderer + // Workspace aktiviert wird) — schließt ein evtl. offenes Tooltip. + // Ohne diesen Hook kann das Tooltip als "Geisterfenster" über allen + // Workspaces stehen bleiben, siehe Bugreport. + void notifyFocusLost(); + + // Schließt das Tooltip sofort, unabhängig vom Cursor-Kontext. + // Wird u.a. bei Escape aufgerufen. + void dismiss(); + private slots: void onCursorPositionChanged();