1 Star 0 Fork 0

emacs-eaf / eaf-netease-cloud-music

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
buffer.py 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
manateelazycat 提交于 2022-04-22 20:49 . Refactory with eval_js_function
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2018 Andy Stewart
#
# Author: SpringHan <springchohaku@qq.com>
# Maintainer: SpringHan <springchohaku@qq.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from PyQt6.QtGui import QColor
from core.webengine import BrowserBuffer
from core.utils import eval_in_emacs
class AppBuffer(BrowserBuffer):
def __init__(self, buffer_id, url, arguments):
BrowserBuffer.__init__(self, buffer_id, url, arguments, False)
self.backgroundColor = QColor(self.theme_background_color).darker(110).name()
self.load_index_html(__file__)
def init_app(self):
self.buffer_widget.eval_js_function('initColor', self.theme_background_color, self.theme_foreground_color)
eval_in_emacs('''eaf--netease-cloud-music-init''', [])
Emacs Lisp
1
https://gitee.com/emacs-eaf/eaf-netease-cloud-music.git
git@gitee.com:emacs-eaf/eaf-netease-cloud-music.git
emacs-eaf
eaf-netease-cloud-music
eaf-netease-cloud-music
master

搜索帮助