-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch_style.py
More file actions
70 lines (65 loc) · 2.07 KB
/
Copy pathpatch_style.py
File metadata and controls
70 lines (65 loc) · 2.07 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
import re
with open('domain_generator_gui.py', 'r', encoding='utf-8') as f:
content = f.read()
style = """
app.setStyle("Fusion")
self.setStyleSheet(\"\"\"
QMainWindow {
background-color: #f5f6fa;
}
QGroupBox {
font-weight: bold;
border: 1px solid #dcdde1;
border-radius: 6px;
margin-top: 10px;
padding-top: 15px;
}
QGroupBox::title {
subcontrol-origin: margin;
left: 10px;
padding: 0 5px 0 5px;
}
QPushButton {
background-color: #00a8ff;
color: white;
border-radius: 4px;
padding: 6px 12px;
font-weight: bold;
}
QPushButton:hover {
background-color: #0097e6;
}
QPushButton:pressed {
background-color: #0086d3;
}
QLineEdit, QSpinBox {
border: 1px solid #dcdde1;
border-radius: 4px;
padding: 4px;
background-color: white;
}
QTabWidget::pane {
border: 1px solid #dcdde1;
border-radius: 4px;
background-color: white;
}
QTabBar::tab {
background-color: #f5f6fa;
border: 1px solid #dcdde1;
padding: 8px 16px;
margin-right: 2px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
QTabBar::tab:selected {
background-color: white;
border-bottom-color: white;
font-weight: bold;
}
\"\"\")
"""
# inject style after self.resize(750, 650)
content = content.replace("self.resize(750, 650)", "self.resize(750, 650)\n" + style)
with open('domain_generator_gui.py', 'w', encoding='utf-8') as f:
f.write(content)
print("Style added.")