Improvements fixes UI buttons

This commit is contained in:
Oscar Alvarez 2020-12-09 15:05:09 -05:00
parent 4e0907024a
commit ab3408aff7
6 changed files with 19 additions and 20 deletions

BIN
0

Binary file not shown.

View file

@ -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):

View file

@ -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)

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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()