mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-26 23:24:13 +08:00
themes
This commit is contained in:
parent
f7a05e5680
commit
0dc8e28a28
@ -12,6 +12,10 @@
|
||||
{
|
||||
"file": "dark3.py",
|
||||
"name": "BreezeStyleSheets"
|
||||
},
|
||||
{
|
||||
"file": "dark_win11like.py",
|
||||
"name": "win11like"
|
||||
}
|
||||
],
|
||||
"light": [
|
||||
@ -26,6 +30,10 @@
|
||||
{
|
||||
"file": "light3.py",
|
||||
"name": "BreezeStyleSheets"
|
||||
},
|
||||
{
|
||||
"file": "light_win11like.py",
|
||||
"name": "win11like"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
0
LunaTranslator/files/themes/.keepdir
Normal file
0
LunaTranslator/files/themes/.keepdir
Normal file
@ -1,3 +0,0 @@
|
||||
import qdarktheme
|
||||
def stylesheet():
|
||||
return qdarktheme.load_stylesheet(theme='dark')
|
@ -1,4 +0,0 @@
|
||||
import qdarkstyle
|
||||
|
||||
def stylesheet():
|
||||
return qdarkstyle.load_stylesheet(palette=qdarkstyle.DarkPalette)
|
@ -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()
|
@ -1,3 +0,0 @@
|
||||
import qdarktheme
|
||||
def stylesheet():
|
||||
return qdarktheme.load_stylesheet(theme='light')
|
@ -1,4 +0,0 @@
|
||||
import qdarkstyle
|
||||
|
||||
def stylesheet():
|
||||
return qdarkstyle.load_stylesheet(palette=qdarkstyle.LightPalette)
|
@ -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()
|
6
build.py
6
build.py
@ -240,8 +240,10 @@ def buildPlugins():
|
||||
|
||||
def downloadsomething():
|
||||
os.chdir(rootDir + "\\temp")
|
||||
os.system('git clone https://github.com/Alexhuszagh/BreezeStyleSheets')
|
||||
shutil.copy('BreezeStyleSheets/breeze_resources.py',rootDir + "\\LunaTranslator\\files\\themes")
|
||||
os.system('git clone https://github.com/HIllya51/stylesheets')
|
||||
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 sys.argv[1] == "loadversion":
|
||||
|
@ -164,6 +164,10 @@ bool _SetTheme(
|
||||
static const DWM_SYSTEMBACKDROP_TYPE BACKDROP_MAP[] = {
|
||||
DWMSBT_AUTO, DWMSBT_TRANSIENTWINDOW, DWMSBT_MAINWINDOW, DWMSBT_TABBEDWINDOW};
|
||||
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));
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user