Fix: my_node_name insert inside [global] section, add button tooltips in channellist
This commit is contained in:
1 parent
cca3511503
commit
37417ba49d
2 files changed
+5
-3
No files matched your search
@@ -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; }"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user