-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
66 lines (54 loc) · 2.14 KB
/
Copy pathmain.py
File metadata and controls
66 lines (54 loc) · 2.14 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
import sys
from PyQt6.QtWidgets import QApplication, QWidget, QVBoxLayout, QLabel
from PyQt6.QtCore import Qt, QTimer, QTime
from PyQt6.QtGui import QFont
class MinimalistApp(QWidget):
def __init__(self):
super().__init__()
self.init_ui()
def init_ui(self):
# Apply a strict monochrome, contemporary aesthetic
self.setStyleSheet("""
QWidget {
background-color: #050505;
color: #F0F0F0;
}
""")
self.setWindowTitle('VEM Studio')
self.resize(350, 180)
# Set up the layout
layout = QVBoxLayout()
layout.setAlignment(Qt.AlignmentFlag.AlignCenter)
layout.setSpacing(10)
# Brand / Title Label
title_label = QLabel("VERITAS EX MACHINA")
title_font = QFont("Helvetica", 10, QFont.Weight.Bold)
title_font.setLetterSpacing(QFont.SpacingType.AbsoluteSpacing, 2.0)
title_label.setFont(title_font)
title_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
title_label.setStyleSheet("color: #888888;") # Subtle gray for hierarchy
# Functional Element: The Clock
self.time_label = QLabel("00:00:00")
self.time_label.setFont(QFont("Helvetica", 42, QFont.Weight.Light))
self.time_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
# Add widgets to layout
layout.addWidget(title_label)
layout.addWidget(self.time_label)
self.setLayout(layout)
# Initialize and start the timer for the clock
self.timer = QTimer(self)
self.timer.timeout.connect(self.update_time)
self.timer.start(1000) # Update every 1000 milliseconds (1 second)
# Call once immediately to prevent initial "00:00:00" flash
self.update_time()
def update_time(self):
current_time = QTime.currentTime().toString("hh:mm:ss")
self.time_label.setText(current_time)
if __name__ == '__main__':
# Initialize the Qt Application
app = QApplication(sys.argv)
# Create and display the main window
window = MinimalistApp()
window.show()
# Execute the application loop
sys.exit(app.exec())