-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
45 lines (37 loc) · 1.34 KB
/
Copy pathapp.py
File metadata and controls
45 lines (37 loc) · 1.34 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
from components.file_manager import FileManager
from components.text import Title
from util.palette import Pallete
from PyQt5.QtCore import QSize, QRect, Qt
from PyQt5.QtWidgets import QApplication, QFileDialog, QWidget, QLabel, QPushButton, QHBoxLayout, QVBoxLayout, QGridLayout, QMainWindow, QDialog, QMessageBox, QGraphicsBlurEffect
import sys
from dotenv import load_dotenv
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Image Hub")
self.setMaximumSize(QSize(1000, 700))
self.setMinimumSize(QSize(600, 420))
# Sets starting position/size: X,Y, Width, Height
self.setGeometry(500,200,1000,700)
self.init_gui()
self.setAcceptDrops(True)
self.setStyleSheet("""
QWidget {
background-color: """+Pallete.primary+""";
}
""")
def init_gui(self):
layout = QVBoxLayout()
title = Title("Image Hub", "#FFFFFF" )
fileManger = FileManager()
layout.addWidget(title)
layout.addWidget(fileManger)
# Displays Everything
widget = QWidget()
widget.setLayout(layout)
self.setCentralWidget(widget)
load_dotenv()
app = QApplication(sys.argv)
window = MainWindow()
window.show()
app.exec()