Minor fixes
This commit is contained in:
parent
938a8e3286
commit
c0cd88f064
|
@ -83,23 +83,27 @@ class CustomButton(QPushButton):
|
|||
label_title.setObjectName('label_title')
|
||||
rows.append(label_title)
|
||||
|
||||
label_custom_button = None
|
||||
if desc_extractor:
|
||||
desc = record.get(desc_extractor)
|
||||
if not desc:
|
||||
desc = record.get('rec_name')
|
||||
if len(desc) > 29:
|
||||
desc = desc[0:29]
|
||||
label_custom_button = QLabel(desc, self)
|
||||
label_custom_button.setAlignment(Qt.AlignCenter | Qt.AlignCenter)
|
||||
label_custom_button.setObjectName('label_custom_button')
|
||||
rows.append(label_custom_button)
|
||||
if len(rows) > 0:
|
||||
label_custom_button = QLabel(desc, self)
|
||||
label_custom_button.setAlignment(Qt.AlignCenter | Qt.AlignCenter)
|
||||
label_custom_button.setObjectName('label_custom_button')
|
||||
rows.append(label_custom_button)
|
||||
else:
|
||||
self.setText(desc)
|
||||
|
||||
if len(rows) == 1:
|
||||
pass
|
||||
elif len(rows) > 1:
|
||||
if len(rows) > 1:
|
||||
vbox = QVBoxLayout()
|
||||
for w in rows:
|
||||
vbox.addWidget(w, 1)
|
||||
# if label_custom_button:
|
||||
# label_custom_button.move(vbox.rect().center())
|
||||
self.setLayout(vbox)
|
||||
|
||||
method = getattr(parent, method)
|
||||
|
|
|
@ -80,7 +80,7 @@ QAbstractButton:pressed {
|
|||
max-height: 50px;
|
||||
}
|
||||
|
||||
#field_invoice_type {
|
||||
#field_invoice_type, #field_kind {
|
||||
color : #424242;
|
||||
min-height: 25px;
|
||||
font : 16pt;
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
#standard_button {
|
||||
border-style: groove;
|
||||
font: 12pt;
|
||||
color: rgb(80, 80, 80);
|
||||
background-color: white;
|
||||
height: 80px;
|
||||
font-weight: bold;
|
||||
border-width: 0px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#standard_button::hover {
|
||||
background-color: rgb(227, 255, 159);
|
||||
}
|
||||
|
||||
#standard_button::pressed {
|
||||
background-color: rgb(195, 228, 113);
|
||||
}
|
||||
|
||||
#product_button {
|
||||
font-family: "DejaVu Sans";
|
||||
|
@ -37,7 +56,9 @@
|
|||
padding-right: auto;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
color: rgb(70, 70, 70);
|
||||
background-color: rgb(70, 70, 70);
|
||||
/* color: rgb(70, 70, 70); */
|
||||
color: rgb(193, 41, 41);
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -51,7 +72,8 @@
|
|||
font-family: "DejaVu Sans";
|
||||
border-style: groove;
|
||||
font: 10pt;
|
||||
color: rgb(102, 102, 102);
|
||||
color: rgb(80, 80, 80);
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
min-height: 130px;
|
||||
max-height: 160px;
|
||||
|
|
|
@ -1,16 +1,23 @@
|
|||
|
||||
#standard_button {
|
||||
border-style: groove;
|
||||
font: 7pt;
|
||||
font: 10pt;
|
||||
color: rgb(80, 80, 80);
|
||||
background-color: white;
|
||||
max-height: 60px;
|
||||
max-width : 140px;
|
||||
height: 60px;
|
||||
font-weight: bold;
|
||||
border-width: 0px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#standard_button::hover {
|
||||
background-color: rgb(227, 255, 159);
|
||||
}
|
||||
|
||||
#standard_button::pressed {
|
||||
background-color: rgb(195, 228, 113);
|
||||
}
|
||||
|
||||
#product_button {
|
||||
border-style: groove;
|
||||
font: 6pt;
|
||||
|
@ -59,16 +66,18 @@
|
|||
}
|
||||
|
||||
#category_button {
|
||||
font-family: "DejaVu Sans";
|
||||
border-style: groove;
|
||||
font: 8pt;
|
||||
color: rgb(102, 102, 102);
|
||||
background-color : white;
|
||||
min-height: 90px;
|
||||
max-height: 120px;
|
||||
border-width: 0px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
font-family: "DejaVu Sans";
|
||||
border-style: groove;
|
||||
font: 9pt;
|
||||
color: rgb(80, 80, 80);
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
min-height: 130px;
|
||||
max-height: 160px;
|
||||
width : 130px;
|
||||
border-width: 0px;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#category_button::hover {
|
||||
|
|
|
@ -553,15 +553,7 @@ class DialogPrintInvoice(QWidget):
|
|||
|
||||
def get(self):
|
||||
view = [
|
||||
('invoice_number_ask', {'name': self.tr('INVOICE NUMBER')}),
|
||||
('printer_ask', {
|
||||
'name': self.tr('PRINTER'),
|
||||
'type': 'selection',
|
||||
'values': [
|
||||
(1, 'POS'),
|
||||
(2, 'LASER')
|
||||
],
|
||||
}),
|
||||
('invoice_number_ask', {'name': self.tr('ORDER / INVOICE NUMBER')}),
|
||||
('type_ask', {
|
||||
'name': self.tr('TYPE'),
|
||||
'type': 'selection',
|
||||
|
@ -571,6 +563,14 @@ class DialogPrintInvoice(QWidget):
|
|||
('delivery', self.tr('DELIVERY'))
|
||||
],
|
||||
}),
|
||||
('printer_ask', {
|
||||
'name': self.tr('PRINTER'),
|
||||
'type': 'selection',
|
||||
'values': [
|
||||
(1, 'POS'),
|
||||
(2, 'LASER')
|
||||
],
|
||||
}),
|
||||
]
|
||||
return QuickDialog(self._parent, 'action', data=view)
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@ class StoreView(object):
|
|||
field.setText('')
|
||||
|
||||
field_ask = getattr(self.parent, 'field_' + k + '_ask', None)
|
||||
if field_ask == 'invoice_number_ask':
|
||||
continue
|
||||
if field_ask and hasattr(field_ask, 'setText'):
|
||||
field_ask.setText('')
|
||||
|
||||
|
|
Loading…
Reference in New Issue