fix style ButtonMenu

master3.3
Denis Spiridonov 12 years ago
parent b29c444a50
commit e81b667808

@ -93,13 +93,11 @@ class TopMenu(QtGui.QPushButton):
self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
def mousePressEvent(self, event): def mousePressEvent(self, event):
# self.move(self.pos() + QtCore.QPoint(0,1))
self.layout.setContentsMargins(2,5,2,2) self.layout.setContentsMargins(2,5,2,2)
event.accept() event.accept()
QtGui.QPushButton.mousePressEvent(self, event) QtGui.QPushButton.mousePressEvent(self, event)
def mouseReleaseEvent(self, event): def mouseReleaseEvent(self, event):
# self.move(self.pos() - QtCore.QPoint(0,1))
self.layout.setContentsMargins(2,4,2,2) self.layout.setContentsMargins(2,4,2,2)
event.accept() event.accept()
QtGui.QPushButton.mouseReleaseEvent(self, event) QtGui.QPushButton.mouseReleaseEvent(self, event)
@ -249,8 +247,10 @@ class ButtonMenu(QtGui.QPushButton):
self.setObjectName(name) self.setObjectName(name)
self.setStyleSheet("QPushButton:flat {border: None;}" self.setStyleSheet("QPushButton:flat {border: None;}"
"QPushButton:pressed {border: none;}" "QPushButton:hover:pressed {border: none;"
"QPushButton:hover{background-color: " "background-color: rgb(218,218,218);"
"border-radius: 7px;}"
"QPushButton:hover:!pressed{background-color: "
"rgb(230,230,230); border-radius: 7px;}") "rgb(230,230,230); border-radius: 7px;}")
# self.setCursor(QtCore.Qt.CursorShape.PointingHandCursor) # self.setCursor(QtCore.Qt.CursorShape.PointingHandCursor)

Loading…
Cancel
Save