Fehle in Tooltip gefixt

This commit is contained in:
2026-09-07 20:16:07 +02:00
parent cee8f57ab7
commit 37b6343506
8 changed files with 44 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
project(BareCode project(BareCode
VERSION 1.3.0 VERSION 1.3.1
DESCRIPTION "A modular code editor built with Qt6" DESCRIPTION "A modular code editor built with Qt6"
LANGUAGES CXX LANGUAGES CXX
) )

View File

@@ -2,7 +2,7 @@
# Projekt Hirnfrei - https://www.projekt-hirnfrei.de # Projekt Hirnfrei - https://www.projekt-hirnfrei.de
pkgname=barecode pkgname=barecode
pkgver=1.2.0 pkgver=1.3.1
pkgrel=1 pkgrel=1
pkgdesc="Schlanker modularer Code-Editor für HTML, PHP, CSS und C++" pkgdesc="Schlanker modularer Code-Editor für HTML, PHP, CSS und C++"
arch=('x86_64' 'aarch64') arch=('x86_64' 'aarch64')

View File

@@ -1,7 +1,7 @@
# BareCode # BareCode
**Schlanker, modularer Code-Editor für Web-Entwickler** **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**. Entwickelt mit **C++17**, **Qt6** und **CMake**.
Kompiliert auf **Linux**, **Windows** und **Haiku**. Kompiliert auf **Linux**, **Windows** und **Haiku**.

View File

@@ -13,7 +13,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv); QApplication app(argc, argv);
app.setApplicationName("BareCode"); app.setApplicationName("BareCode");
app.setApplicationVersion("1.3.0"); app.setApplicationVersion("1.3.1");
app.setOrganizationName("BareCode"); app.setOrganizationName("BareCode");
// Icon // Icon

View File

@@ -74,7 +74,7 @@ AboutDialog::AboutDialog(QWidget *parent)
info->addLayout(row); info->addLayout(row);
}; };
makeRow(tr("Version"), "1.3.0"); makeRow(tr("Version"), "1.3.1");
makeRow(tr("Entwickler"), "Dany Thinnes"); makeRow(tr("Entwickler"), "Dany Thinnes");
makeRow(tr("Projekt"), "Projekt Hirnfrei"); makeRow(tr("Projekt"), "Projekt Hirnfrei");
makeRow(tr("Framework"), QString("Qt %1").arg(qVersion())); makeRow(tr("Framework"), QString("Qt %1").arg(qVersion()));

View File

@@ -563,6 +563,16 @@ void CodeEditor::keyPressEvent(QKeyEvent *event)
{ {
const int tabSize = m_settings->tabSize(); 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 // Shift+Tab: Einrückung zurückziehen
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -758,5 +768,6 @@ void CodeEditor::focusOutEvent(QFocusEvent *event)
{ {
QPlainTextEdit::focusOutEvent(event); QPlainTextEdit::focusOutEvent(event);
m_varCompleter->notifyFocusLost(); m_varCompleter->notifyFocusLost();
m_signatureHelper->notifyFocusLost();
} }

View File

@@ -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 // Cursor-Bewegung auswerten
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View File

@@ -24,6 +24,17 @@ class SignatureHelper : public QObject
public: public:
explicit SignatureHelper(CodeEditor *editor); 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: private slots:
void onCursorPositionChanged(); void onCursorPositionChanged();