This commit is contained in:
恍兮惚兮 2024-05-28 18:04:19 +08:00
parent f7a05e5680
commit 0dc8e28a28
10 changed files with 16 additions and 34 deletions

View File

@ -12,6 +12,10 @@
{ {
"file": "dark3.py", "file": "dark3.py",
"name": "BreezeStyleSheets" "name": "BreezeStyleSheets"
},
{
"file": "dark_win11like.py",
"name": "win11like"
} }
], ],
"light": [ "light": [
@ -26,6 +30,10 @@
{ {
"file": "light3.py", "file": "light3.py",
"name": "BreezeStyleSheets" "name": "BreezeStyleSheets"
},
{
"file": "light_win11like.py",
"name": "win11like"
} }
] ]
}, },

View File

View File

@ -1,3 +0,0 @@
import qdarktheme
def stylesheet():
return qdarktheme.load_stylesheet(theme='dark')

View File

@ -1,4 +0,0 @@
import qdarkstyle
def stylesheet():
return qdarkstyle.load_stylesheet(palette=qdarkstyle.DarkPalette)

View File

@ -1,9 +0,0 @@
from PyQt5.QtCore import QFile, QTextStream
from . import breeze_resources
def stylesheet():
file = QFile(":/dark/stylesheet.qss")
file.open(QFile.ReadOnly | QFile.Text)
stream = QTextStream(file)
return stream.readAll()

View File

@ -1,3 +0,0 @@
import qdarktheme
def stylesheet():
return qdarktheme.load_stylesheet(theme='light')

View File

@ -1,4 +0,0 @@
import qdarkstyle
def stylesheet():
return qdarkstyle.load_stylesheet(palette=qdarkstyle.LightPalette)

View File

@ -1,9 +0,0 @@
from PyQt5.QtCore import QFile, QTextStream
from . import breeze_resources
def stylesheet():
file = QFile(":/light/stylesheet.qss")
file.open(QFile.ReadOnly | QFile.Text)
stream = QTextStream(file)
return stream.readAll()

View File

@ -240,8 +240,10 @@ def buildPlugins():
def downloadsomething(): def downloadsomething():
os.chdir(rootDir + "\\temp") os.chdir(rootDir + "\\temp")
os.system('git clone https://github.com/Alexhuszagh/BreezeStyleSheets') os.system('git clone https://github.com/HIllya51/stylesheets')
shutil.copy('BreezeStyleSheets/breeze_resources.py',rootDir + "\\LunaTranslator\\files\\themes") for f in os.listdir('stylesheets'):
if os.path.isfile(os.path.join('stylesheets',f)):
shutil.copy(os.path.join('stylesheets',f),rootDir + "\\LunaTranslator\\files\\themes")
if __name__ == "__main__": if __name__ == "__main__":
if sys.argv[1] == "loadversion": if sys.argv[1] == "loadversion":

View File

@ -164,6 +164,10 @@ bool _SetTheme(
static const DWM_SYSTEMBACKDROP_TYPE BACKDROP_MAP[] = { static const DWM_SYSTEMBACKDROP_TYPE BACKDROP_MAP[] = {
DWMSBT_AUTO, DWMSBT_TRANSIENTWINDOW, DWMSBT_MAINWINDOW, DWMSBT_TABBEDWINDOW}; DWMSBT_AUTO, DWMSBT_TRANSIENTWINDOW, DWMSBT_MAINWINDOW, DWMSBT_TABBEDWINDOW};
DWM_SYSTEMBACKDROP_TYPE value = BACKDROP_MAP[(int)backdrop]; DWM_SYSTEMBACKDROP_TYPE value = BACKDROP_MAP[(int)backdrop];
MARGINS mar{-1,-1,-1,-1};
DwmExtendFrameIntoClientArea(_hWnd,&mar);
DwmSetWindowAttribute(_hWnd, DWMWA_SYSTEMBACKDROP_TYPE, &value, sizeof(value)); DwmSetWindowAttribute(_hWnd, DWMWA_SYSTEMBACKDROP_TYPE, &value, sizeof(value));
return false; return false;