kawaii_player.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:kawaii-player 作者: kanishka-linux 项目源码 文件源码
def mouseMoveEvent(self, event):
        global site, ui
        pos = event.pos()
        px = pos.x()
        x = self.width()
        dock_w = ui.dockWidget_3.width()
        if ui.orientation_dock == 'right':
            if px <= x and px >= x-6:
                ui.dockWidget_3.show()
                ui.btn1.setFocus()
                logger.info('show options sidebar')
            elif px <= x-dock_w and ui.auto_hide_dock:
                ui.dockWidget_3.hide()
                if not ui.list1.isHidden():
                    ui.list1.setFocus()
                elif not ui.list2.isHidden():
                    ui.list2.setFocus()
        else:
            if px >= 0 and px <= 10:
                ui.dockWidget_3.show()
                ui.btn1.setFocus()
                logger.info('show options sidebar')
            elif px >= dock_w and ui.auto_hide_dock:
                ui.dockWidget_3.hide()
                if not ui.list1.isHidden():
                    ui.list1.setFocus()
                elif not ui.list2.isHidden():
                    ui.list2.setFocus()

        if self.isFullScreen() and ui.mpvplayer_val.processId() > 0:
            logger.info('FullScreen Window but not video')
            if not ui.tab_6.isHidden() or not ui.list2.isHidden() or not ui.list1.isHidden():
                if ui.frame1.isHidden():
                    ui.frame1.show()
            else:
                ht = self.height()
                if pos.y() <= ht and pos.y() > ht - 5 and ui.frame1.isHidden():
                    ui.frame1.show()
                    ui.frame1.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
                elif pos.y() <= ht-32 and not ui.frame1.isHidden():
                    if site != 'Music':
                        ui.frame1.hide()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号