GUI development
This commit is contained in:
92
uis/horsy_login.py
Normal file
92
uis/horsy_login.py
Normal file
@@ -0,0 +1,92 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'D:\RAZNOE\prgrming\horsy\Source\client\uis\horsy_login.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.6
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(292, 200)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
|
||||
MainWindow.setSizePolicy(sizePolicy)
|
||||
MainWindow.setMinimumSize(QtCore.QSize(292, 200))
|
||||
MainWindow.setMaximumSize(QtCore.QSize(292, 200))
|
||||
MainWindow.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
MainWindow.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
|
||||
MainWindow.setWindowOpacity(0.98)
|
||||
MainWindow.setStyleSheet("QWidget{\n"
|
||||
" background-color: rgb(30, 30, 30);\n"
|
||||
"}\n"
|
||||
"")
|
||||
MainWindow.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks|QtWidgets.QMainWindow.AnimatedDocks)
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.login_button = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.login_button.setEnabled(True)
|
||||
self.login_button.setGeometry(QtCore.QRect(70, 140, 151, 50))
|
||||
self.login_button.setMinimumSize(QtCore.QSize(0, 50))
|
||||
self.login_button.setStyleSheet("QPushButton {\n"
|
||||
" color: rgb(204, 204, 204);\n"
|
||||
" border-width: 1px;\n"
|
||||
" border-radius:6px;\n"
|
||||
" border-style: solid;\n"
|
||||
" background-color: rgb(28, 30, 33);\n"
|
||||
" border-color: rgb(66, 143, 225);\n"
|
||||
"}\n"
|
||||
"QPushButton:hover{\n"
|
||||
" border-width: 2px;\n"
|
||||
"}\n"
|
||||
"QPushButton:pressed{\n"
|
||||
" background-color: rgb(50, 60, 63);\n"
|
||||
"}\n"
|
||||
"QPushButton:disabled{\n"
|
||||
" border-width: 0px;\n"
|
||||
" background-color: rgb(92, 99, 109);\n"
|
||||
"}")
|
||||
self.login_button.setObjectName("login_button")
|
||||
self.email_box = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.email_box.setGeometry(QtCore.QRect(20, 20, 251, 51))
|
||||
self.email_box.setStyleSheet("background-color: rgb(74, 76, 83);\n"
|
||||
"border-radius: 5px; \n"
|
||||
"color: rgb(242, 242, 242);")
|
||||
self.email_box.setObjectName("email_box")
|
||||
self.password_box = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.password_box.setGeometry(QtCore.QRect(20, 80, 251, 51))
|
||||
self.password_box.setStyleSheet("background-color: rgb(74, 76, 83);\n"
|
||||
"border-radius: 5px; \n"
|
||||
"color: rgb(242, 242, 242);")
|
||||
self.password_box.setInputMask("")
|
||||
self.password_box.setEchoMode(QtWidgets.QLineEdit.PasswordEchoOnEdit)
|
||||
self.password_box.setObjectName("password_box")
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "Log in"))
|
||||
self.login_button.setText(_translate("MainWindow", "Log in"))
|
||||
self.email_box.setPlaceholderText(_translate("MainWindow", "email"))
|
||||
self.password_box.setPlaceholderText(_translate("MainWindow", "Password"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
MainWindow = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
ui.setupUi(MainWindow)
|
||||
MainWindow.show()
|
||||
sys.exit(app.exec_())
|
||||
141
uis/horsy_login.ui
Normal file
141
uis/horsy_login.ui
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>292</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>292</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>292</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Log in</string>
|
||||
</property>
|
||||
<property name="windowOpacity">
|
||||
<double>0.980000000000000</double>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget{
|
||||
background-color: rgb(30, 30, 30);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="dockOptions">
|
||||
<set>QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks</set>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<widget class="QPushButton" name="login_button">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>140</y>
|
||||
<width>151</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton {
|
||||
color: rgb(204, 204, 204);
|
||||
border-width: 1px;
|
||||
border-radius:6px;
|
||||
border-style: solid;
|
||||
background-color: rgb(28, 30, 33);
|
||||
border-color: rgb(66, 143, 225);
|
||||
}
|
||||
QPushButton:hover{
|
||||
border-width: 2px;
|
||||
}
|
||||
QPushButton:pressed{
|
||||
background-color: rgb(50, 60, 63);
|
||||
}
|
||||
QPushButton:disabled{
|
||||
border-width: 0px;
|
||||
background-color: rgb(92, 99, 109);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Log in</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="email_box">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>251</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(74, 76, 83);
|
||||
border-radius: 5px;
|
||||
color: rgb(242, 242, 242);</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>email</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="password_box">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<width>251</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(74, 76, 83);
|
||||
border-radius: 5px;
|
||||
color: rgb(242, 242, 242);</string>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::PasswordEchoOnEdit</enum>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user