def _initUi(self): """初始UI""" self.setupUi(self) # 隐藏还原按钮 self.buttonNormal.setVisible(False) # 加载鼠标样式 ThemeManager.loadCursor(self.widgetMain) ThemeManager.setPointerCursors([ self.buttonHead, # 主界面头像 self.buttonGithub, # Github按钮 self.buttonQQ, # QQ按钮 self.buttonGroup, # 群按钮 self.buttonBackToUp, # 返回顶部按钮 self.buttonHome # 显示主页readme ]) # 安装事件过滤器用于还原鼠标样式 self.widgetMain.installEventFilter(self) # 绑定返回顶部提示框 ToolTip.bind(self.buttonBackToUp) ToolTip.bind(self.buttonHome) # 头像提示控件 ToolTip.bind(self.buttonHead) # 加载主题 colourful = Setting.value('colourful') picture = Setting.value('picture', 'Resources/Images/Wallpaper/t014d05b7c3e1708b2d.jpg', str) AppLog.debug('colourful: %s', str(colourful)) AppLog.debug('picture: %s', picture) if picture: ThemeManager.loadFont() ThemeManager.loadPictureTheme(picture) self._initMyMplCanvas()
def _initUi(self): """初始UI""" self.setupUi(self) # 隐藏还原按钮 self.buttonNormal.setVisible(False) # 隐藏目录树的滑动条 self.treeViewCatalogs.verticalScrollBar().setVisible(False) # 加载主题 ThemeManager.loadTheme() # 加载鼠标样式 ThemeManager.loadCursor(self.widgetMain) ThemeManager.setPointerCursors([ self.buttonHead, # 主界面头像 self.buttonSearch, # 主界面搜索按钮 self.buttonGithub, # Github按钮 self.buttonQQ, # QQ按钮 self.buttonGroup, # 群按钮 self.buttonBackToUp, # 返回顶部按钮 self.buttonHome # 显示主页readme ]) # 安装事件过滤器用于还原鼠标样式 self.widgetMain.installEventFilter(self) # 绑定返回顶部提示框 ToolTip.bind(self.buttonBackToUp) ToolTip.bind(self.buttonHome) # 头像提示控件 ToolTip.bind(self.buttonHead)
def _initUi(self): """初始UI""" self.setupUi(self) # 隐藏还原按钮 self.buttonNormal.setVisible(False) # 隐藏目录树的滑动条 self.treeViewCatalogs.verticalScrollBar().setVisible(False) # 加载鼠标样式 ThemeManager.loadCursor(self.widgetMain) ThemeManager.setPointerCursors([ self.buttonHead, # 主界面头像 self.buttonClear, # 主界面清空按钮 self.buttonGithub, # Github按钮 self.buttonQQ, # QQ按钮 self.buttonGroup, # 群按钮 self.buttonBackToUp, # 返回顶部按钮 self.buttonHome # 显示主页readme ]) # 安装事件过滤器用于还原鼠标样式 self.widgetMain.installEventFilter(self) # 绑定返回顶部提示框 ToolTip.bind(self.buttonBackToUp) ToolTip.bind(self.buttonHome) # 头像提示控件 ToolTip.bind(self.buttonHead) # 加载主题 colourful = Setting.value('colourful') picture = Setting.value('picture', '', str) AppLog.debug('colourful: %s', str(colourful)) AppLog.debug('picture: %s', picture) if picture: ThemeManager.loadFont() ThemeManager.loadPictureTheme(picture) elif colourful: ThemeManager.loadFont() if isinstance(picture, QColor): ThemeManager.loadColourfulTheme(colourful) else: # json数据转渐变 ThemeManager.loadColourfulTheme( GradientUtils.toGradient(colourful)) else: ThemeManager.loadTheme()