Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit36da55f

Browse files
committed
Update bottom buttons
1 parente061c99 commit36da55f

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

‎src/ui/mainwindow.cpp‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ void MainWindow::initUI()
7676
ui->autoToggle->setText(tr("Auto Mode"));
7777
ui->hotkeyToggle->setText(tr("Hotkey Mode"));
7878

79-
autosettingsBtn = ui->bottomWidget->findChild<QtMaterialFlatButton *>("settingsBtn");
80-
autoaboutBtn = ui->bottomWidget->findChild<QtMaterialFlatButton *>("aboutBtn");
79+
settingsBtn = ui->bottomWidget->findChild<QtMaterialFlatButton *>("settingsBtn");
80+
aboutBtn = ui->bottomWidget->findChild<QtMaterialFlatButton *>("aboutBtn");
8181

8282
// settingsBtn->setIcon(QIcon(":/icons/settings"));
8383
settingsBtn->setRole(Material::Primary);
@@ -123,16 +123,17 @@ void MainWindow::initConnections()
123123

124124
connect(hotkey, &QHotkey::activated,this, &MainWindow::shortcutTriggered);
125125

126-
// connect(floatBtn, &QtMaterialFloatingActionButton::clicked, this, [&]() {
127-
// if (settingsWindow == nullptr) {
128-
// settingsWindow = new SettingsWindow(this);
129-
130-
// connect(settingsWindow, &SettingsWindow::closed, this, [&]() { settingsWindow = nullptr; });
131-
// settingsWindow->show();
132-
// settingsWindow->raise();
133-
// settingsWindow->activateWindow();
134-
// }
135-
// });
126+
connect(settingsBtn, &QtMaterialFlatButton::clicked,this, [&]() {
127+
if (settingsWindow ==nullptr) {
128+
settingsWindow =newSettingsWindow(this);
129+
130+
connect(settingsWindow, &SettingsWindow::closed,this, [&]() { settingsWindow =nullptr; });
131+
132+
settingsWindow->show();
133+
settingsWindow->raise();
134+
settingsWindow->activateWindow();
135+
}
136+
});
136137
}
137138

138139
voidMainWindow::loadSettings()

‎src/ui/mainwindow.h‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#defineMAINWINDOW_H
33

44
#include"qhotkey.h"
5-
#include"qtmaterialfab.h"
65
#include"qtmaterialtoggle.h"
76
#include"settingswindow.h"
7+
#include"qtmaterialflatbutton.h"
88

99
#include<QMainWindow>
1010
#include<QSettings>
@@ -58,7 +58,10 @@ class MainWindow : public QMainWindow
5858
static MainWindow *instance;
5959
Ui::MainWindow *ui;
6060

61-
QtMaterialFloatingActionButton *floatBtn;
61+
//QtMaterialFloatingActionButton *floatBtn;
62+
63+
QtMaterialFlatButton *aboutBtn;
64+
QtMaterialFlatButton *settingsBtn;
6265

6366
SettingsWindow *settingsWindow;
6467

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp