Clean up
parent
2948a38256
commit
7d93c1caad
|
@ -178,7 +178,6 @@ class MenuBoard(BoxBoard):
|
|||
self.setLayout(self.layout)
|
||||
|
||||
self.show_children(False)
|
||||
#self.anim.finished.connect(lambda: self.show_children(True))
|
||||
self.toggle_anim(True)
|
||||
|
||||
def show_difficulty(self, state):
|
||||
|
|
|
@ -13,6 +13,7 @@ from . import buttons
|
|||
|
||||
DIFFICULTIES = ['Very Easy', 'Easy', 'Normal', 'Hard', 'Insane']
|
||||
|
||||
|
||||
class TimerDisplayer(QGraphicsWidget):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
|
@ -26,7 +27,6 @@ class TimerDisplayer(QGraphicsWidget):
|
|||
self.pen_width = 3
|
||||
self.box_pen.setWidth(self.pen_width)
|
||||
|
||||
|
||||
self.timer_box = QRectF(0, 0, self.width, self.height)
|
||||
self.setMinimumSize(QSizeF(self.width, self.height))
|
||||
self.setMaximumSize(QSizeF(self.width, self.height))
|
||||
|
@ -79,7 +79,6 @@ class DifficultyDisplayer(QGraphicsWidget):
|
|||
self.diff_menu.menuClicked.connect(self.difficultySelected.emit)
|
||||
self.diff_menu.loseFocus.connect(self.notFocus.emit)
|
||||
|
||||
|
||||
def paint(self, painter, style, widget=None):
|
||||
painter.setPen(self.box_pen)
|
||||
painter.drawRect(self.diff_box)
|
||||
|
@ -131,12 +130,10 @@ class DifficultyMenu(QGraphicsWidget):
|
|||
self.setFlag(QGraphicsItem.ItemIsFocusable, True)
|
||||
self.setFocusPolicy(Qt.ClickFocus)
|
||||
|
||||
|
||||
def boundingRect(self):
|
||||
return QRectF(0, 0, self.width, self.height)
|
||||
|
||||
def clicked_on(self, string):
|
||||
print('click!!')
|
||||
self.menuClicked.emit(string)
|
||||
|
||||
def focusOutEvent(self, event):
|
||||
|
|
2
main.py
2
main.py
|
@ -39,8 +39,6 @@ class SudokuWindow(QGraphicsView):
|
|||
# Setting the view
|
||||
self.setBackgroundBrush(QBrush(Qt.black))
|
||||
self.setRenderHint(QPainter.Antialiasing)
|
||||
#self.setGeometry(self.scene.sceneRect().toRect())
|
||||
#self.ensureVisible(self.scene.sceneRect(), 50, 50)
|
||||
self.fitInView(self.scene.sceneRect(), Qt.KeepAspectRatio)
|
||||
self.show()
|
||||
|
||||
|
|
Loading…
Reference in New Issue