mirror of https://github.com/buggins/dlangui.git
fix console build #493
This commit is contained in:
parent
53e53e84ae
commit
d8333126f6
|
@ -9,6 +9,7 @@ module dlangui.graphics.iconprovider;
|
|||
*
|
||||
*/
|
||||
|
||||
import dlangui.core.config;
|
||||
import dlangui.graphics.drawbuf;
|
||||
import dlangui.core.logger;
|
||||
import isfreedesktop;
|
||||
|
@ -138,6 +139,7 @@ class DummyIconProvider : IconProviderBase
|
|||
}
|
||||
}
|
||||
|
||||
static if (!BACKEND_CONSOLE) {
|
||||
version(Windows)
|
||||
{
|
||||
import core.sys.windows.windows;
|
||||
|
@ -606,3 +608,6 @@ version(Windows)
|
|||
} else {
|
||||
alias DummyIconProvider NativeIconProvider;
|
||||
}
|
||||
} else { // !BACKEND_CONSOLE
|
||||
alias DummyIconProvider NativeIconProvider;
|
||||
}
|
||||
|
|
|
@ -598,6 +598,7 @@ class AndroidPlatform : Platform {
|
|||
|
||||
/// handle theme change: e.g. reload some themed resources
|
||||
override void onThemeChanged() {
|
||||
super.onThemeChanged();
|
||||
// override and call dispatchThemeChange for all windows
|
||||
}
|
||||
|
||||
|
|
|
@ -1946,6 +1946,11 @@ class Platform {
|
|||
/// handle theme change: e.g. reload some themed resources
|
||||
void onThemeChanged() {
|
||||
// override and call dispatchThemeChange for all windows
|
||||
drawableCache.clear();
|
||||
static if (!BACKEND_CONSOLE) {
|
||||
imageCache.checkpoint();
|
||||
imageCache.cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
/// default icon for new created windows
|
||||
|
|
|
@ -5,6 +5,7 @@ public import dlangui.core.config;
|
|||
static if (BACKEND_CONSOLE):
|
||||
|
||||
import std.stdio;
|
||||
import dlangui.core.logger;
|
||||
|
||||
version(Windows) {
|
||||
import core.sys.windows.winbase;
|
||||
|
|
|
@ -1192,6 +1192,7 @@ class SDLPlatform : Platform {
|
|||
|
||||
/// handle theme change: e.g. reload some themed resources
|
||||
override void onThemeChanged() {
|
||||
super.onThemeChanged();
|
||||
if (currentTheme)
|
||||
currentTheme.onThemeChanged();
|
||||
foreach(w; _windowMap)
|
||||
|
|
|
@ -1136,6 +1136,7 @@ class Win32Platform : Platform {
|
|||
|
||||
/// handle theme change: e.g. reload some themed resources
|
||||
override void onThemeChanged() {
|
||||
super.onThemeChanged();
|
||||
if (currentTheme)
|
||||
currentTheme.onThemeChanged();
|
||||
foreach(w; _windowMap)
|
||||
|
|
|
@ -1817,6 +1817,7 @@ class X11Platform : Platform {
|
|||
|
||||
/// handle theme change: e.g. reload some themed resources
|
||||
override void onThemeChanged() {
|
||||
super.onThemeChanged();
|
||||
foreach(w; _windowMap)
|
||||
w.dispatchThemeChanged();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue