fix console build #493

This commit is contained in:
Vadim Lopatin 2017-10-16 13:26:29 +03:00
parent 53e53e84ae
commit d8333126f6
7 changed files with 457 additions and 442 deletions

View File

@ -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;
}

View File

@ -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
}

View File

@ -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

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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();
}