12
12
class Ui_Form (object ):
13
13
def setupUi (self , Form ):
14
14
Form .setObjectName ("Form" )
15
- Form .resize (457 , 361 )
15
+ Form .resize (510 , 450 )
16
+ Form .setMinimumSize (QtCore .QSize (510 , 450 ))
16
17
Form .setStyleSheet ("#Form{\n "
17
18
"background-color:#0a676c\n "
18
19
"}\n "
19
20
"\n "
20
21
"#loginwidget{\n "
21
22
"background-color: #fff;\n "
22
- "border-radius: 10px\n "
23
+ "border-radius: 10px;\n "
24
+ "box-shadow: 5px 5px 10px black;\n "
23
25
"}\n "
24
26
"\n "
27
+ "\n "
25
28
"#logo_frame QPushButton{\n "
26
29
"background-color: transparent;\n "
27
30
"}\n "
@@ -31,6 +34,32 @@ def setupUi(self, Form):
31
34
"border: none;\n "
32
35
"color: #0a676c;\n "
33
36
"}\n "
37
+ "\n "
38
+ "#username_frame QLineEdit, #password_frame QLineEdit {\n "
39
+ "border: none;\n "
40
+ "padding: 3px;\n "
41
+ "border-bottom: 1px solid #74afad;\n "
42
+ "}\n "
43
+ "\n "
44
+ "#login_btn_frame QPushButton {\n "
45
+ "border: none;\n "
46
+ "color: #fff;\n "
47
+ "\n "
48
+ "}\n "
49
+ "\n "
50
+ "#login_btn_frame {\n "
51
+ "background-color: #0a676c;\n "
52
+ "border-radius: 5px;\n "
53
+ "}\n "
54
+ "#login_btn_frame:hover {\n "
55
+ "background-color:#22767a;\n "
56
+ "}\n "
57
+ "\n "
58
+ "#message_frame QLabel {\n "
59
+ "color: red;\n "
60
+ "padding-left: 5px\n "
61
+ "}\n "
62
+ "\n "
34
63
"" )
35
64
self .horizontalLayout = QtWidgets .QHBoxLayout (Form )
36
65
self .horizontalLayout .setContentsMargins (7 , - 1 , - 1 , - 1 )
@@ -42,8 +71,10 @@ def setupUi(self, Form):
42
71
sizePolicy .setHeightForWidth (self .loginwidget .sizePolicy ().hasHeightForWidth ())
43
72
self .loginwidget .setSizePolicy (sizePolicy )
44
73
self .loginwidget .setMaximumSize (QtCore .QSize (441 , 343 ))
74
+ self .loginwidget .setStyleSheet ("" )
45
75
self .loginwidget .setObjectName ("loginwidget" )
46
76
self .verticalLayout_2 = QtWidgets .QVBoxLayout (self .loginwidget )
77
+ self .verticalLayout_2 .setSpacing (0 )
47
78
self .verticalLayout_2 .setObjectName ("verticalLayout_2" )
48
79
self .logo_frame = QtWidgets .QFrame (parent = self .loginwidget )
49
80
self .logo_frame .setFrameShape (QtWidgets .QFrame .Shape .StyledPanel )
@@ -64,7 +95,7 @@ def setupUi(self, Form):
64
95
icon = QtGui .QIcon ()
65
96
icon .addPixmap (QtGui .QPixmap ("icons/logo.png" ), QtGui .QIcon .Mode .Normal , QtGui .QIcon .State .Off )
66
97
self .logo .setIcon (icon )
67
- self .logo .setIconSize (QtCore .QSize (70 , 35 ))
98
+ self .logo .setIconSize (QtCore .QSize (70 , 30 ))
68
99
self .logo .setObjectName ("logo" )
69
100
self .horizontalLayout_7 .addWidget (self .logo )
70
101
self .verticalLayout_2 .addWidget (self .logo_frame )
@@ -73,7 +104,8 @@ def setupUi(self, Form):
73
104
self .title_frame .setFrameShadow (QtWidgets .QFrame .Shadow .Raised )
74
105
self .title_frame .setObjectName ("title_frame" )
75
106
self .horizontalLayout_6 = QtWidgets .QHBoxLayout (self .title_frame )
76
- self .horizontalLayout_6 .setContentsMargins (- 1 , 0 , - 1 , - 1 )
107
+ self .horizontalLayout_6 .setContentsMargins (0 , 0 , 0 , 0 )
108
+ self .horizontalLayout_6 .setSpacing (0 )
77
109
self .horizontalLayout_6 .setObjectName ("horizontalLayout_6" )
78
110
self .pushButton = QtWidgets .QPushButton (parent = self .title_frame )
79
111
self .pushButton .setEnabled (False )
@@ -91,8 +123,6 @@ def setupUi(self, Form):
91
123
self .loginframe_user .setObjectName ("loginframe_user" )
92
124
self .verticalLayout = QtWidgets .QVBoxLayout (self .loginframe_user )
93
125
self .verticalLayout .setObjectName ("verticalLayout" )
94
- spacerItem = QtWidgets .QSpacerItem (20 , 20 , QtWidgets .QSizePolicy .Policy .Minimum , QtWidgets .QSizePolicy .Policy .Preferred )
95
- self .verticalLayout .addItem (spacerItem )
96
126
self .username_frame = QtWidgets .QFrame (parent = self .loginframe_user )
97
127
font = QtGui .QFont ()
98
128
font .setPointSize (10 )
@@ -104,39 +134,64 @@ def setupUi(self, Form):
104
134
self .horizontalLayout_2 .setContentsMargins (5 , 5 , 5 , 5 )
105
135
self .horizontalLayout_2 .setSpacing (6 )
106
136
self .horizontalLayout_2 .setObjectName ("horizontalLayout_2" )
137
+ self .label = QtWidgets .QLabel (parent = self .username_frame )
138
+ self .label .setMaximumSize (QtCore .QSize (20 , 20 ))
139
+ self .label .setText ("" )
140
+ self .label .setPixmap (QtGui .QPixmap ("icons/user.svg" ))
141
+ self .label .setScaledContents (True )
142
+ self .label .setObjectName ("label" )
143
+ self .horizontalLayout_2 .addWidget (self .label )
107
144
self .lineEdit_username = QtWidgets .QLineEdit (parent = self .username_frame )
145
+ font = QtGui .QFont ()
146
+ font .setPointSize (10 )
147
+ self .lineEdit_username .setFont (font )
108
148
self .lineEdit_username .setObjectName ("lineEdit_username" )
109
149
self .horizontalLayout_2 .addWidget (self .lineEdit_username )
110
150
self .verticalLayout .addWidget (self .username_frame )
111
- spacerItem1 = QtWidgets .QSpacerItem (20 , 10 , QtWidgets .QSizePolicy .Policy .Minimum , QtWidgets .QSizePolicy .Policy .Preferred )
112
- self .verticalLayout .addItem (spacerItem1 )
151
+ spacerItem = QtWidgets .QSpacerItem (20 , 5 , QtWidgets .QSizePolicy .Policy .Minimum , QtWidgets .QSizePolicy .Policy .Preferred )
152
+ self .verticalLayout .addItem (spacerItem )
113
153
self .password_frame = QtWidgets .QFrame (parent = self .loginframe_user )
114
154
self .password_frame .setFrameShape (QtWidgets .QFrame .Shape .StyledPanel )
115
155
self .password_frame .setFrameShadow (QtWidgets .QFrame .Shadow .Raised )
116
156
self .password_frame .setObjectName ("password_frame" )
117
157
self .horizontalLayout_3 = QtWidgets .QHBoxLayout (self .password_frame )
118
158
self .horizontalLayout_3 .setObjectName ("horizontalLayout_3" )
159
+ self .label_2 = QtWidgets .QLabel (parent = self .password_frame )
160
+ self .label_2 .setMinimumSize (QtCore .QSize (0 , 0 ))
161
+ self .label_2 .setMaximumSize (QtCore .QSize (20 , 20 ))
162
+ self .label_2 .setText ("" )
163
+ self .label_2 .setPixmap (QtGui .QPixmap ("icons/lock.svg" ))
164
+ self .label_2 .setScaledContents (True )
165
+ self .label_2 .setObjectName ("label_2" )
166
+ self .horizontalLayout_3 .addWidget (self .label_2 )
119
167
self .lineEdit_password = QtWidgets .QLineEdit (parent = self .password_frame )
168
+ font = QtGui .QFont ()
169
+ font .setPointSize (10 )
170
+ self .lineEdit_password .setFont (font )
171
+ self .lineEdit_password .setEchoMode (QtWidgets .QLineEdit .EchoMode .Password )
120
172
self .lineEdit_password .setObjectName ("lineEdit_password" )
121
173
self .horizontalLayout_3 .addWidget (self .lineEdit_password )
122
174
self .verticalLayout .addWidget (self .password_frame )
123
- spacerItem2 = QtWidgets .QSpacerItem (20 , 10 , QtWidgets .QSizePolicy .Policy .Minimum , QtWidgets .QSizePolicy .Policy .Preferred )
124
- self .verticalLayout .addItem (spacerItem2 )
175
+ spacerItem1 = QtWidgets .QSpacerItem (20 , 10 , QtWidgets .QSizePolicy .Policy .Minimum , QtWidgets .QSizePolicy .Policy .Preferred )
176
+ self .verticalLayout .addItem (spacerItem1 )
125
177
self .login_btn_frame = QtWidgets .QFrame (parent = self .loginframe_user )
126
178
self .login_btn_frame .setFrameShape (QtWidgets .QFrame .Shape .StyledPanel )
127
179
self .login_btn_frame .setFrameShadow (QtWidgets .QFrame .Shadow .Raised )
128
180
self .login_btn_frame .setObjectName ("login_btn_frame" )
129
181
self .horizontalLayout_4 = QtWidgets .QHBoxLayout (self .login_btn_frame )
130
182
self .horizontalLayout_4 .setObjectName ("horizontalLayout_4" )
131
183
self .login_btn = QtWidgets .QPushButton (parent = self .login_btn_frame )
184
+ font = QtGui .QFont ()
185
+ font .setPointSize (10 )
186
+ font .setBold (True )
187
+ self .login_btn .setFont (font )
188
+ self .login_btn .setCursor (QtGui .QCursor (QtCore .Qt .CursorShape .PointingHandCursor ))
132
189
icon1 = QtGui .QIcon ()
133
190
icon1 .addPixmap (QtGui .QPixmap ("icons/log-in (1).svg" ), QtGui .QIcon .Mode .Normal , QtGui .QIcon .State .Off )
134
191
self .login_btn .setIcon (icon1 )
135
192
self .login_btn .setObjectName ("login_btn" )
136
193
self .horizontalLayout_4 .addWidget (self .login_btn )
137
194
self .verticalLayout .addWidget (self .login_btn_frame )
138
- spacerItem3 = QtWidgets .QSpacerItem (20 , 20 , QtWidgets .QSizePolicy .Policy .Minimum , QtWidgets .QSizePolicy .Policy .Preferred )
139
- self .verticalLayout .addItem (spacerItem3 )
140
195
self .verticalLayout_2 .addWidget (self .loginframe_user )
141
196
self .message_frame = QtWidgets .QFrame (parent = self .loginwidget )
142
197
self .message_frame .setFrameShape (QtWidgets .QFrame .Shape .StyledPanel )
@@ -145,6 +200,7 @@ def setupUi(self, Form):
145
200
self .horizontalLayout_5 = QtWidgets .QHBoxLayout (self .message_frame )
146
201
self .horizontalLayout_5 .setObjectName ("horizontalLayout_5" )
147
202
self .label_message = QtWidgets .QLabel (parent = self .message_frame )
203
+ self .label_message .setText ("" )
148
204
self .label_message .setObjectName ("label_message" )
149
205
self .horizontalLayout_5 .addWidget (self .label_message )
150
206
self .verticalLayout_2 .addWidget (self .message_frame )
@@ -160,7 +216,6 @@ def retranslateUi(self, Form):
160
216
self .lineEdit_username .setPlaceholderText (_translate ("Form" , "Enter Username" ))
161
217
self .lineEdit_password .setPlaceholderText (_translate ("Form" , "Enter Password" ))
162
218
self .login_btn .setText (_translate ("Form" , "LOG IN" ))
163
- self .label_message .setText (_translate ("Form" , "TextLabel" ))
164
219
165
220
166
221
if __name__ == "__main__" :
0 commit comments