29 lines
785 B
Python
29 lines
785 B
Python
from PySide6.QtWidgets import QGridLayout, QPushButton
|
|
from variables import MEDIUM_FONT_SIZE
|
|
|
|
|
|
class Button(QPushButton):
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
self.configStyle()
|
|
|
|
def configStyle(self):
|
|
font = self.font()
|
|
font.setPixelSize(MEDIUM_FONT_SIZE)
|
|
self.setFont(font)
|
|
self.setMinimumSize(75, 75)
|
|
self.setProperty('cssClass', 'specialButton')
|
|
|
|
|
|
class ButtonsGrid(QGridLayout):
|
|
def __init__(self, *args, **kwargs) -> None:
|
|
super().__init__(*args, **kwargs)
|
|
|
|
self._grid_mask = [
|
|
['C', '◀', '^', '/'],
|
|
['7', '8', '9', '*'],
|
|
['4', '5', '6', '-'],
|
|
['1', '2', '3', '+'],
|
|
['', '0', '.', '='],
|
|
]
|