mirror of
https://bitbucket.org/presik/presik_pos.git
synced 2023-12-14 06:03:00 +01:00
Improvements fixes UI buttons
This commit is contained in:
parent
4e0907024a
commit
ab3408aff7
6 changed files with 19 additions and 20 deletions
BIN
0
BIN
0
Binary file not shown.
|
@ -21,7 +21,7 @@ factoryIcons()
|
|||
class ButtonsFunction(QGridLayout):
|
||||
# Function Numpad
|
||||
|
||||
def __init__(self, parent, tablet_mode=False, panel=False, values=[]):
|
||||
def __init__(self, parent, tablet_mode=False, values=[]):
|
||||
super(ButtonsFunction, self).__init__()
|
||||
|
||||
rows = 4
|
||||
|
@ -30,12 +30,12 @@ class ButtonsFunction(QGridLayout):
|
|||
self.setVerticalSpacing(1)
|
||||
self.parent = parent
|
||||
self.set_values(values)
|
||||
name_style = 'toolbar_button'
|
||||
if self.parent.enviroment == 'restaurant' and not panel:
|
||||
rows = 4
|
||||
columns = 5
|
||||
if panel:
|
||||
name_style = 'toolbar'
|
||||
# name_style = 'toolbar_button'
|
||||
# if self.parent.enviroment == 'restaurant' and not panel:
|
||||
# rows = 4
|
||||
# columns = 5
|
||||
# if panel:
|
||||
name_style = 'toolbar'
|
||||
|
||||
positions = [(i, j) for i in range(rows) for j in range(columns)]
|
||||
for position, value in zip(positions, self.values):
|
||||
|
|
|
@ -44,7 +44,7 @@ class CustomButton(QPushButton):
|
|||
if hasattr(parent, 'screen_size'):
|
||||
size = parent.screen_size
|
||||
|
||||
if size == 'small' or name_style == 'toolbar_button':
|
||||
if size == 'small' or name_style == 'toolbar':
|
||||
qsize = QSize(35, 35)
|
||||
else:
|
||||
qsize = QSize(50, 50)
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
}
|
||||
|
||||
#label_title {
|
||||
font : 14pt;
|
||||
font : 12pt;
|
||||
min-height : 32px;
|
||||
width: 120px;
|
||||
color: rgb(80, 80, 80);
|
||||
color: rgb(70, 70, 70);
|
||||
}
|
||||
|
||||
#label_desc {
|
||||
|
@ -60,20 +60,20 @@
|
|||
background-color: rgb(205, 200, 200);
|
||||
}
|
||||
|
||||
#toolbar_button {
|
||||
font-family: "DejaVu Sans";
|
||||
#toolbar {
|
||||
border-style: groove;
|
||||
font: 18pt;
|
||||
font: 15pt;
|
||||
background-color: white;
|
||||
height: 55px;
|
||||
width : 130px;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
#toolbar_button::hover {
|
||||
#toolbar::hover {
|
||||
background-color: rgb(225, 240, 245);
|
||||
font: 10pt;
|
||||
}
|
||||
|
||||
#toolbar_button::pressed {
|
||||
#toolbar::pressed {
|
||||
background-color: rgb(204, 227, 235);
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
background-color: rgb(205, 200, 200);
|
||||
}
|
||||
|
||||
#toolbar_button {
|
||||
#toolbar {
|
||||
font-family: "DejaVu Sans";
|
||||
border-style: groove;
|
||||
font: 9pt;
|
||||
|
@ -80,10 +80,10 @@
|
|||
border-width: 0px;
|
||||
}
|
||||
|
||||
#toolbar_button::hover {
|
||||
#toolbar::hover {
|
||||
background-color: rgb(225, 240, 245);
|
||||
}
|
||||
|
||||
#toolbar_button::pressed {
|
||||
#toolbar::pressed {
|
||||
background-color: rgb(204, 227, 235);
|
||||
}
|
||||
|
|
|
@ -609,8 +609,7 @@ class MainWindow(FrontWindow):
|
|||
|
||||
# LEFT TABLE COMPONENTS
|
||||
values = self.get_menu_control_panel()
|
||||
self.menu_control_panel = ButtonsFunction(self, panel=True,
|
||||
values=values)
|
||||
self.menu_control_panel = ButtonsFunction(self, values=values)
|
||||
|
||||
if self.enviroment == 'restaurant':
|
||||
values = self.get_product_by_categories()
|
||||
|
|
Loading…
Reference in a new issue