This commit is contained in:
parent
a6adca6696
commit
d1f97c0fa4
5 changed files with 14 additions and 8 deletions
|
|
@ -50,6 +50,7 @@
|
||||||
#define MwNsubBackground "SsubBackground"
|
#define MwNsubBackground "SsubBackground"
|
||||||
#define MwNforeground "Sforeground"
|
#define MwNforeground "Sforeground"
|
||||||
#define MwNsubForeground "SsubForeground"
|
#define MwNsubForeground "SsubForeground"
|
||||||
|
#define MwNtitleBackground "StitleBackground"
|
||||||
|
|
||||||
#define MwNvulkanExtension "SEvulkanExtension"
|
#define MwNvulkanExtension "SEvulkanExtension"
|
||||||
#define MwNvulkanLayer "SEvulkanLayer"
|
#define MwNvulkanLayer "SEvulkanLayer"
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,13 @@ static void detect_darktheme(MwLL handle) {
|
||||||
|
|
||||||
t = dw ? 0 : 1;
|
t = dw ? 0 : 1;
|
||||||
|
|
||||||
|
/* no don't do this here (nishi) */
|
||||||
|
#if 0
|
||||||
if(t && DwmSetWindowAttribute != NULL) {
|
if(t && DwmSetWindowAttribute != NULL) {
|
||||||
// LPARAM style = GetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE);
|
LPARAM style = GetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE);
|
||||||
// if(!(style & WS_CHILD)) MwLLSetDarkTheme(handle, 1);
|
if(!(style & WS_CHILD)) MwLLSetDarkTheme(handle, 1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MwLLDispatch(handle, dark_theme, &t);
|
MwLLDispatch(handle, dark_theme, &t);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ static void lldarkthemehandler(MwLL handle, void* data) {
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
if(IsFirstVisible(h) && (shgeti(h->integer, MwNdarkTheme) == -1 || ((s = MwGetInteger(h, MwNdarkThemeAutomatic)) != MwDEFAULT && s))) {
|
if(IsFirstVisible(h) && (shgeti(h->integer, MwNdarkTheme) == -1 || ((s = MwGetInteger(h, MwNdarkThemeAutomatic)) != MwDEFAULT && s))) {
|
||||||
if(MwGetInteger(h, MwNmodernLook)){
|
if(MwGetInteger(h, MwNmodernLook)) {
|
||||||
MwVaApply(h,
|
MwVaApply(h,
|
||||||
MwNdarkTheme, *ptr,
|
MwNdarkTheme, *ptr,
|
||||||
MwNdarkThemeAutomatic, 1,
|
MwNdarkThemeAutomatic, 1,
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,14 @@
|
||||||
static int wcreate(MwWidget handle) {
|
static int wcreate(MwWidget handle) {
|
||||||
MwSetDefault(handle);
|
MwSetDefault(handle);
|
||||||
|
|
||||||
|
MwSetText(handle, MwNtitleBackground, "#008");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw(MwWidget handle) {
|
static void draw(MwWidget handle) {
|
||||||
MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
||||||
MwLLColor c2 = MwParseColor(handle, MwGetText(handle, MwNsubBackground));
|
MwLLColor c2 = MwParseColor(handle, MwGetText(handle, MwNtitleBackground));
|
||||||
MwRect r, r2;
|
MwRect r, r2;
|
||||||
|
|
||||||
r.x = 0;
|
r.x = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue