-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
96 lines (93 loc) · 2.67 KB
/
Copy pathmain.cpp
File metadata and controls
96 lines (93 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#include "mainwindow.h"
#include <QApplication>
#include <QStyleFactory>
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
a.setStyle(QStyleFactory::create("Fusion")); // Smooth base for dark theme
// Global Dark Theme Stylesheet (Astrill-like: dark bg, green accents)
a.setStyleSheet(R"(
QMainWindow {
background-color: #1e1e1e;
color: #ffffff;
}
QPushButton {
background-color: #2d2d2d;
border: 1px solid #404040;
border-radius: 5px;
padding: 8px 16px;
color: #ffffff;
font-weight: bold;
}
QPushButton:hover {
background-color: #404040;
border-color: #007acc;
}
QPushButton:pressed {
background-color: #1a1a1a;
}
QPushButton#toggleButton {
background-color: #28a745;
border-color: #28a745;
min-width: 120px;
}
QPushButton#toggleButton:hover {
background-color: #218838;
}
QPushButton#toggleButton:pressed {
background-color: #1e7e34;
}
QPushButton#disconnectButton {
background-color: #dc3545;
border-color: #dc3545;
}
QPushButton#disconnectButton:hover {
background-color: #c82333;
}
QLabel {
color: #ffffff;
font-size: 14px;
}
QLabel#statusLabel {
font-size: 16px;
font-weight: bold;
padding: 10px;
border-radius: 3px;
}
QStatusBar {
background-color: #2d2d2d;
color: #cccccc;
font-size: 12px;
}
QTextEdit {
background-color: #1a1a1a;
border: 1px solid #404040;
border-radius: 3px;
color: #e0e0e0;
font-family: 'Consolas';
font-size: 11px;
}
QProgressBar {
border: 1px solid #404040;
border-radius: 5px;
text-align: center;
background-color: #2d2d2d;
color: #ffffff;
}
QProgressBar::chunk {
background-color: #007acc;
border-radius: 3px;
}
QSplitter::handle {
background-color: #404040;
}
QTreeView {
background-color: #1a1a1a;
color: #ffffff;
border: 1px solid #404040;
selection-background-color: #007acc;
}
)");
MainWindow w;
w.show();
return a.exec();
}