Fix small screen

This commit is contained in:
Oscar Alvarez 2020-12-26 19:50:38 -05:00
parent 23d20bc5ff
commit c820e64c94
5 changed files with 26 additions and 3 deletions

View File

@ -142,7 +142,7 @@ class ButtonsStacked(QHBoxLayout):
self.stacked = QStackedWidget()
_size = 100
if parent.screen_size == 'small':
_size = 60
_size = 70
self.stacked.setMaximumHeight(_size)
self.button_accept = CustomButton(
@ -186,6 +186,7 @@ class ButtonsStacked(QHBoxLayout):
name_style='toolbar',
method='action_payment'
)
self.button_payment.setMaximumHeight(_size)
self.addWidget(self.button_payment, 0)
# else:
# self.button_plus = CustomButton(

View File

@ -45,7 +45,9 @@ class CustomButton(QPushButton):
size = parent.screen_size
if name_style == 'mini_button':
_size = 70
qsize = QSize(30, 30)
self.setMaximumHeight(_size)
elif size == 'small' or name_style == 'toolbar':
qsize = QSize(35, 35)
else:

View File

@ -21,7 +21,7 @@ QDialog {
QLabel {
font : 12pt;
color : rgb(77, 77, 77);
min-height : 30px;
min-height : 20px;
min-width : 30px;
}

View File

@ -87,3 +87,23 @@
#toolbar::pressed {
background-color: rgb(204, 227, 235);
}
#mini_button {
border-style: groove;
font: 6pt;
color: rgb(80, 80, 80);
background-color: white;
max-height: 50px;
max-width : 100px;
border-width: 0px;
border-radius: 5px;
text-align: center;
}
#mini_button::hover {
background-color: rgb(255, 230, 160);
}
#mini_button::pressed {
background-color: rgb(246, 232, 192);
}

View File

@ -890,7 +890,7 @@ class MainWindow(FrontWindow):
self.dialog_table_sale_consumer.exec_()
def button_accept_pressed(self):
if not self._check_quantity():
if not self._check_quantity() or not self._sale.get('id'):
return
if not self._sale['id'] or not self.model_sale_lines.rowCount() > 0:
return