From 37417ba49d960fc33078281c99da2601bb3d55c0 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Tue, 14 Jul 2026 09:17:01 +0300 Subject: [PATCH] Fix: my_node_name insert inside [global] section, add button tooltips in channellist --- tools/chatgui/src/channellist.cpp | 3 +++ tools/chatgui/src/settingsdialog.cpp | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/chatgui/src/channellist.cpp b/tools/chatgui/src/channellist.cpp index c4f976d0..b2f2b933 100644 --- a/tools/chatgui/src/channellist.cpp +++ b/tools/chatgui/src/channellist.cpp @@ -58,6 +58,7 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent) auto *gearBtn = new QPushButton(QString::fromUtf8("\xE2\x9A\x99"), footer); gearBtn->setFixedSize(28, 28); + gearBtn->setToolTip(QString::fromUtf8("Настройки")); gearBtn->setStyleSheet( "QPushButton { border: none; font-size: 18px; background: transparent; color: gray; }" "QPushButton:hover { color: palette(text); }"); @@ -69,6 +70,7 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent) auto *createBtn = new QPushButton("GRP", footer); createBtn->setFixedSize(36, 28); + createBtn->setToolTip(QString::fromUtf8("Создать группу")); createBtn->setStyleSheet( "QPushButton { border: 1.5px solid #27AE60; border-radius: 6px;" " font-size: 11px; font-weight: bold; color: #27AE60; background: transparent; }" @@ -78,6 +80,7 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent) auto *plusBtn = new QPushButton("+", footer); plusBtn->setFixedSize(28, 28); + plusBtn->setToolTip(QString::fromUtf8("Присоединиться")); plusBtn->setStyleSheet( "QPushButton { border: 1.5px solid #3390EC; border-radius: 14px;" " font-size: 18px; font-weight: bold; color: #3390EC; background: transparent; }" diff --git a/tools/chatgui/src/settingsdialog.cpp b/tools/chatgui/src/settingsdialog.cpp index 086896dc..2dbc2dc5 100644 --- a/tools/chatgui/src/settingsdialog.cpp +++ b/tools/chatgui/src/settingsdialog.cpp @@ -147,9 +147,8 @@ void SettingsDialog::onSave() { if (lines[i].trimmed().startsWith("my_node_name=")) { lines[i] = "my_node_name=" + newName; found = true; - } else if (!found && lines[i].trimmed().startsWith("[gui]")) { - // insert before [gui] if not found yet - lines.insert(i, "my_node_name=" + newName); + } else if (!found && lines[i].trimmed() == "[global]") { + lines.insert(i + 1, "my_node_name=" + newName); found = true; } }